openDAQ
Open data acquisition platform
DeviceOptions
+ Collaboration diagram for DeviceOptions:

Detailed Description

Classes

struct  IDeviceUpdateOptions
 Allows for specifying how a device and its subdevices are to be updated when loading a configuration. More...
 
class  DeviceUpdateOptionsPtr
 Defines how a given device should be updated. More...
 

Enumerations

enum class  DeviceUpdateMode : EnumType {
  Load = 0 , UpdateOnly , Skip , Remove ,
  Remap
}
 Defines how a given device should be updated. More...
 

Functions

daq::StringPtr getLocalId () const
 Gets the local ID of the device. The local ID is obtained from the JSON key for the device entry. More...
 
daq::StringPtr getManufacturer () const
 Gets the manufacturer of the device, as written in the setup string. More...
 
daq::StringPtr getSerialNumber () const
 Gets the serial number of the device, as written in the setup string. More...
 
daq::StringPtr getConnectionString () const
 Gets the connection string of the device, as written in the setup string. More...
 
void setNewManufacturer (const daq::StringPtr &manufacturer) const
 Sets the new manufacturer of the device to be used for remapping. More...
 
daq::StringPtr getNewManufacturer () const
 Gets the new manufacturer of the device to be used for remapping. More...
 
void setNewSerialNumber (const daq::StringPtr &serialNumber) const
 Sets the new serial number of the device to be used for remapping. More...
 
daq::StringPtr getNewSerialNumber () const
 Gets the new serial number of the device to be used for remapping. More...
 
void setNewConnectionString (const daq::StringPtr &connectionString) const
 Sets the new connection string of the device to be used for remapping. More...
 
daq::StringPtr getNewConnectionString () const
 Gets the new connection string of the device to be used for remapping. More...
 
daq::DeviceUpdateMode getUpdateMode () const
 Gets the update mode for the device. More...
 
void setUpdateMode (daq::DeviceUpdateMode mode) const
 Sets the update mode for the device. More...
 
daq::ListPtr< daq::IDeviceUpdateOptions > getChildDeviceOptions () const
 Gets the list of child device options for the device. These are used to configure subdevices of the current device. More...
 

Enumeration Type Documentation

◆ DeviceUpdateMode

enum class DeviceUpdateMode : EnumType
strong

Defines how a given device should be updated.

Enumerator
Load 

The device is updated and added if missing.

UpdateOnly 

The device is updated, but not added if missing.

Skip 

The device is not updated. Does neither add nor remove the device.

Remove 

Removes the device from the tree, if present.

Remap 

Same as load, but removes old device (if present) and uses the new manufacturer, serial number, and connection string to add a new one and update.

Function Documentation

◆ getChildDeviceOptions()

daq::ListPtr< daq::IDeviceUpdateOptions > getChildDeviceOptions ( ) const
inline

Gets the list of child device options for the device. These are used to configure subdevices of the current device.

Returns
The list of child device options for the device.

◆ getConnectionString()

daq::StringPtr getConnectionString ( ) const
inline

Gets the connection string of the device, as written in the setup string.

Returns
The connection string of the device.

◆ getLocalId()

daq::StringPtr getLocalId ( ) const
inline

Gets the local ID of the device. The local ID is obtained from the JSON key for the device entry.

Returns
The local ID of the device.

The root device might not have the local ID configured. In this case the local ID will be set to "Root".

◆ getManufacturer()

daq::StringPtr getManufacturer ( ) const
inline

Gets the manufacturer of the device, as written in the setup string.

Returns
The manufacturer of the device.

◆ getNewConnectionString()

daq::StringPtr getNewConnectionString ( ) const
inline

Gets the new connection string of the device to be used for remapping.

Returns
The new connection string of the device to be used for remapping.

The manufacturer and serial number combination has priority over the connection string when remapping.

◆ getNewManufacturer()

daq::StringPtr getNewManufacturer ( ) const
inline

Gets the new manufacturer of the device to be used for remapping.

Returns
The new manufacturer of the device to be used for remapping.

◆ getNewSerialNumber()

daq::StringPtr getNewSerialNumber ( ) const
inline

Gets the new serial number of the device to be used for remapping.

Returns
The new serial number of the device to be used for remapping.

◆ getSerialNumber()

daq::StringPtr getSerialNumber ( ) const
inline

Gets the serial number of the device, as written in the setup string.

Returns
The serial number of the device.

◆ getUpdateMode()

daq::DeviceUpdateMode getUpdateMode ( ) const
inline

Gets the update mode for the device.

Returns
The update mode for the device.

◆ setNewConnectionString()

void setNewConnectionString ( const daq::StringPtr &  connectionString) const
inline

Sets the new connection string of the device to be used for remapping.

Parameters
connectionStringThe new connection string of the device to be used for remapping.

The manufacturer and serial number combination has priority over the connection string when remapping.

◆ setNewManufacturer()

void setNewManufacturer ( const daq::StringPtr &  manufacturer) const
inline

Sets the new manufacturer of the device to be used for remapping.

Parameters
manufacturerThe new manufacturer of the device to be used for remapping.

◆ setNewSerialNumber()

void setNewSerialNumber ( const daq::StringPtr &  serialNumber) const
inline

Sets the new serial number of the device to be used for remapping.

Parameters
serialNumberThe new serial number of the device to be used for remapping.

◆ setUpdateMode()

void setUpdateMode ( daq::DeviceUpdateMode  mode) const
inline

Sets the update mode for the device.

Parameters
modeThe update mode for the device.