1.1.1.4 OcaSwitch

Class Hierarchy:

OcaRoot : OcaWorker : OcaActuator : OcaSwitch

class OcaSwitch : OcaActuator

(n)-position switch. Single-pole or multipole, as determined by number of input and output ports. May be instantiated with no ports for use as an option selector.

Properties:

static const OcaClassID ClassID = "1.1.1.4"

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.

OcaUint16 Position

The current position of the switch. Positions shall be numbered from minPosition to (including) maxPosition. If the object does not return the optional parameters minPosition and maxPosition in its GetPosition method, the positions shall be numbered from 1 to n.

This property has id 4.1.

OcaList<OcaBoolean> PositionEnableFlags

Vector of booleans which enable or disable corresponding switch positions. Default values are a construction parameter. The usual default value is True. Renamed to PositionEnableFlags in v3 of this class.

This property has id 4.3.

OcaList<OcaString> PositionNames

Vector of switch position names. Defined at object construction time. In some implementations, may be changed by controller. FIrst element of list corresponds to the position value of minPosition as returned by GetPosition(…).

This property has id 4.2.

Properties inherited from 1.1.1 OcaActuator:

Methods:

OcaStatus GetPosition(OcaUint16 &position, OcaUint16 &minPosition, OcaUint16 &maxPosition)

Gets the value and limits of the Position property.

This method has id 4.1.

OcaStatus SetPosition(OcaUint16 position)

Sets the value of the Position property.

This method has id 4.2.

OcaStatus GetPositionName(OcaUint16 Index, OcaString &Name)

Gets the name assigned to a given switch position.

This method has id 4.3.

  • Index: Input parameter.

  • Name: Output parameter.

OcaStatus SetPositionName(OcaUint16 Index, OcaString Name)

Assigns a name to a given switch position.

This method has id 4.4.

  • Index: Input parameter.

  • Name: Input parameter.

OcaStatus GetPositionNames(OcaList<OcaString> &Names)

Gets list of names assigned to the switch’s positions.

This method has id 4.5.

  • Names: Output parameter.

OcaStatus SetPositionNames(OcaList<OcaString> Names)

Assigns names to the switch’s positions.

This method has id 4.6.

  • Names: Input parameter.

OcaStatus GetPositionEnableFlag(OcaUint16 Index, OcaBoolean &Enabled)

Gets the Enabled flag assigned to a given switch position.

This method has id 4.7.

OcaStatus SetPositionEnableFlag(OcaUint16 Index, OcaBoolean enabled)

Sets the Enabled flag assigned to a given switch position.

This method has id 4.8.

OcaStatus GetPositionEnableFlags(OcaList<OcaBoolean> &flags)

Gets list of position-enabled flags assigned to the switch’s positions.

This method has id 4.9.

  • flags: Output parameter.

OcaStatus SetPositionEnableFlags(OcaList<OcaBoolean> flags)

Sets list of position-enable flags for the switch’s positions.

This method has id 4.10.

  • flags: Input parameter.

Methods inherited from 1.1.1 OcaActuator: