1.2.5 OcaLibrary
Class Hierarchy:
OcaRoot → OcaAgent → OcaLibrary
-
class OcaLibrary : OcaAgent
A library is an agent that holds a collection of datasets. We refer to each dataset as a Volume . There are two kinds of volumes: ParamSet (parameter set). A ParamSet is a collection of operating parameter settings that can be applied to a block. Each ParamSet is associated with a specific block type, but not with a specific instance of that type. A ParamSet may be applied to any block instance of the associated type. A block’s type is the object number of its factory or, for factory-defined blocks, a unique identifier set at time of manufacture. Patch . A Patch is a collection of ParamSet assignments. A ParamSet assigment is the description of a binding of a ParamSet to a block instance. To “apply” a Patch is to apply all of its assignments. To apply an assignment is to set all of its ParamSet’s parameter values into its block. A given library instance can only hold one class of volume. A device that supports libraries can have any number of Patch and ParamSet libraries. If a device implements a Patch library, it must also implement at least one ParamSet library. However, the reverse is not true: a device may implement one or more ParamSet libraries without a Patch library.
Properties:
-
static const OcaClassID ClassID = "1.2.5"
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
3.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
3.2
.
-
OcaLibVolType VolumeType
Type of library volumes:
This property has id
3.1
.
-
OcaLibAccess Access
Readonly, read-expand, or full.
This property has id
3.2
.
-
OcaMap<OcaLibVolID, OcaLibVol> Volumes
Map of volumes held in the Library. Changed in version 2 because the definition of OcaLibVolMetaData, which is part of OcaLibVol, has changed, and because it is now a private property whose changes are signaled by the OcaLibVolChanged event.
This property has id
3.3
.
Properties inherited from OcaAgent:
Properties inherited from OcaRoot:
Methods:
-
OcaStatus AddVolume(OcaLibVol Volume, OcaLibVolID &ID)
Adds a volume to the library and returns its volume ID. The return value indicates whether the volume was successfully added. Changed in version 2 because the definition of OcaLibVolMetaData, which is part of OcaLibVol, has changed.
This method has id
3.1
.- Parameters
OcaLibVol Volume – Input parameter.
OcaLibVolID ID – Output parameter.
-
OcaStatus ReplaceVolume(OcaLibVolID ID, OcaLibVol Volume)
Replaces a volume in the library at the given volume ID. The return value indicates whether the volume was successfully replaced. Changed in version 2 because the definition of OcaLibVolMetaData, which is part of OcaLibVol, has changed.
This method has id
3.2
.- Parameters
OcaLibVolID ID – Input parameter.
OcaLibVol Volume – Input parameter.
-
OcaStatus DeleteVolume(OcaLibVolID ID)
Deletes a volume from the library. The return value indicates whether the group was successfully deleted.
This method has id
3.3
.- Parameters
OcaLibVolID ID – Input parameter.
-
OcaStatus GetVolume(OcaLibVolID ID, OcaLibVol &Volume)
Retrieves a library volume. The return value indicates whether the volume was successfully retrieved. Changed in version 2 because the definition of OcaLibVolMetaData, which is part of OcaLibVol, has changed.
This method has id
3.4
.- Parameters
OcaLibVolID ID – Input parameter.
OcaLibVol Volume – Output parameter.
-
OcaStatus GetVolumeCount(OcaUint16 &Count)
Gets the count of volumes in this library. The return value indicates whether the count was successfully retrieved.
This method has id
3.5
.- Parameters
OcaUint16 Count – Output parameter.
-
OcaStatus GetVolumes(OcaMap<OcaLibVolID, OcaLibVol> &Volumes)
Gets the list of volumes held in this library. The return value indicates whether the list was successfully retrieved. Changed in version 2 because the definition of OcaLibVolMetaData, which is part of OcaLibVol, has changed.
This method has id
3.6
.- Parameters
OcaMap<OcaLibVolID, OcaLibVol> Volumes – Output parameter.
-
OcaStatus GetAccess(OcaLibAccess &Access)
Gets allowed access mode for this library. The return value indicates whether the property was successfully retrieved.
This method has id
3.7
.- Parameters
OcaLibAccess Access – Output parameter.
-
OcaStatus SetAccess(OcaLibAccess Access)
Sets allowed access mode for this library. The return value indicates whether the property was successfully set. Not implemented for static, manufacturer-supplied libraries.
This method has id
3.8
.- Parameters
OcaLibAccess Access – Input parameter.
Methods inherited from OcaAgent:
Methods inherited from OcaRoot:
Events:
-
void OcaLibVolChanged(OcaLibVolChangedEventData eventData)
Event that is raised whenever private property Volumes changes. Added in OcaLibrary Version 2.
-
static const OcaClassID ClassID = "1.2.5"