1.2.7 OcaPowerSupply

Class Hierarchy:

OcaRoot : OcaAgent : OcaPowerSupply

class OcaPowerSupply : OcaAgent

A power supply.

Properties:

OcaBoolean Charging

True if and only if charging. For rechargable supplies (obviously).

This property has id 3.4.

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 1.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 1.2.

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 unavailable.

This property has id 3.5.

const OcaPowerSupplyLocation Location

Physical location of power supply - internal or external.

This property has id 3.7.

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.

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 unavailable.

This property has id 3.6.

OcaPowerSupplyType Type

Type of power supply.

This property has id 3.1.

Properties inherited from 1.2 OcaAgent:

Methods:

OcaStatus GetType(OcaPowerSupplyType &type)

Gets the type of the power supply.

This method has id 3.1.

  • type: Output parameter.

OcaStatus GetModelInfo(OcaString &info)

Gets the power supply’s model information text.

This method has id 3.2.

  • info: Output parameter.

OcaStatus GetState(OcaPowerSupplyState &state)

Gets the state of the power supply.

This method has id 3.3.

  • state: Output parameter.

OcaStatus SetState(OcaPowerSupplyState state)

Changes the power supply’s state.

This method has id 3.4.

  • state: Input parameter.

OcaStatus GetCharging(OcaBoolean &charging)

Gets the value of property Charging.

This method has id 3.5.

OcaStatus GetLoadFractionAvailable(OcaFloat32 &fraction)

Gets the available load fraction.

This method has id 3.6.

OcaStatus GetStorageFractionAvailable(OcaFloat32 &fraction)

Gets the available storage fraction.

This method has id 3.7.

OcaStatus GetLocation(OcaPowerSupplyLocation &Location)

Gets the power supply physical location.

This method has id 3.8.

Methods inherited from 1.2 OcaAgent: