1.1.2.12 OcaStateSensor

Class Hierarchy:

OcaRoot : OcaWorker : OcaSensor : OcaStateSensor

class OcaStateSensor : OcaSensor

Sensor that reports a 1-of-n state. Sensor counterpart of the actuator OcaSwitch.

Properties:

static const OcaClassID ClassID = "1.1.2.12"

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 = 1

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.

OcaUint16 State

The current state reading. States shall be numbered from minState to (including) maxState, as returned by the GetState(…) method.

This property has id 4.1.

OcaList<OcaString> StateNames

Vector of state names. May be readonly or readwrite, depending on implementation. FIrst element of list corresponds to the state value of minState as returned by GetState(…).

This property has id 4.2.

Properties inherited from 1.1.2 OcaSensor:

Methods:

OcaStatus GetState(OcaUint16 &State, OcaUint16 &minState, OcaUint16 &maxState)

Gets the value of the State property and, optionally, its implementation min and max.

This method has id 4.1.

OcaStatus GetStateNames(OcaList<OcaString> &Names)

Gets list of names assigned to the States.

This method has id 4.2.

  • Names: Output parameter.

OcaStatus SetStateNames(OcaList<OcaString> Names)

Value to which the StateNames property shall be set if the method succeeds. Optional method - StateNames may be readonly in some implementations.

This method has id 4.3.

  • Names: Input parameter.

Methods inherited from 1.1.2 OcaSensor: