openDAQ
Open data acquisition platform
GenericDeviceInfoPtr< InterfaceType > Class Template Reference

Contains standard information about an openDAQ device and device type. The Device Info object is a Property Object, allowing for custom String, Int, Bool, or Float-type properties to be added. More...

Detailed Description

template<typename InterfaceType>
class GenericDeviceInfoPtr< InterfaceType >

Contains standard information about an openDAQ device and device type. The Device Info object is a Property Object, allowing for custom String, Int, Bool, or Float-type properties to be added.

The getter methods represent a standardized set of Device properties according to the OPC UA: Devices standard. Any additional String, Int, Bool, or Float-type properties can be added, using the appropriate Property Object "add property" method. Any other types of properties are invalid. Although Integer-type properties are valid additions, Selection properties cannot be added to Device Info.

As the Device Info object adheres to the OPC UA: Devices standard, it behaves differently than standard Property Objects. No metadata except the Value Type and Default Value are published via OPC UA, and this only said Property metadata is visible to any clients.

All fields - default (e.g. platform, manufacturer...) and custom are represented as either:

  • String-type properties
  • Integer-type properties
  • Bool-type properties
  • Float type properties

As such, listing all properties via Property Object methods, will return both the names of the default and custom properties. All default properties are initialized to an empty string except for RevisionCounter and Position that are integer properties and are thus initialized to '0'. The names of the properties are written in camelCase - for example "systemUuid", "parentMacAddress", "manufacturerUri".

If the DeviceInfo object is obtained from a device, or when listing available devices, the object is frozen (immutable). As such, Property Object setter methods cannot be used and will fail when called.

Public Member Functions

daq::StringPtr getName () const
 Gets the name of the device. More...
 
daq::StringPtr getConnectionString () const
 Gets the string representation of a connection address used to connect to the device. More...
 
daq::GenericDeviceTypePtr< daq::IDeviceType > getDeviceType () const
 Gets a device type as an object providing type id, name, short description and default device configuration. By using default config object as a starting point, users can easily modify the preset properties to tailor the configuration of the client device accordingly. More...
 
daq::StringPtr getManufacturer () const
 Gets the company that manufactured the device. More...
 
daq::StringPtr getManufacturerUri () const
 Gets the unique identifier of the company that manufactured the device This identifier should be a fully qualified domain name; however, it may be a GUID or similar construct that ensures global uniqueness. More...
 
daq::StringPtr getModel () const
 Gets the model of the device. More...
 
daq::StringPtr getProductCode () const
 Gets the unique combination of numbers and letters used to identify the device. More...
 
daq::StringPtr getDeviceRevision () const
 Gets the revision level of the device. More...
 
daq::StringPtr getHardwareRevision () const
 Gets the revision level of the hardware. More...
 
daq::StringPtr getSoftwareRevision () const
 Gets the revision level of the software component. More...
 
daq::StringPtr getDeviceManual () const
 Gets the address of the user manual. It may be a pathname in the file system or a URL (Web address) More...
 
daq::StringPtr getDeviceClass () const
 Gets the purpose of the device. For example "TestMeasurementDevice". More...
 
daq::StringPtr getSerialNumber () const
 Gets the unique production number provided by the manufacturer. More...
 
daq::StringPtr getProductInstanceUri () const
 Gets the globally unique resource identifier provided by the manufacturer. The recommended syntax of the ProductInstanceUri is: <ManufacturerUri>/<any string> where <any string> is unique among all instances using the same ManufacturerUri. More...
 
daq::Int getRevisionCounter () const
 Gets the incremental counter indicating the number of times the configuration data has been modified. More...
 
daq::StringPtr getAssetId () const
 Gets the asset ID of the device. Represents a user writable alphanumeric character sequence uniquely identifying a component. More...
 
daq::StringPtr getMacAddress () const
 Gets the Mac address of the device. More...
 
daq::StringPtr getParentMacAddress () const
 Gets the Mac address of the device's parent. More...
 
daq::StringPtr getPlatform () const
 Gets the platform of the device. The platform specifies whether real hardware is used or if the device is simulated. More...
 
