Represents an openDAQ device. The device contains a list of signals and physical channels. Some devices support adding function blocks, or connecting to devices. The list of available function blocks/devices can be obtained via the getAvailable
functions, and added via the add
functions.
More...
template<typename InterfaceType>
class GenericDevicePtr< InterfaceType >
Represents an openDAQ device. The device contains a list of signals and physical channels. Some devices support adding function blocks, or connecting to devices. The list of available function blocks/devices can be obtained via the getAvailable
functions, and added via the add
functions.
Devices can be split up into three different types, with each devices supporting one or more:
- Physical devices Physical devices provide access to physical channels. They measure real-world data and send it via packets through output signals of channels. The list of channels can be obtained via
getChannels
as a flat list.
- Client devices Client devices can connect to other devices via their supported connection protocol. openDAQ natively supports connecting to TMS devices via its openDAQ OpcUa Client Module. A list of available devices a client device can connect to can be obtained via
getAvailableDevices
. The addDevice
is used to connect to/add a device.
- Function block devices Function block devices provide a dictionary of available function block types that can be added to them and configured. The calculation of function blocks is done on the device itself. The dictionary of available function block types can be obtained via
getAvailableFunctionBlockTypes
. They can then be added via addFunctionBlock
.
All devices also provide access to their Device information, containing metadata such as the device's serial number, location... They can also be queried for their current domain values (time) through its device domain.
As each device is a property object, a device has access to all Property object methods, allowing each device to expose a list of custom properties such as sample rate, scaling factor and many others. By default, openDAQ devices have the UserName and Location string Properties.
|
daq::DeviceInfoPtr | getInfo () const |
| Gets the device info. It contains data about the device such as the device's serial number, location, and connection string. More...
|
|
daq::DeviceDomainPtr | getDomain () const |
| Gets the device's domain data. It allows for querying the device for its domain (time) values. More...
|
|
daq::GenericFolderPtr< daq::IFolder > | getInputsOutputsFolder () const |
| Gets a folder containing channels. More...
|
|
daq::ListPtr< daq::IComponent > | getCustomComponents () const |
| Gets a list of all components/folders in a device that are not titled 'IO', 'Sig', 'Dev', 'Synchronization' or 'FB'. More...
|
|
daq::ListPtr< daq::ISignal > | getSignals (const daq::SearchFilterPtr &searchFilter=nullptr) const |
| Gets a list of the device's signals. More...
|
|
daq::ListPtr< daq::ISignal > | getSignalsRecursive (const daq::SearchFilterPtr &searchFilter=nullptr) const |
| Gets a list of the signals that belong to the device. More...
|
|
daq::ListPtr< daq::IChannel > | getChannels (const daq::SearchFilterPtr &searchFilter=nullptr) const |
| Gets a flat list of the device's physical channels. More...
|
|
daq::ListPtr< daq::IChannel > | getChannelsRecursive (const daq::SearchFilterPtr &searchFilter=nullptr) const |
| Gets a flat list of the device's physical channels. Also finds all visible channels of visible child devices. More...
|
|
daq::ListPtr< daq::IDevice > | getDevices (const daq::SearchFilterPtr &searchFilter=nullptr) const |
| Gets a list of child devices that the device is connected to. More...
|
|
daq::ListPtr< daq::IDeviceInfo > | getAvailableDevices () const |
| Gets a list of available devices, containing their Device Info. More...
|
|
daq::DictPtr< daq::IString, daq::IDeviceType > | getAvailableDeviceTypes () const |
| Get a dictionary of available device types as <IString, IDeviceType> pairs. More...
|
|
daq::GenericDevicePtr< daq::IDevice > | addDevice (const daq::StringPtr &connectionString, const daq::PropertyObjectPtr &config=nullptr) const |
| Connects to a device at the given connection string and returns it. More...
|
|
void | removeDevice (const daq::GenericDevicePtr< daq::IDevice > &device) const |
| Disconnects from the device provided as argument and removes it from the internal list of devices. More...
|
|
daq::ListPtr< daq::IFunctionBlock > | getFunctionBlocks (const daq::SearchFilterPtr &searchFilter=nullptr) const |
| Gets the list of added function blocks. More...
|
|
daq::DictPtr< daq::IString, daq::IFunctionBlockType > | getAvailableFunctionBlockTypes () const |
| Gets all function block types that are supported by the device, containing their description. More...
|
|
daq::FunctionBlockPtr | addFunctionBlock (const daq::StringPtr &typeId, const daq::PropertyObjectPtr &config=nullptr) const |
| Creates and adds a function block to the device with the provided unique ID and returns it. More...
|
|
void | removeFunctionBlock (const daq::FunctionBlockPtr &functionBlock) const |
| Removes the function block provided as argument, disconnecting its signals and input ports. More...
|
|
daq::StringPtr | saveConfiguration () const |
| Saves the configuration of the device to string. More...
|
|
void | loadConfiguration (const daq::StringPtr &configuration, const daq::UpdateParametersPtr &config=nullptr) const |
| Loads the configuration of the device from string. More...
|
|
daq::UInt | getTicksSinceOrigin () const |
| Gets the number of ticks passed since the device's absolute origin. More...
|
|
daq::StreamingPtr | addStreaming (const daq::StringPtr &connectionString, const daq::PropertyObjectPtr &config=nullptr) const |
| Connects to a streaming at the given connection string, adds it as a streaming source of device and returns created streaming object. More...
|
|
daq::PropertyObjectPtr | createDefaultAddDeviceConfig () const |
| Creates config object that can be used when adding a device. Contains Device and Streaming default configuration for all available Device/Streaming types. Also contains general add-device configuration settings. More...
|
|
daq::SyncComponentPtr | getSyncComponent () const |
| Gets the sync component of the device. More...
|
|
daq::ServerPtr | addServer (const daq::StringPtr &typeId, const daq::PropertyObjectPtr &config) const |
| Creates and adds to the device a server with the provided unique type ID and returns it. More...
|
|
void | removeServer (const daq::ServerPtr &server) const |
| Removes the server provided as argument. More...
|
|
daq::ListPtr< daq::IServer > | getServers () const |
| Get list of added servers. More...
|
|
void | lock () const |
| Lock a device with a session user. Once locked, no properties of the device can be changed via the protocol layer. Only the same user who locked the device can unlock it. If no user was specified when the device was locked, any user will be able to unlock it.
|
|
void | unlock () const |
| Unlock a device with a session user. A device can only be unlocked by the same user who locked it. If no user was specified when the device was locked, any user will be able to unlock it.
|
|
daq::Bool | isLocked () const |
| Returns truee if device is locked. Once locked, no properties of the device can be changed via the protocol layer. More...
|
|
daq::ListPtr< daq::ILogFileInfo > | getLogFileInfos () const |
| Gets a list of available log files. More...
|
|
daq::StringPtr | getLog (const daq::StringPtr &id, daq::Int size=-1, daq::Int offset=0) const |
| Retrieves a chunk of the log file with the provided ID. This function extracts a specified portion (or the entire content) of the log file, starting at the given offset. If the size and offset are not specified, it will attempt to return the entire log file by default. More...
|
|