1.1.1.4 OcaSwitch

Class Hierarchy:

OcaRootOcaWorkerOcaActuatorOcaSwitch

class OcaSwitch : OcaActuator

(n)-position single-pole switch.

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

static const OcaClassVersionNumber ClassVersion = 2

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 4.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<OcaString> PositionNames

Vector of switch position names. Supplied by controller.

This property has id 4.2.

OcaList<OcaBoolean> PositionEnableds

Vector of booleans which enable or disable corresponding switch positions. Default values are a construction parameter. The usual default value is True.

This property has id 4.3.

Properties inherited from OcaWorker:

Properties inherited from OcaRoot:

Methods:

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

Gets the value of the Position property and, optionally, its implementation min and max. The return value indicates whether the data was successfully retrieved.

This method has id 4.1.

Parameters
  • OcaUint16 position – Output parameter.

  • OcaUint16 minPosition – Output parameter.

  • OcaUint16 maxPosition – Output parameter.

OcaStatus SetPosition(OcaUint16 position)

Sets the value of the Position property. The return value indicates whether the property was successfully set.

This method has id 4.2.

Parameters

OcaUint16 position – Input parameter.

OcaStatus GetPositionName(OcaUint16 Index, OcaString &Name)

Gets the name assigned to a given switch position. The return value indicates whether the name was successfully retrieved.

This method has id 4.3.

Parameters
  • OcaUint16 Index – Input parameter.

  • OcaString Name – Output parameter.

OcaStatus SetPositionName(OcaUint16 Index, OcaString Name)

Assigns a name to a given switch position. The return value indicates whether the name was successfully assigned.

This method has id 4.4.

Parameters
  • OcaUint16 Index – Input parameter.

  • OcaString Name – Input parameter.

OcaStatus GetPositionNames(OcaList<OcaString> &Names)

Gets list of names assigned to the switch’s positions. The return value indicates whether the names were successfully retrieved.

This method has id 4.5.

Parameters

OcaList<OcaString> Names – Output parameter.

OcaStatus SetPositionNames(OcaList<OcaString> Names)

Assigns names to the switch’s positions. The return value indicates whether the names were successfully assigned.

This method has id 4.6.

Parameters

OcaList<OcaString> Names – Input parameter.

OcaStatus GetPositionEnabled(OcaUint16 Index, OcaBoolean &enabled)

Gets the Enabled flag assigned to a given switch position. The return value indicates whether the flag was successfully retrieved.

This method has id 4.7.

Parameters
  • OcaUint16 Index – Input parameter.

  • OcaBoolean enabled – Output parameter.

OcaStatus SetPositionEnabled(OcaUint16 Index, OcaBoolean enabled)

Sets the Enabled flag assigned to a given switch position. The return value indicates whether the flag was successfully set.

This method has id 4.8.

Parameters
  • OcaUint16 Index – Input parameter.

  • OcaBoolean enabled – Input parameter.

OcaStatus GetPositionEnableds(OcaList<OcaBoolean> &enableds)

Gets list of Enabled flags assigned to the switch’s positions. The return value indicates whether the flags were successfully retrieved.

This method has id 4.9.

Parameters

OcaList<OcaBoolean> enableds – Output parameter.

OcaStatus SetPositionEnableds(OcaList<OcaBoolean> enableds)

Sets list of Enabled flags for the switch’s positions. The return value indicates whether the flags were successfully set.

This method has id 4.10.

Parameters

OcaList<OcaBoolean> enableds – Input parameter.

Methods inherited from OcaWorker:

Methods inherited from OcaRoot: