1.2.7 OcaPowerSupply
Class Hierarchy:
OcaRoot → OcaAgent → OcaPowerSupply
-
class OcaPowerSupply : OcaAgent
A power supply.
Properties:
-
static const OcaClassID ClassID = "1.2.7"
Number that uniquely identifies the class. Note that this differs from the object number, which identifies the instantiated object. This property is an override of the OcaRoot property.
This property has id
3.1
.
-
static const OcaClassVersionNumber ClassVersion = 3
Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property is an override of the OcaRoot property.
This property has id
3.2
.
-
OcaPowerSupplyType Type
Type of power supply.
This property has id
3.1
.
-
OcaString ModelInfo
Model information for power supply. Text; content is implementation-dependent.
This property has id
3.2
.
-
OcaPowerSupplyState State
State of power supply: off, unavailable, available, active.
This property has id
3.3
.
-
OcaBoolean Charging
True iff charging. For rechargable supplies (obviously).
This property has id
3.4
.
-
OcaFloat32 LoadFractionAvailable
Fraction of power supply’s load capacity that is currently not being used. Readonly. Normal value range 0…1. A negative value indicates this data is not available.
This property has id
3.5
.
-
OcaFloat32 StorageFractionAvailable
Fraction of power supply’s energy storage that remains available. For battery supplies. Readonly. Normal value range 0…1. A negative value indicates this data is not available.
This property has id
3.6
.
-
const OcaPowerSupplyLocation Location
Physical location of power supply - internal or external.
This property has id
3.7
.
Properties inherited from OcaAgent:
Properties inherited from OcaRoot:
Methods:
-
OcaStatus GetType(OcaPowerSupplyType &type)
Gets the type of the power supply. Return value indicates whether the data was successfully retrieved.
This method has id
3.1
.- Parameters
OcaPowerSupplyType type – Output parameter.
-
OcaStatus GetModelInfo(OcaString &info)
Gets the power supply’s model information text. Return value indicates whether the data was successfully retrieved.
This method has id
3.2
.- Parameters
OcaString info – Output parameter.
-
OcaStatus GetState(OcaPowerSupplyState &state)
Gets the state of the power supply. Return value indicates whether the data was successfully retrieved.
This method has id
3.3
.- Parameters
OcaPowerSupplyState state – Output parameter.
-
OcaStatus SetState(OcaPowerSupplyState state)
Changes the power supply’s state. Return value indicates whether the state was successfully changed.
This method has id
3.4
.- Parameters
OcaPowerSupplyState state – Input parameter.
-
OcaStatus GetCharging(OcaBoolean &charging)
Gets the value of property Charging . Return value indicates whether the value was successfully retrieved.
This method has id
3.5
.- Parameters
OcaBoolean charging – Output parameter.
-
OcaStatus GetLoadFractionAvailable(OcaFloat32 &fraction)
Gets the available load fraction. Return value indicates whether the data was successfully retrieved.
This method has id
3.6
.- Parameters
OcaFloat32 fraction – Output parameter.
-
OcaStatus GetStorageFractionAvailable(OcaFloat32 &fraction)
Gets the available storage fraction. Return value indicates whether the data was successfully retrieved.
This method has id
3.7
.- Parameters
OcaFloat32 fraction – Output parameter.
-
OcaStatus GetLocation(OcaPowerSupplyLocation &Location)
Gets the power supply physical location. Return value indicates whether the data was successfully retrieved.
This method has id
3.8
.- Parameters
OcaPowerSupplyLocation Location – Output parameter.
Methods inherited from OcaAgent:
Methods inherited from OcaRoot:
-
static const OcaClassID ClassID = "1.2.7"