1 OcaRoot
Class Hierarchy:
-
class OcaRoot
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 const OcaClassID ClassID = "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.
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 will be overridden by each descendant class, in order to specify that class’s ClassVersion.
This property has id
1.2
.
-
const OcaBoolean Lockable
Read-only property that indicates whether the object is lockable or non-lockable. The property value shall be set during construction of the object.
This property has id
1.4
.
-
OcaLockState LockState
Current lock state - none, noWrite, or noReadWrite
This property has id
1.6
.
-
const OcaONo ObjectNumber
The object number that uniquely identifies the instantiated object. This read-only property shall 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.
This property has id
1.3
.
-
const OcaString Role
Read-only text property that describes object’s role in the device. Particularly useful for workers, e.g. “Input 1 Gain”. Value shall not change during the life of the object. Values beginning with “oca” in any character case are reserved for AES use.
This property has id
1.5
.
Methods:
-
OcaStatus GetClassIdentification(OcaClassIdentification &ClassIdentification)
Gets the class identification, a structure contains the ClassID and ClassVersion.
This method has id
1.1
.ClassIdentification: Output parameter.
-
OcaStatus GetLockable(OcaBoolean &lockable)
Gets the value of the Lockable property.
This method has id
1.2
.lockable: Output parameter.
-
OcaStatus SetLockNoReadWrite()
Locks the object totally, so that it can only be accessed for reading or writing by the lockholder.
If the object’s LockState is LockNoWrite by the same lockholder, the lock state is upgraded to LockNoReadWrite.
If the call is from a session other than the lockholder’s, the call fails.
This method has id
1.3
.
-
OcaStatus Unlock()
Unlocks the object so that it can be freely accessed again. This method can only succeed if it is called by the lockholder.
This method has id
1.4
.
-
OcaStatus GetRole(OcaString &Role)
Returns value of Role property.
This method has id
1.5
.Role: Output parameter.
-
OcaStatus SetLockNoWrite()
Locks the object so that it may only be controlled by the lockholder, but others can still retrieve property values. If LockState is LockNoReadWrite by the same lockholder, the lock state is downgraded to LockNoWrite. If the call is from a session other than the lockholder’s, the call fails.
This method has id
1.6
.
-
OcaStatus GetLockState(OcaLockState &State)
Returns the current value of the LockState property.
This method has id
1.7
.State: Output parameter.
Events:
-
void PropertyChanged(OcaPropertyChangedEventData eventData)
General event that is emitted when a property changes. In each setter method (of derived classes) this event shall be raised with the proper derived event data structure.
This event has id
1.1
.
-
static const OcaClassID ClassID = "1"