daq::Int getPosition () const
 Gets the position of the device. The position specifies the position within a given system. For example in which slot or slice the device is in. More...
 
daq::StringPtr getSystemType () const
 Gets the system type. The system type can, for example, be LayeredSystem, StandaloneSystem, or RackSystem. More...
 
daq::StringPtr getSystemUuid () const
 Gets the system UUID that represents a unique ID of a system. All devices in a system share this UUID. More...
 
daq::ListPtr< daq::IString > getCustomInfoPropertyNames () const
 Gets the list of property names that are not in the default set of Device info properties. Default properties are all info properties that have a corresponding getter method. More...
 
daq::StringPtr getSdkVersion () const
 Gets the version of the SDK used to build said device. Can be empty if the device does not use the SDK as its firmware/is implemented at a protocol-level. More...
 
daq::ListPtr< daq::IServerCapability > getServerCapabilities () const
 Gets the list of server capabilities stored in device info. More...
 
daq::StringPtr getLocation () const
 Gets the location of the device. More...
 
daq::ServerCapabilityPtr getConfigurationConnectionInfo () const
 Retrieves the configuration connection information of the server to which the client is connected. More...
 
daq::Bool hasServerCapability (const daq::StringPtr &protocolId) const
 Checks whether the server capability with a given ID is available. More...
 
daq::ServerCapabilityPtr getServerCapability (const daq::StringPtr &protocolId) const
 Gets the server capability with a given ID. More...
 

Member Function Documentation

◆ getAssetId()

daq::StringPtr getAssetId ( ) const
inline

Gets the asset ID of the device. Represents a user writable alphanumeric character sequence uniquely identifying a component.

Returns
The asset ID of the device.

The ID is provided by the integrator or user of the device. It contains typically an identifier in a branch, use case or user specific naming scheme. This could be for example a reference to an electric scheme. The ID must be a string representation of an Int32 number.

◆ getConfigurationConnectionInfo()

daq::ServerCapabilityPtr getConfigurationConnectionInfo ( ) const
inline

Retrieves the configuration connection information of the server to which the client is connected.

Returns
The server capability with the configuration connection information.

This method returns the configuration connection information of the server to which the client is connected. If the connection to the server is not established, the fields of the server capability object are empty.

◆ getConnectionString()

daq::StringPtr getConnectionString ( ) const
inline

Gets the string representation of a connection address used to connect to the device.

Returns
The string used to connect to the device.

◆ getCustomInfoPropertyNames()

daq::ListPtr<daq::IString> getCustomInfoPropertyNames ( ) const
inline

Gets the list of property names that are not in the default set of Device info properties. Default properties are all info properties that have a corresponding getter method.

Returns
The list of names of custom properties.

◆ getDeviceClass()

daq::StringPtr getDeviceClass ( ) const
inline

Gets the purpose of the device. For example "TestMeasurementDevice".

Returns
The class of the device.

◆ getDeviceManual()

daq::StringPtr getDeviceManual ( ) const
inline

Gets the address of the user manual. It may be a pathname in the file system or a URL (Web address)

Returns
The manual of the device.

◆ getDeviceRevision()

daq::StringPtr getDeviceRevision ( ) const
inline

Gets the revision level of the device.

Returns
The device revision level.

◆ getDeviceType()

daq::GenericDeviceTypePtr<daq::IDeviceType> getDeviceType ( ) const
inline

Gets a device type as an object providing type id, name, short description and default device configuration. By using default config object as a starting point, users can easily modify the preset properties to tailor the configuration of the client device accordingly.

Returns
The device type object

◆ getHardwareRevision()

daq::StringPtr getHardwareRevision ( ) const
inline

Gets the revision level of the hardware.

Returns
The hardware revision of the device.

◆ getLocation()

daq::StringPtr getLocation ( ) const
inline

Gets the location of the device.

Returns
The location of the device.

If the info object is obtained from a device that is already added (not through discovery), the location string value matches that of the device's "location" property.

◆ getMacAddress()

daq::StringPtr getMacAddress ( ) const
inline

