OcaPowerSupply

A online version of the AES70 specification of this class can be found at http://docs.deuso.de.

The class is a subclass of OcaAgent().

This class defines the properties

Name

JavaScript Type

AES70 Type

Type

OcaPowerSupplyType

OcaPowerSupplyType

ModelInfo

string

OcaString

State

OcaPowerSupplyState

OcaPowerSupplyState

Charging

boolean

OcaBoolean

LoadFractionAvailable

number

OcaFloat32

StorageFractionAvailable

number

OcaFloat32

Location

OcaPowerSupplyLocation

OcaPowerSupplyLocation

Furthermore, it inherits the properties ClassID, ClassVersion, ObjectNumber, Lockable, Role, Label, Owner, Type, ModelInfo, State, Charging, LoadFractionAvailable, StorageFractionAvailable and Location.

class OcaPowerSupply(objectNumber, device)

A power supply.

OcaPowerSupply.OnChargingChanged

type: PropertyEvent.<boolean>

This event is emitted when the property Charging changes in the remote object. The property Charging is described in the AES70 standard as follows. True iff charging. For rechargable supplies (obviously).

OcaPowerSupply.OnModelInfoChanged

type: PropertyEvent.<string>

This event is emitted when the property ModelInfo changes in the remote object. The property ModelInfo is described in the AES70 standard as follows. Model information for power supply. Text; content is implementation-dependent.

OcaPowerSupply.OnStateChanged

type: PropertyEvent.<OcaPowerSupplyState>

This event is emitted when the property State changes in the remote object. The property State is described in the AES70 standard as follows. State of power supply: off, unavailable, available, active.

OcaPowerSupply.OnTypeChanged

type: PropertyEvent.<OcaPowerSupplyType>

This event is emitted when the property Type changes in the remote object. The property Type is described in the AES70 standard as follows. Type of power supply.

OcaPowerSupply.GetCharging()

Gets the value of property Charging . Return value indicates whether the value was successfully retrieved.

Returns

Promise.<boolean> – A promise which resolves to a single value of type boolean.

OcaPowerSupply.GetLoadFractionAvailable()

Gets the available load fraction. Return value indicates whether the data was successfully retrieved.

Returns

Promise.<number> – A promise which resolves to a single value of type number.

OcaPowerSupply.GetLocation()

Gets the power supply physical location. Return value indicates whether the data was successfully retrieved.

Returns

Promise.<OcaPowerSupplyLocation> – A promise which resolves to a single value of type OcaPowerSupplyLocation().

OcaPowerSupply.GetModelInfo()

Gets the power supply’s model information text. Return value indicates whether the data was successfully retrieved.

Returns

Promise.<string> – A promise which resolves to a single value of type string.

OcaPowerSupply.GetState()

Gets the state of the power supply. Return value indicates whether the data was successfully retrieved.

Returns

Promise.<OcaPowerSupplyState> – A promise which resolves to a single value of type OcaPowerSupplyState().

OcaPowerSupply.GetStorageFractionAvailable()

Gets the available storage fraction. Return value indicates whether the data was successfully retrieved.

Returns

Promise.<number> – A promise which resolves to a single value of type number.

OcaPowerSupply.GetType()

Gets the type of the power supply. Return value indicates whether the data was successfully retrieved.

Returns

Promise.<OcaPowerSupplyType> – A promise which resolves to a single value of type OcaPowerSupplyType().

OcaPowerSupply.SetState(state)

Changes the power supply’s state. Return value indicates whether the state was successfully changed.

Arguments
Returns

Promise.<void>