Contents

init(stateOfCharge:direction:power:energy:)

Initializes an electrical measurement for the electrical load event.

Declaration

init(stateOfCharge: Int, direction: ElectricityFlowDirection, power: Measurement<UnitPower>, energy: Measurement<UnitEnergy>)

Parameters

  • stateOfCharge:

    The remaining capacity available in a battery

  • direction:

    Specifies whether electricity is being imported from the grid or exported to the grid.

  • power:

    Power in milli-watts

  • energy:

    The accumulated electrical energy consumed or generated by the device in milli-watt hours. The accumulator is reset on ElectricalLoadEvent/Session/State/end.