Index

Class OcaRoot

ClassID: 1

The abstract root class of which all OCA classes derive. It offers basic OCA functionality such as locking an object and generalized data access.

Properties

static readonly OcaClassID ClassID = 1

Level: 1 Index: 1

Number that uniquely identifies the class. Note that this differs from the object number, which identifies the instantiated object. This is a class property instead of an object property. This property will be overridden by each descendant class, in order to specify that class's ClassID.

static readonly OcaClassVersionNumber ClassVersion = 2

Level: 1 Index: 2

Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property will be overridden by each descendant class, in order to specify that class's ClassVersion.

readonly OcaONo ObjectNumber

Level: 1 Index: 3

The object number that uniquely identifies the instantiated object. This read-only property must be set at creation of the object. Derived objects can hardcode the object number in its constructor, or offer a constructor with object number parameter for dynamic allocation of object numbers.

readonly OcaBoolean Lockable

Level: 1 Index: 4

Read-only property that indicates whether the object is lockable or non-lockable. The property value must be set during construction of the object.

readonly OcaString Role

Level: 1 Index: 5

Read-only text property that describes object's role in the device. Particularly useful for workers, e.g. "Input 1 Gain".

Methods

OcaRoot::GetClassIdentification ( ) → ( OcaClassIdentification ClassIdentification)

Level: 1 Index: 1

Gets the class identification, a structure that contains the ClassID and ClassVersion. The return value indicates whether the property was successfully retrieved.

OcaRoot::GetLockable ( ) → ( OcaBoolean lockable)

Level: 1 Index: 2

Gets the value of the Lockable property. The return value indicates whether the property was successfully retrieved.

OcaRoot::LockTotal ( )

Level: 1 Index: 3

Locks the object totally, so that it can only be accessed for reading or writing by the lockholder. If the device is read-only locked (by a prior call to LockReadonly()) when Lock() is called by the same lockholder, the lock state is upgraded to total. If the call is from a session other than the lockholder's, the call fails. The return value indicates whether the operation succeeded.

OcaRoot::Unlock ( )

Level: 1 Index: 4

Unlocks the object so that it can be freely accessed again. This method can only succeed if it is called by the lockholder. The return value indicates whether the operation succeeded.

OcaRoot::GetRole ( ) → ( OcaString Role)

Level: 1 Index: 5

Returns value of Role property. The return value indicates whether the operation succeeded.

OcaRoot::LockReadonly ( )

Level: 1 Index: 6

Locks the object so that its properties may only be modified by the lockholder, but others can still retrieve property values. If the device is already locked (by a prior call to Lock() or LockReadonly()) when LockReadonly() is called by the same lockholder, the lock state is set to read-only. If the call is from a session other than the lockholder's, the call fails. The return value indicates whether the operation succeeded.

Events

Event PropertyChanged

General event that is emitted when a property changes. In each setter method (of derived classes) this event must be raised with the proper derived event data structure.