Dynamic Parameter Initialization

<< Click to Display Table of Contents >>

Navigation:  Parameters >

Dynamic Parameter Initialization

Dynamic parameters are not based on BNCS device types and instances from the static configuration, rather they are registered dynamically by their driver and advertised using the NMOS IS-04 registry.

 

A driver must first register a dynamic device.  This is done using AddManagedDeviceAdhocInstance.  This call returns the GUID of the NMOS device that has been registered.   The associated IBNCSInstance of the device can then be retrieved using GetBncsInstanceFromNmosDevice.  In most cases, however, a dynamic driver would only require a single device, in this case, the BncsFramework.BNCSMainInstance property can be used to locate the main driver instance.

 

If is possible to build a hierarchy of Devices using multiple calls to AddManagedDeviceAdhocInstance and passing the GUID of the Parent Object in the ParentID field.

 

Adding dynamic parameters to a device is achieved using these methods depending on the type of the parameter being added:

 

AddManagedDeviceAdhocParameterBoolean

AddManagedDeviceAdhocParameterEnum

AddManagedDeviceAdhocParameterRange

AddManagedDeviceAdhocParameterString

 

Each of these take the ID of the device instance to which they are being added.  The return object will implement the IBNCSInstanceParameter interface.