Gets the Mac address of the device.

Returns
The Mac address.

◆ getManufacturer()

daq::StringPtr getManufacturer ( ) const
inline

Gets the company that manufactured the device.

Returns
The manufacturer of the device.

◆ getManufacturerUri()

daq::StringPtr getManufacturerUri ( ) const
inline

Gets the unique identifier of the company that manufactured the device This identifier should be a fully qualified domain name; however, it may be a GUID or similar construct that ensures global uniqueness.

Returns
The manufacturer uri of the device.

◆ getModel()

daq::StringPtr getModel ( ) const
inline

Gets the model of the device.

Returns
The model of the device.

◆ getName()

daq::StringPtr getName ( ) const
inline

Gets the name of the device.

Returns
The name of the device.

If the info object is obtained from a device that is already added (not through discovery), the name string value matches that of the device's "Name" attribute.

◆ getParentMacAddress()

daq::StringPtr getParentMacAddress ( ) const
inline

Gets the Mac address of the device's parent.

Returns
The parent's Mac address.

◆ getPlatform()

daq::StringPtr getPlatform ( ) const
inline

Gets the platform of the device. The platform specifies whether real hardware is used or if the device is simulated.

Returns
The platform of the device.

◆ getPosition()

daq::Int getPosition ( ) const
inline

Gets the position of the device. The position specifies the position within a given system. For example in which slot or slice the device is in.

Returns
The position of the device.

The Position should be a positive integer in the range supported by the UInt16 data type.

◆ getProductCode()

daq::StringPtr getProductCode ( ) const
inline

Gets the unique combination of numbers and letters used to identify the device.

Returns
The product code of the device.

◆ getProductInstanceUri()

daq::StringPtr getProductInstanceUri ( ) const
inline

Gets the globally unique resource identifier provided by the manufacturer. The recommended syntax of the ProductInstanceUri is: <ManufacturerUri>/<any string> where <any string> is unique among all instances using the same ManufacturerUri.

Returns
The product instance uri of the device.

◆ getRevisionCounter()

daq::Int getRevisionCounter ( ) const
inline

Gets the incremental counter indicating the number of times the configuration data has been modified.

Returns
The revision counter of the device.

◆ getSdkVersion()

daq::StringPtr getSdkVersion ( ) const
inline

Gets the version of the SDK used to build said device. Can be empty if the device does not use the SDK as its firmware/is implemented at a protocol-level.

Returns
The SDK version.

◆ getSerialNumber()

daq::StringPtr getSerialNumber ( ) const
inline

Gets the unique production number provided by the manufacturer.

Returns
The serial number of the device.

◆ getServerCapabilities()

daq::ListPtr<daq::IServerCapability> getServerCapabilities ( ) const
inline

Gets the list of server capabilities stored in device info.

Returns
The list of device supported protocols * (List containing IServerCapability objects, representing the supported protocols along with their properties).

◆ getServerCapability()

daq::ServerCapabilityPtr getServerCapability ( const daq::StringPtr &  protocolId) const
inline

Gets the server capability with a given ID.

Parameters
protocolIdThe ID of the server capability protocol.
Returns
The server capability with the given ID.
Exceptions
NotFoundExceptionif the server capability is not available.

◆ getSoftwareRevision()

daq::StringPtr getSoftwareRevision ( ) const
inline

Gets the revision level of the software component.

Returns
The software revision of the device.

◆ getSystemType()

daq::StringPtr getSystemType ( ) const
inline

Gets the system type. The system type can, for example, be LayeredSystem, StandaloneSystem, or RackSystem.

Returns
The system type of the device.

◆ getSystemUuid()

daq::StringPtr getSystemUuid ( ) const
inline

Gets the system UUID that represents a unique ID of a system. All devices in a system share this UUID.

Returns
The unique ID of a system.

◆ hasServerCapability()

daq::Bool hasServerCapability ( const daq::StringPtr &  protocolId) const
inline

Checks whether the server capability with a given ID is available.

Parameters
protocolIdThe ID of the server capability protocol.
Returns
True if the protocol is available; False otherwise.