Expand description
Safe Rust bindings for openDAQ, the open-source data acquisition SDK.
The bindings sit on openDAQ’s flat C API (the copendaq library), loaded
dynamically at runtime: building this crate needs no openDAQ SDK, headers,
or C toolchain. Prebuilt native libraries for x64 Linux, x64 Windows, and
ARM macOS are downloaded automatically on first use (only for your
platform, ~15 MB) and cached per user; see the crate README for the search
order and the environment variables that control it.
§Quickstart
use opendaq::{Instance, StreamReader};
fn main() -> opendaq::Result<()> {
let instance = Instance::new()?;
for device in instance.available_devices()? {
println!(" - {}", device.connection_string()?);
}
let device = instance.add_device("daqref://device0")?.expect("device");
let channel = instance
.find_component("Dev/RefDev0/IO/AI/RefCh0")?
.expect("reference channel not found")
.cast::<opendaq::Channel>()?;
let signal = &channel.signals()?[0];
let reader = StreamReader::<f64>::new(signal)?;
device.set_property_value("GlobalSampleRate", 100)?;
channel.set_property_value("Frequency", 0.5)?;
let samples = reader.read(100, 2000)?;
println!("{samples:?}");
Ok(())
}Re-exports§
pub use sys::daqIntfID as IntfID;pub use crate::sys::AddressReachabilityStatus;pub use crate::sys::ComponentTypeSort;pub use crate::sys::CoreEventId;pub use crate::sys::CoreType;pub use crate::sys::DataRuleType;pub use crate::sys::DeviceUpdateMode;pub use crate::sys::DimensionRuleType;pub use crate::sys::LockingStrategy;pub use crate::sys::LogLevel;pub use crate::sys::OperationModeType;pub use crate::sys::PacketReadyNotification;pub use crate::sys::PacketType;pub use crate::sys::Permission;pub use crate::sys::PropertyEventType;pub use crate::sys::PropertyType;pub use crate::sys::ProtocolType;pub use crate::sys::ReadMode;pub use crate::sys::ReadStatus;pub use crate::sys::ReadTimeoutType;pub use crate::sys::SampleType;pub use crate::sys::ScaledSampleType;pub use crate::sys::ScalingType;pub use crate::sys::SubscriptionEventType;pub use crate::sys::TimeProtocol;pub use crate::sys::UsesOffset;
Modules§
- sys
- Low-level FFI surface of the openDAQ flat C API.
Structs§
- Address
Info - @ingroup opendaq_server_capability
@addtogroup opendaq_address_info Address info
Wrapper over the openDAQ
daqAddressInfointerface. - Address
Info Builder - @ingroup opendaq_server_capability
@addtogroup opendaq_address_info Address info
Wrapper over the openDAQ
daqAddressInfoBuilderinterface. - Address
Info Private - Wrapper over the openDAQ
daqAddressInfoPrivateinterface. - Allocator
- An allocator used to allocate memory.
The default BB allocator simply uses
malloc, but the user can implement a custom allocator to override this behavior (perhaps using a memory pool or different allocation strategy). An example/reference implementation is provided which uses Microsoftmimalloc. Wrapper over the openDAQdaqAllocatorinterface. - Argument
Info - Provides the name and type of a single function/procedure argument
Usually part of a list of arguments in a Callable info object.
Argument info objects implement the Struct methods internally and are Core type
ctStruct. Wrapper over the openDAQdaqArgumentInfointerface. - Authentication
Provider - A class which is responsible for authenticating a user. The authentication is usually done by verifying the username and password. An authenticator implementation might use external services for achieving that. It might make a call to an external database, do a lookup to a json file with defined users or it might simply check the password against a hardcoded one.
Wrapper over the openDAQ
daqAuthenticationProviderinterface. - Awaitable
- @ingroup opendaq_scheduler_components
@addtogroup opendaq_awaitable Awaitable
Wrapper over the openDAQ
daqAwaitableinterface. - Base
Object - The root of the openDAQ interface hierarchy (
IBaseObject). - Batched
Property Update - Batches property writes into one update per bracketed object (RAII over
beginUpdate/endUpdate). - Binary
Data - Represents binary large object (BLOB).
Binary data is just a continuously allocated memory of a specific size. A client can get a pointer to
internal buffer and size it.
Wrapper over the openDAQ
daqBinaryDatainterface. - Block
Reader - A reader that returns samples in whole blocks of a fixed size.
- Block
Reader Status - IBlockReaderStatus inherits from IReaderStatus to expand information returned read function
Wrapper over the openDAQ
daqBlockReaderStatusinterface. - Boolean
Object - Represents boolean variable as
IBooleaninterface. Use this interface to wrap boolean variable when you need to add the variable to lists, dictionaries and other containers which acceptIBaseObjectinterface. Available factories: - Callable
Info - Provides information about the argument count and types, as well as the return type of Function/Procedure-type properties.
A callable should be invoked with the parameter types specified in the
argumentsfield, in the order listed. A Procedure-type Property will not have a return type configured in its Callable info field. Argument info objects implement the Struct methods internally and are Core typectStruct. Wrapper over the openDAQdaqCallableInfointerface. - Channel
- Channels represent physical sensors of openDAQ devices. Internally they are standard function blocks with an additional option to provide a list of tags.
Wrapper over the openDAQ
daqChannelinterface. - Cloneable
- Objects that can be cloned implement this interface.
Wrapper over the openDAQ
daqCloneableinterface. - Coercer
- Used by openDAQ properties to coerce a value to match the restrictions imposed by the Property.
Whenever a value is set to on a Property object, if the corresponding Property has a coercer configured, the value will
be evaluated and modified to fit the restrictions imposed by the coercer. For example, a coercer can enforce lower-than,
greater-than, equality, or other number relations on written values.
The coercion conditions are configured with an evaluation string when the coercer is constructed. The string constructs an
Eval value that replaces any instance of the keyword “value” or “val” with the value being set. The result of the Eval
value evaluation is the output of the
coercefunction call. For example, coercers created with the string “if(value > 5, 5, value)” would enforce that the property value is always equal to or lower than 5. Wrapper over the openDAQdaqCoercerinterface. - Comparable
- Enables comparison to another object.
Use this interface to compare the object to another object. his interface is implemented by types
whose values can be ordered or sorted. It requires that implementing types define a single method,
compareTo, that indicates whether the position of the current instance in the sort order is before, after, or the same as a second object of the same type. Wrapper over the openDAQdaqComparableinterface. - Complex
- A complex number (openDAQ
IComplexNumber). - Complex
Number Object - Represents a complex number as
IComplexNumberinterface. Use this interface to wrap complex number when you need to add the number to lists, dictionaries and other containers which acceptIBaseObjectand derived interfaces. Complex numbers have two components: real and imaginary. Both of them are of Float type. Available factories: - Component
- Acts as a base interface for components, such as device, function block, channel and signal.
The IComponent provides a set of methods that are common to all components:
LocalID, GlobalID and Active properties.
Wrapper over the openDAQ
daqComponentinterface. - Component
Deserialize Context - Wrapper over the openDAQ
daqComponentDeserializeContextinterface. - Component
Holder - Wrapper over the openDAQ
daqComponentHolderinterface. - Component
Private - Provides access to private methods of the component.
Said methods allow for triggering a Core event of the component, and locking/unlocking attributes of
the component.
Wrapper over the openDAQ
daqComponentPrivateinterface. - Component
Status Container - A container of Component Statuses and their corresponding values.
Each status has a unique name and represents an actual status related to the openDAQ Component,
such as connection status, synchronization status, etc. The statuses’ values are represented
by Enumeration objects.
Wrapper over the openDAQ
daqComponentStatusContainerinterface. - Component
Status Container Private - Provides access to private methods of the Component status container.
Said methods allow for adding new statuses and setting a value for existing statuses stored in
the component status container. Device connection statuses, however, are managed independently
via IConnectionStatusContainerPrivate.
“StatusChanged” Core events are triggered whenever there is a change in the status of the openDAQ Component.
Wrapper over the openDAQ
daqComponentStatusContainerPrivateinterface. - Component
Type - Provides information about the component types.
Is a Struct core type, and has access to Struct methods internally. Note that the Default config is not part of
the Struct fields.
Wrapper over the openDAQ
daqComponentTypeinterface. - Component
Type Builder - Builder component of Component type objects. Contains setter methods to configure the Component type parameters, and a
buildmethod that builds the object. Depending on the set “Type” builder parameter, a different Component type is created - eg. Streaming type, Device type, Function block type, or Server type Wrapper over the openDAQdaqComponentTypeBuilderinterface. - Component
Type Private - Private interface to component type. Allows for setting the module information.
Wrapper over the openDAQ
daqComponentTypePrivateinterface. - Component
Update Context - @ingroup types_utility
@defgroup types_updatable Updatable
Wrapper over the openDAQ
daqComponentUpdateContextinterface. - Config
Provider - Config provider is an interface that was made for populating an options dictionary of an instance builder from external sources like a config file, environment variables, or command line arguments. The process of population of the dictionary have to be alligned with rules: - all keys are set in lowercase. Values are set without case changes. - if a provider is trying to override an existing value, it has to have the same type. For example provider can not replace integer value with string or object with list - if a provider is overriding a list, it replaces old list items with a new one.
Wrapper over the openDAQ
daqConfigProviderinterface. - Connected
Client Info - @ingroup opendaq_server_capability
@addtogroup opendaq_connected_client_info Connected client info
Wrapper over the openDAQ
daqConnectedClientInfointerface. - Connection
- Represents a connection between an Input port and Signal. Acts as a queue for packets sent by the signal, which can be read by the input port and the input port’s owner.
The Connection provides standard queue methods, allowing for packets to be put at the back
of the queue, and popped from the front. Additionally, the front packet can be inspected via
peek, and the number of queued packets can be obtained throughgetPacketCount. The Connection has a reference to the connected Signal and Input port. Wrapper over the openDAQdaqConnectioninterface. - Connection
Internal - @ingroup opendaq_signal_path
@addtogroup opendaq_connection ConnectionInternal
Wrapper over the openDAQ
daqConnectionInternalinterface. - Connection
Status Container Private - Provides access to private methods for managing the Device’s connection statuses.
Enables adding, removing, and updating statuses stored in the connection status container.
Statuses are identified by unique connection strings and can be accessed via
IComponentStatusContainer using name aliases. A configuration status, accessible via alias “ConfigurationStatus”,
is unique per container and cannot be removed if added.
On the other hand, multiple streaming statuses are supported, one per each streaming source attached to the device.
Aliases for these follow the pattern “StreamingStatus_n,” with optional protocol-based prefixes (e.g.,
“OpenDAQNativeStreamingStatus_1”, “OpenDAQLTStreamingStatus_2”, “StreamingStatus_3” etc.).
“ConnectionStatusChanged” Core events are triggered whenever there is a change in the connection status of the openDAQ Device,
including parameters such as status name alias, value, protocol type, connection string, and streaming
object (nullptr for configuration statuses). Removing streaming statuses also triggers said Core event with
“Removed” as the value and nullptr for the streaming object parameters.
Wrapper over the openDAQ
daqConnectionStatusContainerPrivateinterface. - Context
- The Context serves as a container for the Scheduler and Logger. It originates at the instance, and is passed to the root device, which forwards it to components such as function blocks and signals.
Note: The context holds a strong reference to the Module Manager until the reference is moved via the
ContextInternal move function. The strong reference moved to an external owner to avoid memory leaks
due to circular references. This is done automatically when the Context is used in the openDAQ Instance
constructor.
Wrapper over the openDAQ
daqContextinterface. - Context
Internal - Internal Context interface used for transferring the Module Manager reference to a new owner.
Wrapper over the openDAQ
daqContextInternalinterface. - Convertible
- Enables conversion of the object to either Int, Float, or Bool type.
An object which implements
IIntObjectwill typically also implement IConvertible, which allows conversion to other types. Example: - Core
Event Args - Arguments object that defines a Core event type, and provides a set of parameters specific to a given event type.
Core events are triggered whenever a change in the openDAQ core structure happens. This includes changes to property values,
addition/removal of child components, connecting signals to input ports and others. The event type can be identified
via the event ID available within the CoreEventArgs object. Each event type has a set of predetermined parameters
available in the
parametersfield of the arguments. These can be used by any openDAQ server, or other listener to react to changes within the core structure. Notably, core events trigger only on components that are reachable from the root of the openDAQ tree. Actions such as adding properties during the creation of a function block will not trigger the event - only attaching the function block to the tree will. Subsequent modification of the function block’s properties, however, will trigger events, as the function block is then reachable from the root. The Core Event object can be obtained from the Context object created by the Instance that is available to any component within the openDAQ tree structure. @subsection opendaq_core_events_types Core event types This section provides a list of core event types, when they are triggered, as well as their parameter content. @subsubsection opendaq_core_event_types_value_changed Property value changed Event triggered whenever a value of a component’s property is changed. It triggers after the PropertyObject’s and Property’sonValueWriteEvent, providing the value of the property after said events are finished processing. The Property value changed core event does not trigger when updating a component viaupdate, and whenbeginUpdatehas been called. The “owner” parameter is used to determine whether the change was triggered from within a nested object-type property of the sender component. The parameters dictionary contains: - Core
Type Object - Wrapper over the openDAQ
daqCoreTypeObjectinterface. - Data
Descriptor - Describes the data sent by a signal, defining how they are to be interpreted by anyone receiving the signal’s packets. The data descriptor provides all information required on how to process data buffers, and how to interpret the data. It contains the following fields:
- Data
Descriptor Builder - Builder component of Data descriptor objects. Contains setter methods that allow for Data descriptor parameter configuration, and a
buildmethod that builds the Data descriptor. Wrapper over the openDAQdaqDataDescriptorBuilderinterface. - Data
Packet - Packet that contains data sent by a signal. The data can be either explicit, or implicit.
Explicit data is contained within a signal’s buffer, accessible through
getRawData, while implicit packets do not carry any data. Their values are calculated given a rule, packet offset, and the index of a sample within the data buffer. To obtain implicitly calculated, or scaled values,getDatashould be used. The data descriptor and sample count provide information about the type and amount of data available at the obtained address. Wrapper over the openDAQdaqDataPacketinterface. - Data
Rule - Rule that defines how a signal value is calculated from an implicit initialization value when the rule type is not
Explicit. Data rule objects implement the Struct methods internally and are Core typectStruct. @subsection data_rule_explicit Explicit rule When the rule type of the Data rule is set toExplicit, the values passed through the signal path, described by the Value descriptor are stored in packet buffers. The Explicit rule can have 2 optional parameters: - Data
Rule Builder - Configuration component of Data rule objects. Contains setter methods that allow for Data rule parameter configuration, and a
buildmethod that builds the Data rule. Wrapper over the openDAQdaqDataRuleBuilderinterface. - Deleter
- Callback which is called when external memory is no longer needed and can be freed.
This interface is used with blueberry packets that are created with external memory. Provider
of external memory is responsible to provide a custom deleter, which is called when the packet is
destroyed.
Wrapper over the openDAQ
daqDeleterinterface. - Deserialize
Component - Wrapper over the openDAQ
daqDeserializeComponentinterface. - Deserializer
- Wrapper over the openDAQ
daqDeserializerinterface. - Device
- 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
getAvailablefunctions, and added via theaddfunctions. Devices can be split up into three different types, with each devices supporting one or more: - Device
Domain - Contains information about the domain of the device.
The device domain contains a general view into the device’s domain data. While devices most often operate
in the time domain, this interface allows for description of any other domain commonly used in signal processing.
For example, common domains include the angle domain, frequency domain, the spatial domain, and the wavelet domain.
The device domain allows for users to query a device for its current domain value via
getTicksSinceOriginand convert that into its domain unit by multiplying the tick count with the resolution. To get the absolute domain value, we can then also add the value to the Origin, which is most often provided as a time epoch in the ISO 8601 format. Note that all devices might note provide a device domain implementation. Such devices cannot be directly queried for their domain data. In such a case, the domain data can be obtained through the device’s output signals. Wrapper over the openDAQdaqDeviceDomaininterface. - Device
Info - 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:
- Device
Info Config - Configuration component of Device info objects. Contains setter methods that are available until the object is frozen.
Device info config contains functions that allow for the configuration of Device info objects.
The implementation of
configalso implements thefreezefunction that freezes the object making it immutable. Once frozen, the setter methods fail as the object can no longer be modified. Wrapper over the openDAQdaqDeviceInfoConfiginterface. - Device
Info Internal - @ingroup opendaq_devices
@addtogroup opendaq_device_info Device info internal
Wrapper over the openDAQ
daqDeviceInfoInternalinterface. - Device
Network Config - Interface for managing device network configuration information and settings.
The interface is typically used by the discovery server, if present, to obtain the necessary
information for advertising the device’s network configuration capabilities and handling related requests.
The device must be designated as the root device to enable the use of this interface’s methods.
Wrapper over the openDAQ
daqDeviceNetworkConfiginterface. - Device
Private - @ingroup opendaq_devices
@addtogroup opendaq_device Device private
Wrapper over the openDAQ
daqDevicePrivateinterface. - Device
Type - Provides information on what device type can be created by a given module. Can be used to obtain the default configuration used when either adding/creating a new device.
Wrapper over the openDAQ
daqDeviceTypeinterface. - Device
Update Options - Allows for specifying how a device and its subdevices are to be updated when loading a configuration. The device options object can be created using a serialized openDAQ JSON setup. The options are structured hierarchically, so that options for subdevices are stored in the parent device options. The following metadata is read from the setup: local ID, manufacturer, serial number, and connection string. For each individual device in the setup, the update mode can be specified. The update mode defines how the device is updated when loading:
- Dict
Element Type - Interface enabling introspection into the expected key and value types of the dictionary.
Wrapper over the openDAQ
daqDictElementTypeinterface. - Dict
Object - Represents a collection of key/value pairs.
Wrapper over the openDAQ
daqDictinterface. - Dimension
- Describes a dimension of the signal’s data. Eg. a column/row in a matrix.
Dimension objects define the size and labels of a single data dimension. Labels, in concert
with the unit, provide information about the position of data in a structure. For example, for vector
rank data in a frequency domain, the unit would be Hz, and the labels would range from the minimum to the maximum
frequency of the spectrum.
The number of dimensions a sample descriptor defines the rank of the signals data. When no dimensions are
present, one sample is a single value. When there’s one dimension, a sample contains a vector of values,
when there are three a sample contains a matrix. Higher ranks of data can be represented by adding more
dimension objects to a sample descriptor.
The labels can be defined with a Rule (in example a linear rule with a coefficient and offset), where the
the data index is the input to the rule. In example
A Linear rule with coefficient = 5, offset = 10, size = 5 provides the following list of labels:
[10, 15, 20, 25, 30]
To specify the labels can explicitly, the List dimension rule can be used. The list rule allows for a list of
numbers, strings, or ranges to be used as the dimension labels.
Dimension objects implement the Struct methods internally and are Core type
ctStruct. Wrapper over the openDAQdaqDimensioninterface. - Dimension
Builder - Configuration component of Dimension objects. Contains setter methods that allow for Dimension parameter configuration, and a
buildmethod that builds the Dimension. Wrapper over the openDAQdaqDimensionBuilderinterface. - Dimension
Rule - Rule that defines the labels (alternatively called bins, ticks) of a dimension.
Each dimension has a rule, which is queried and parsed by the dimension
getLabelsandgetSizecalls. Three different rule types are supported by openDAQ, with all others having to be set tocustomtype, requiring anyone using them to parse them manually. Dimension rule objects implement the Struct methods internally and are Core typectStruct. @subsection dimension_rule_types Rule types @subsubsection linear_dimension_rule Linear dimension rule The parameters include adelta,start, andsizenumber members. The list of labels of sizesizeis generated by the equation: <em>index * delta + start</em>, where the index starts with 0 and goes up tosize - 1. In example:delta = 10, start = 5, size = 5produces the following list of samples -> [5, 15, 25, 35, 45] @subsubsection logarithmic_dimension_rule Logarithmic dimension rule The parameters include adelta,start,baseandsizenumber members. The list of labels of sizesizeis generated by the equation: <em>base ^ (index * delta + start)</em>, where the index starts with 0 and goes up tosize - 1. In example:delta = 1, start = -2, base = 10 size = 5produces the following list of samples -> [0.01, 0.1, 1, 10, 20] @subsubsection list_dimension_rule List dimension rule The parameters include alistlist-typed member. Thelistcontains labels, implicitly also defining the dimension size. The labels in the list can be either strings, numbers, or ranges. String example list:list= [“banana”, “apple”, “coconut”] Number example list: = [1.2, 10.5, 20.2, 50.7] Range example list: [1-10, 10-20, 20-30, 30-40, 40-50] Wrapper over the openDAQdaqDimensionRuleinterface. - Dimension
Rule Builder - Configuration component of Dimension rule objects. Contains setter methods that allow for Dimension rule parameter configuration, and a
buildmethod that builds the Dimension rule. Wrapper over the openDAQdaqDimensionRuleBuilderinterface. - Discovery
Server - @ingroup opendaq_utility
@addtogroup opendaq_discovery_service Discovery service
Wrapper over the openDAQ
daqDiscoveryServerinterface. - EndUpdate
Event Args - Wrapper over the openDAQ
daqEndUpdateEventArgsinterface. - Enumeration
- Enumerations are immutable objects that encapsulate a value within a predefined set of named integral constants. These constants are predefined in an Enumeration type with the same name as the Enumeration.
The Enumeration types are stored within a Type Manager. In any given Instance of openDAQ, a single Type Manager should
exist that is part of its Context.
When creating an Enumeration object, the Type Manager is used to validate the given enumerator value name against the
Enumeration type stored within the Manager. If no type with the given Enumeration name is currently stored,
construction of the Enumeration object will fail. Similarly, if the provided enumerator value name is not part of
the Enumeration type, the construction of the Enumeration object will also fail.
Since the Enumerations objects are immutable the value of an existing Enumeration object cannot be modified.
However, the Enumeration object encapsulated by a smart pointer of the corresponding type can be replaced
with a newly created one. This replacement is accomplished using the assignment operator with the right
operand being a constant string literal containing the enumerator value name valid for the Enumeration type
of the original Enumeration object.
Wrapper over the openDAQ
daqEnumerationinterface. - Enumeration
Type - Enumeration types define the enumerator names and values of Enumerations with a name matching that of the Enumeration type.
An Enumeration type provides a String-type name, a list of enumerator names (list of Strings) and
a list of enumerator values (list of Integer objects). To use Enumeration types for creating Enumeration
objects, they must be added to the Type Manager. Alternatively, if an Enumeration is created without
a matching Enumeration type in the manager, a default Enumeration type is generated based on the
enumerator names and values of the created Enumeration object. This generated Enumeration type is then
added to the Type Manager.
The enumerator values are represented as a list of Integer objects. These values can be explicitly specified
during Enumeration type creation, or only the first enumerator value can be specified, with the rest
automatically assigned in ascending order, starting from that value (or from the default ‘0’ value if not
specified).
Wrapper over the openDAQ
daqEnumerationTypeinterface. - Error
- A failed openDAQ call: the raw status code, the C function that produced it, and the descriptive message from openDAQ’s error info, when available.
- Error
Info - Wrapper over the openDAQ
daqErrorInfointerface. - Eval
Value - Dynamic expression evaluator
Provides dynamic evaluation of expressions. Expression is passed as an argument to a
factory function. Expression is evaluated at runtime when result value is requested.
Wrapper over the openDAQ
daqEvalValueinterface. - Event
- @ingroup types_events
@defgroup types_event Event
Wrapper over the openDAQ
daqEventinterface. - Event
Args - @ingroup types_events
@defgroup types_event_args EventArgs
Wrapper over the openDAQ
daqEventArgsinterface. - Event
Handler - @ingroup types_events
@defgroup types_event_handler EventHandler
Wrapper over the openDAQ
daqEventHandlerinterface. - Event
Packet - As with Data packets, Event packets travel along the signal paths. They are used to notify recipients of any relevant changes to the signal sending the packet.
Wrapper over the openDAQ
daqEventPacketinterface. - Float
Object - Wrapper over the openDAQ
daqFloatObjectinterface. - Folder
- Acts as a container for other components
Other components use the folder component to organize the children components,
such as channels, signals, function blocks, etc.
Wrapper over the openDAQ
daqFolderinterface. - Folder
Config - Allows write access to folder.
Provides methods to add and remove items to the folder.
Wrapper over the openDAQ
daqFolderConfiginterface. - Freezable
- Transforms a mutable object to an immutable object.
If an object supports IFreezable interface, it is possible to transform it to immutable object.
Once the object is frozen, it should not allow to change any of its properties or internal state.
Wrapper over the openDAQ
daqFreezableinterface. - Function
Block - Function blocks perform calculations on inputs/generate data, outputting new data in its output signals as packets.
Each function block describes its behaviour and identifiers in its FunctionBlockType structure. It
provides a list of input ports that can be connected to signals that the input port accepts, as well as a
list of output signals that carry the function block’s output data.
Additionally, as each function block is a property object, it can define its own set of properties, providing
user-configurable settings. In example, a FFT function block would expose a
blockSizeproperty, defining the amount of samples to be used for calculation in each block. Function blocks also provide a status signal, through which a status packet is sent whenever a connection to a new input port is formed, or when the status changes. Wrapper over the openDAQdaqFunctionBlockinterface. - Function
Block Type - Provides information about the function block.
Wrapper over the openDAQ
daqFunctionBlockTypeinterface. - Function
Object - Wrapper over the openDAQ
daqFunctioninterface. - Graph
Visualization - Represents a way to get a string representation of a graph usually in some diagram description language like DOT, mermaid or D2.
Wrapper over the openDAQ
daqGraphVisualizationinterface. - Input
Port - Signals accepted by input ports can be connected, forming a connection between the input port and signal, through which Packets can be sent.
Any openDAQ object which wishes to receive signal data must create an input port and connect it to said
signals. Such objects are for example function blocks, and readers.
An input port can filter out incompatible signals by returning false when such a signal is passed as argument
to
acceptsSignal, and also rejects the signals when they are passed as argument toconnect. Depending on the configuration, an input port might not require a signal to be connected, returning false whenrequiresSignalis called. Such input ports are usually a part of function blocks that do not require a given signal to perform calculations. Wrapper over the openDAQdaqInputPortinterface. - Input
Port Config - The configuration component of input ports. Provides access to Input port owners to internal components of the input port.
Wrapper over the openDAQ
daqInputPortConfiginterface. - Input
Port Notifications - Notifications object passed to the input port on construction by its owner (listener).
Input ports invoke the notification functions within the Input port notifications object when corresponding
events occur. The listener can then react on those events.
Wrapper over the openDAQ
daqInputPortNotificationsinterface. - Input
Port Private - Internal functions used by openDAQ core. This interface should never be used in client SDK or module code.
Wrapper over the openDAQ
daqInputPortPrivateinterface. - Inspectable
- Wrapper over the openDAQ
daqInspectableinterface. - Instance
- The top-level openDAQ object. It acts as container for the openDAQ context and the base module manager.
It forwards all Device and PropertyObject calls to the current root device, making the calls on the Instance
and root device equivalent.
On creation, it creates a Client device - a default device implementation that can load any function blocks
present in the module manager search path. If the native openDAQ client-module is loaded, the Client device
can connect to any TMS enabled device by using the
addDevicefunction. The Client is set as the root device when the instance is created. Wrapper over the openDAQdaqInstanceinterface. - Instance
Builder - Builder component of Instance objects. Contains setter methods to configure the Instance parameters, such as Context (Logger, Scheduler, ModuleManager) and RootDevice. Contains a
buildmethod that builds the Instance object. The InstanceBuilder provides a fluent interface for setting various configuration options for an Instance object before its creation. It allows customization of the logger, module manager, scheduler and root device. Once configured, calling thebuildmethod returns a fully initialized Instance object with the specified settings. @subsection Configuration Methods: The InstanceBuilder provides the following configuration methods: - Integer
Object - Represents int number as
IIntegerinterface. Use this interface to wrap integer variable when you need to add the number to lists, dictionaries and other containers which acceptIBaseObjectand derived interfaces. Available factories: - IoFolder
Config - Acts as a container for channels and other io folders.
Every device has an IO folder, which allows only other IO folders and
channels as children.
Wrapper over the openDAQ
daqIoFolderConfiginterface. - Iterable
- An iterable object can construct iterators and use them to iterate through items.
Use this interface to get the start and end iterators. Use iterators to iterate through
available items. Containers such as lists and dictionaries usually implement this interface.
Wrapper over the openDAQ
daqIterableinterface. - Last
Message Logger Sink Private - Wrapper over the openDAQ
daqLastMessageLoggerSinkPrivateinterface. - List
Element Type - Interface enabling introspection into the expected element type of the list.
Wrapper over the openDAQ
daqListElementTypeinterface. - List
Object - Represents a heterogeneous collection of objects that can be individually accessed by index.
Wrapper over the openDAQ
daqListinterface. - Lock
Guard - Interface for lock guard objects.
Wrapper over the openDAQ
daqLockGuardinterface. - LogFile
Info - @ingroup opendaq_log_file_info
@addtogroup opendaq_log_file_info log_file_info
Wrapper over the openDAQ
daqLogFileInfointerface. - LogFile
Info Builder - @ingroup opendaq_log_file_info
@addtogroup opendaq_log_file_info log_file_info_builder
Wrapper over the openDAQ
daqLogFileInfoBuilderinterface. - Logger
- Represents a collection of ILoggerComponent “Logger Components” with multiple
ILoggerSink “Logger Sinks” and a single ILoggerThreadPool “Logger Thread Pool”
shared between components.
Logger is used to create, manage and maintain Logger Components associated with different parts of
the openDAQ SDK. The Logger provides methods, allowing for components to be added and removed dynamically.
The components added within the same Logger object should have unique names. Each newly added
component inherits threshold log severity level from the Logger. Then this level can be changed
independently per component. The set of sinks is initialized on the Logger object creation
and cannot be changed after.
Additionally, Logger provides the ability to manage flushing policies for the added components,
see
flushOnLevelmethod. Wrapper over the openDAQdaqLoggerinterface. - Logger
Component - Logs messages produced by a specific part of openDAC SDK. The messages are written into the ILoggerSink “Logger Sinks” associated with the Logger Component object.
The set of associated sinks is initialized on the Logger Component object creation and cannot be
changed after.
Logger Component allows to set up a threshold log severity level, so the messages with lower level
will not be registered.
Additionally, it provides the ability to trigger writing out messages stored in temporary buffers or
set up the minimum severity level of messages to be written out automatically,
see
flushOnLevelmethod. Wrapper over the openDAQdaqLoggerComponentinterface. - Logger
Sink - Wrapper over the openDAQ
daqLoggerSinkinterface. - Logger
Thread Pool - Container for messages queue and backing threads used for asynchronous logging.
Wrapper over the openDAQ
daqLoggerThreadPoolinterface. - Mirrored
Device - Represents an openDAQ mirrored client device. Allows accessing streaming data sources associated with the device.
Wrapper over the openDAQ
daqMirroredDeviceinterface. - Mirrored
Device Config - Represents configuration interface for mirrored device. Allows attaching and removing streaming data sources associated with the device.
Wrapper over the openDAQ
daqMirroredDeviceConfiginterface. - Mirrored
Input Port Config - Represents the configuration interface for mirrored input ports.
Allows listing available streaming sources and selecting the active source for a mirrored input port.
Only sources that support client-to-device streaming are allowed. The active sources sends client signal
(and the associated domain signal) data to the device, which is then consumed by the connection formed
by the input port origin and the mirrored signal connected to it.
Wrapper over the openDAQ
daqMirroredInputPortConfiginterface. - Mirrored
Signal Config - Represents configuration interface for mirrored signals. Allows selecting streaming data sources per signal.
Wrapper over the openDAQ
daqMirroredSignalConfiginterface. - Mirrored
Signal Private - Internal functions used by openDAQ core. This interface should never be used in client SDK or module code.
Wrapper over the openDAQ
daqMirroredSignalPrivateinterface. - Module
- A module is an object that provides device and function block factories. The object is usually implemented in an external dynamic link / shared library. IModuleManager is responsible for loading all modules.
Wrapper over the openDAQ
daqModuleinterface. - Module
Authenticator - Wrapper over the openDAQ
daqModuleAuthenticatorinterface. - Module
Info - Give module information composing of: - version info (major, minor, patch) - name - id.
Wrapper over the openDAQ
daqModuleInfointerface. - Module
Manager - Loads all available modules in a implementation-defined manner. User can also side-load custom modules via
addModulecall. Wrapper over the openDAQdaqModuleManagerinterface. - Module
Manager Utils - @ingroup opendaq_modules
@addtogroup opendaq_module_manager Module manager utils
Wrapper over the openDAQ
daqModuleManagerUtilsinterface. - Multi
Reader - A reader over several signals at once, aligned on a common domain.
readfills one buffer per signal and returns oneVecper signal. - Multi
Reader Status - IMultiReaderStatus inherits from IReaderStatus to expand information returned read function
Wrapper over the openDAQ
daqMultiReaderStatusinterface. - Mutex
- Wrapper over the openDAQ
daqMutexinterface. - Network
Interface - Provides an interface to manipulate the configuration of a device’s (server’s) network interface. Offers methods to update the IP configuration and retrieve the currently active one, if the corresponding feature supported by the device. Additionally, includes a helper method to create a prebuilt property object with valid default configuration. The configuration property object, passed as a parameter to said methods, should include the following properties:
- Number
Object - Represents either a float or an int number.
Number is used if data type of the number is not strictly defined, i.e.
it can accept a float or an int.
Wrapper over the openDAQ
daqNumberinterface. - Object
Iterator - Use this interface to iterator through items of a container object. Call moveNext function in a loop until it returns OPENDAQ_NO_MORE_ITEMS. Iteration cannot be restarted. In this case a new iterator must be created. Example:
- Ownable
- An ownable object can have IPropertyObject as the owner.
An object can declare itself ownable. When a parent object that supports a concept of ownership
calls the
setOwnermethod, it becomes the owner of the object. It’s up to the object’s implementation to decide what actions should it forward to the owner. For example, a property object that is a child of another property object will look up property values in their owner’s dictionary if the property is not set locally. Wrapper over the openDAQdaqOwnableinterface. - Packet
- Base packet type. Data, Value, and Event packets are all also packets. Provides the packet’s unique ID that is unique to a given device, as well as the packet type.
Wrapper over the openDAQ
daqPacketinterface. - Packet
Destruct Callback - Used to subscribe to packet destruction
Wrapper over the openDAQ
daqPacketDestructCallbackinterface. - Packet
Reader - A reader that hands out whole packets instead of copying samples.
- Permission
Manager - A class which is responsible for managing permissions on an object level. Given a user’s group, it is possible to restrict or allow read, write and execute permissions for each object. It is also possible to specify if permissions are inherited from parent object
Wrapper over the openDAQ
daqPermissionManagerinterface. - Permission
Manager Internal - Internal PermissionManager interface. It should be used only in openDAQ core implementation files.
Wrapper over the openDAQ
daqPermissionManagerInternalinterface. - Permission
Mask Builder - A class which is responsible for creating a permission mask. This is a collection of Permission values which are allowed or denied for a given group id. Permission mask is defined as a 64-bit integer, where each bit corespond to a specific permission defined by Permission enum.
Wrapper over the openDAQ
daqPermissionMaskBuilderinterface. - Permissions
- A class which describes a permission configuration for openDAQ object.A configuration object can be constructed using the permission builder class.
Wrapper over the openDAQ
daqPermissionsinterface. - Permissions
Builder - A class which is responsible for assigning permissions to a property object. Permisison builder can specify allowed and denied permissions for each group. It can also inherit or overwrite premissions from parent objects.
Wrapper over the openDAQ
daqPermissionsBuilderinterface. - Permissions
Internal - Internal Permissions interface. It should be used only in openDAQ core implementation files.
Wrapper over the openDAQ
daqPermissionsInternalinterface. - Procedure
- Wrapper over the openDAQ
daqProcedureinterface. - Property
- Defines a set of metadata that describes the values held by a Property object stored under the key equal to the property’s name. A property can be added to a Property object or a Property object class. Once added to either, the Property is frozen and can no longer be changed. Adding a Property to a Property object allows for its corresponding value to be get/set. Similarly, when a Property object is created using a Property object class to which a Property was added, corresponding values can be get/set. When retrieving a Property from a Property object, the returned Property is bound to the Property object. Property metadata fields can reference another Property/Value of the bound Property object. Most Property fields can contain an EvalValue that is evaluated once the corresponding Property field’s getter is called. For more information on using EvalValues and binding Properties, see the below section “EvalValue fields and Property binding”. Below we define the types of fields available and highlight some special property types, and what fields are expected for a specific type of property. Generally, the mandatory fields of a Property are Name, Value type, and Default value. @subsection objects_property_fields Property metadata fields A Property can define the following fields:
- Property
Builder - The builder interface of Properties. Allows for construction of Properties through the
buildmethod. Contains setters for the Property fields. The setters take as parameters openDAQ objects, even if the value must always evaluate to, for example, a boolean. This allows for EvalValue objects to be set instead of a static value. The EvalValue objects can evaluate to Boolean, String, List, Unit, and Property types. and can thus be used when such types are expected from the getters. The Property can be built by calling thebuildmethod. Wrapper over the openDAQdaqPropertyBuilderinterface. - Property
Internal - @ingroup objects_property
@addtogroup objects_property_obj PropertyInternal
Wrapper over the openDAQ
daqPropertyInternalinterface. - Property
Object - A container of Properties and their corresponding Property values.
The Property object acts as a container of properties that can be inherited from a specified Property object class,
or added to the Property object after its creation. The property names must be unique within any given Property object,
as no duplicates are allowed.
The Property object class name is specified when constructing the Property object, and the class itself is obtained from
the Type manager, which, at that point, must already contain a class with the specified name.
Each Property defines a set of metadata, specifying what value type it represents, as well as additional information that
is used when displaying a user interface, such as whether a Property is visible, or read-only. The Property can
also limit the set of valid values by specifying a minimum/maximum value, or validation/coercion expressions.
In addition to properties, a Property object holds a dictionary of Property values, where the key is a Property’s name,
and the value is the current Property value. When setting the value of a property, the value is written into the said dictionary.
Correspondingly, when reading the value of a property, it is read from the dictionary as well. If the value is not present in
the dictionary, the default value of the Property is read instead.
Property values must match the Value, Item, and Key type of the corresponding Property. If the Property expects an integer type,
only objects of which core type is equal to ctInt can be written to said Property. The Item type represents the type of items
expected in lists and dictionaries (when the value type is ctList or ctDict), while the Key type represents the type of keys
expected in a dictionary (when the value type is ctDict). Notable, when the Property expects object type values, only other
base Property objects can be written to said property. Any classes that inherit the Property object class are not valid Property
values.
Property objects can be frozen. When frozen, their set of Properties and Property values can no longer be modified.
Wrapper over the openDAQ
daqPropertyObjectinterface. - Property
Object Class - Container of properties that can be used as a base class when instantiating a Property object.
A Property object class is defined via a name and a list of properties. For a Property object to be
created, using a class as its base, a class must be added to the Type manager.
The name of the class must be unique within a given Type manager instance. The name of the Class
is used when choosing a template class for a Property object, as well as to define a class hierarchy.
A class with the Parent name configured will inherit the properties of the class with said name.
The properties of a Property object class are, by default, sorted in insertion order. The order can,
however, be overridden by specifying a Property object order - a list containing the names of properties.
If specified, when retrieving the list of properties, they will be in the provided order.
All Property object class objects are created as Property object class builder objects that allow for
customization and building of the class.
Wrapper over the openDAQ
daqPropertyObjectClassinterface. - Property
Object Class Builder - The builder interface of Property object classes. Allows for their modification and building of Property object classes.
The configuration interface allows for modifying the list of properties, the class’s name, parent, and the
sorting order of properties. To build the Class, the
buildmethod is used. Wrapper over the openDAQdaqPropertyObjectClassBuilderinterface. - Property
Object Class Internal - @ingroup objects_property_object
@addtogroup objects_property_object_class PropertyObjectClassInternal
Wrapper over the openDAQ
daqPropertyObjectClassInternalinterface. - Property
Object Internal - @ingroup objects_property_object
@addtogroup objects_property_object_obj PropertyObjectInternal
Wrapper over the openDAQ
daqPropertyObjectInternalinterface. - Property
Object Protected - Provides protected access that allows changing read-only property values of a Property object.
Wrapper over the openDAQ
daqPropertyObjectProtectedinterface. - Property
Value Event Args - Wrapper over the openDAQ
daqPropertyValueEventArgsinterface. - Range
- Describes a range of values between the
lowValueandhighValueboundaries. Range objects implement the Struct methods internally and are Core typectStruct. Wrapper over the openDAQdaqRangeinterface. - Ratio
- A rational number (openDAQ
IRatio), e.g. a domain tick resolution. - Ratio
Object - Represents rational number as
IRatiointerface. Use this interface to wrap rational number when you need to add the number to lists, dictionaries and other containers which acceptIBaseObjectand derived interfaces. Rational numbers are defined as numerator / denominator. Available factories: - Reader
Config - An interface providing access to a new reader in order to reuse the invalidated reader’s settings and configuration.
Wrapper over the openDAQ
daqReaderConfiginterface. - Reader
Status - Represents the status of the reading process returned by the reader::read function.
The
IReaderStatusclass provides information about the outcome of the reading operation, including the validity of the reader and the potential encounter of event packets during processing. Objects of this class are typically returned as a result of thereadfunction of the Readers, allowing the client code to assess and respond to the status of the reading process. Wrapper over the openDAQdaqReaderStatusinterface. - Recorder
- Recorders represent objects which record input data to a persistent storage medium such as a file, database, or cloud storage bucket. Recorders implement the
IRecorderinterface and may expose additional properties for configuring the storage (such as file type, storage location, etc.). tags. Wrapper over the openDAQdaqRecorderinterface. - Recursive
Search - Wrapper over the openDAQ
daqRecursiveSearchinterface. - Reference
Domain Info - If set, gives additional information about the reference domain.
Wrapper over the openDAQ
daqReferenceDomainInfointerface. - Reference
Domain Info Builder - Builder component of Reference Domain Info objects. Contains setter methods that allow for Reference Domain Info parameter configuration, and a
buildmethod that builds the Reference Domain Info. Wrapper over the openDAQdaqReferenceDomainInfoBuilderinterface. - Removable
- Allows the component to be notified when it is removed.
Wrapper over the openDAQ
daqRemovableinterface. - Reusable
Data Packet - @ingroup opendaq_packets
@addtogroup opendaq_reusable_data_packet Reusable Data packet
Wrapper over the openDAQ
daqReusableDataPacketinterface. - Rule
Private - Private rule interface implemented by Dimension rules, Data rules and Scaling. Allows for parameter verification.
Wrapper over the openDAQ
daqRulePrivateinterface. - Samples
- Samples returned by a read: flat
valuesplus the per-samplewidth(1 for scalar signals; the dimension size for dimensioned signals; the block size for block readers). Dereferences to the flat value slice, so for ordinary scalar signals it is used exactly like aVec. - Scaling
- Signal descriptor field that defines a scaling transformation, which should be applied to data carried by the signal’s packets when read.
Each scaling specifies its
scalingTypeand parses the parameters accordingly. The parameters are to be interpreted and used as specified by each specific scaling type as detailed below. Additionally, each Scaling object states is input and output data types. The inputDataType describes the raw data type of the signal value (that data is input into the scaling scaling), while the outputDataType should match the sample type of the signal’s value descriptor. Scaling objects implement the Struct methods internally and are Core typectStruct. @subsection scaling_types Scaling types @subsubsection scaling_types_linear Linear scaling Linear scaling parameters must have two entries: - Scaling
Builder - Configuration component of Scaling objects. Contains setter methods that allow for Scaling parameter configuration, and a
buildmethod that builds the Scaling object. Wrapper over the openDAQdaqScalingBuilderinterface. - Scaling
Calc Private - Internal functions used by openDAQ core. This interface should never be used in client SDK or module code.
Wrapper over the openDAQ
daqScalingCalcPrivateinterface. - Scheduler
- A thread-pool scheduler that supports scheduling one-off functions as well as dependency graphs.
Wrapper over the openDAQ
daqSchedulerinterface. - Search
Filter - Search filter that can be passed as an optional parameter to search functions to filter out unwanted results. Allows for recursive searches.
Each filter defines an “accepts object” and “visit children” function.
Accepts object defines whether or not the object being evaluated as part of a search method should be included
in the resulting output.
Visit children defines whether or not the children of said object should be traversed during a recursive search.
Wrapper over the openDAQ
daqSearchFilterinterface. - Serializable
- @ingroup types_serialization
@defgroup types_serializable Serializable
Wrapper over the openDAQ
daqSerializableinterface. - Serialized
List - @ingroup types_serialization
@defgroup types_serialized_list SerializedList
Wrapper over the openDAQ
daqSerializedListinterface. - Serialized
Object - @ingroup types_serialization
@defgroup types_serialized_object SerializedObject
Wrapper over the openDAQ
daqSerializedObjectinterface. - Serializer
- Wrapper over the openDAQ
daqSerializerinterface. - Server
- Represents a server. The server provides access to the openDAQ device. Depend of the implementation, it can support configuring the device, reading configuration, and data streaming.
We do not make the server directly. But through the instance and module manager. For that reason, the server must be uniquely
defined with “ServerType”. The server is then created with the current root device, context and configuration object.
Configuration of the server can be done with custom property object.
The configuration object is created with the corresponding ServerType object (IServerType::createDefaultConfig method).
For example, with a configuration object, we can define connection timeout.
Wrapper over the openDAQ
daqServerinterface. - Server
Capability - Represents standard information about a server’s capability to support various protocols. The Server Capability object functions as a Property Object, facilitating the inclusion of custom properties of String, Int, Bool, or Float types. This interface serves to store essential details regarding the supported protocol by a device. It adheres to a standardized set of properties, including methods to retrieve information such as the connection string, protocol name, protocol type, connection type, and core events enabled. Additional String, Int, Bool, or Float-type properties can be added using the appropriate Property Object “add property” method. However, other property types are considered invalid for this interface. The Server Capability object conforms to a standardized format, ensuring compatibility with communication standards. For instance, it provides methods to retrieve details like
- Server
Capability Config - Wrapper over the openDAQ
daqServerCapabilityConfiginterface. - Server
Type - Provides information about the server.
Wrapper over the openDAQ
daqServerTypeinterface. - Signal
- A signal with an unique ID that sends event/data packets through connections to input ports the signal is connected to.
A signal features an unique ID within a given device. It sends data along its signal path to all
connected input ports, if its set to be active via its active property.
A signal is visible, and its data is streamed to all clients connected to a device only if its public
property is set to
True. Each signal has a domain descriptor, which is set by the owner of the signal - most often a function block or device. The descriptor defines all properties of the signal, such as its name, description and data structure. Signals can have a reference to another signal, which is used for determining the domain data. The domain signal outputs data at the same rate as the signal itself, providing domain (most often time - timestamps) information for each sample sent along the signal path. Each value packet sent by a signal thus contains a reference to another data packet containing domain data (if the signal is associated with another domain signal). Additionally, a list of related signals can be defined, containing any signals relevant to interpreting the signal data. To get the list of connections to input ports of the signal,getConnectionscan be used. Wrapper over the openDAQdaqSignalinterface. - Signal
Config - The configuration component of a Signal. Allows for configuration of its properties, managing its streaming sources, and sending packets through its connections.
The Signal config is most often accessible only to the devices or function blocks that own
the signal. They react on property, or input signal changes to modify a signal’s data descriptor,
and send processed/acquired data down its signal path.
Wrapper over the openDAQ
daqSignalConfiginterface. - Signal
Events - Internal functions of a signal containing event methods that are called on certain events. Eg. when a signal is connected to an input port, or when a signal is used as a domain signal of another.
Wrapper over the openDAQ
daqSignalEventsinterface. - Signal
Private - Internal functions used by openDAQ core. This interface should never be used in client SDK or module code.
Wrapper over the openDAQ
daqSignalPrivateinterface. - Simple
Type - Simple type created from a CoreType. The name of the type matches that of the CoreType used for its construction (eg. ctInt == “int”
Wrapper over the openDAQ
daqSimpleTypeinterface. - Stream
Reader - A signal data reader that keeps an internal read position and advances it
on every read.
Vis the Rust type values are converted to,Dthe type for domain stamps. - Stream
Reader Options - Options for constructing a
StreamReader; the defaults mirror the other openDAQ bindings. - Streaming
- Represents the client-side part of a streaming service responsible for initiating communication with the openDAQ device streaming server and processing the received data. Wraps the client-side implementation details of the particular data transfer protocol used by openDAQ to send processed/acquired data from devices running an openDAQ Server to an openDAQ Client. The Streaming is used as a selectable data source for mirrored signals. For this, it provides methods, allowing mirrored signals to be added/removed dynamically, to enable/disable the use of Streaming as a data source of these signals. Forwarding of packets received from the remote device through the data transfer protocol down to the signal path is enabled when the following conditions are met:
- Streaming
Type - Provides information on what streaming type can be created by a given module. Can be used to obtain the default configuration used when either adding/creating a new device, or establishing a new streaming connection.
Wrapper over the openDAQ
daqStreamingTypeinterface. - String
Object - Represents string variable as
IStringinterface. Use this interface to wrap string variable when you need to add the variable to lists, dictionaries and other containers which acceptIBaseObjectand derived interfaces. Available factories: - Struct
- Structs are immutable objects that contain a set of key-value pairs. The key, as well as the types of each associated value for each struct are defined in advance within a Struct type that has the same name as the Struct.
The Struct types are stored within a Type manager. In any given instance of openDAQ, a single Type manager should
exist that is part of its Context.
When creating a Struct, the Type manager is used to validate the given dictionary of keys and values against the
Struct type stored within the manager. If no type with the given Struct name is currently stored, a default type
is created using the Struct field names and values as its parameters. When creating a Struct, fields that are part
of the Struct type can be omitted. If so, they will be replaced by either
nullor, if provided by the Struct type, the default value of the field. In the case that a field name is present that is not part of the struct type, or if the value type of the field does not match, construction of the Struct will fail. NOTE: Field values of fields with the Core typectUndefinedcan hold any value, regardless of its type. Structs are an openDAQ core type (ctStruct). Several objects in openDAQ such as an Unit, or DataDescriptor are Structs, allowing for access to their fields through Struct methods. Such objects are, by definiton, immutable - their fields cannot be modified. In order to change the value of a Struct-type object, a new Struct must be created. A Struct can only have fields of Core type:ctBool,ctInt,ctFloat,ctString,ctList,ctDict,ctRatio,ctComplexNumber,ctStruct, orctUndefined. Additionally, all Container types (ctList,ctDict) should only have values of the aforementioned types. Wrapper over the openDAQdaqStructinterface. - Struct
Builder - Builder component of Struct objects. Contains setter methods to configure the Struct parameters, and a
buildmethod that builds the Struct object. Wrapper over the openDAQdaqStructBuilderinterface. - Struct
Type - Struct types define the fields (names and value types, as well as optional default values) of Structs with a name matching that of the Struct type.
A Struct type contains a String-type name, a list of field names (list of Strings), a list of field types (list of Type objects),
and an optional list of Default values (list of Base objects). The Struct types should be added to the Type manager to be used
for Struct validation on creation. Alternatively, if a Struct is created with no matching Struct type in the manager, a default
Struct type is created based on the field names and types of the Created struct. Said Struct type is then added to the manager.
The field types are a list of Type objects. These determine the types of values that should be used to fill in the corresponding
field value. The Type objects at the moment available in openDAQ are Simple types and Struct types. When adding any field other
than a Struct type, the Simple type corresponding to the Core type of the value should be created. When adding Struct fields, a
Struct type should be added to the field types.
A Struct can only have fields of Core type:
ctBool,ctInt,ctFloat,ctString,ctList,ctDict,ctRatio,ctComplexNumber,ctStruct, orctUndefined. Additionally, all Container types (ctList,ctDict) should only have values of the aforementioned types. Wrapper over the openDAQdaqStructTypeinterface. - Subscription
Event Args - Wrapper over the openDAQ
daqSubscriptionEventArgsinterface. - Sync
Component - Interface representing a Synchronization Component in a Test & Measurement system. A SynchronizationComponent ensures synchronization among measurement devices in the system. It can act as a sync source and/or as a sync output, with each component having one sync input and 0 to n sync outputs. SynchronizationComponents are configured via interfaces, which can include PTP, IRIQ, GPS, and CLK sync interfaces, among others.
- Sync
Component Private - Interface representing a Synchronization Component in a Test & Measurement system. A SynchronizationComponent ensures synchronization among measurement devices in the system. It can act as a sync source and/or as a sync output, with each component having one sync input and 0 to n sync outputs. SynchronizationComponents are configured via interfaces, which can include PTP, IRIQ, GPS, and CLK sync interfaces, among others.
- Tags
- List of string tags. Provides helpers to get and search the list of tags.
Tags provide a view into an underlying list of tags. The list can be retrieved via
getList, and inspected throughcontainsandquery. To manipulate the list of tags, the add/remove tag functions can be used. The Tags object can only be modified if the object is not locked by the owning Component. Wrapper over the openDAQdaqTagsinterface. - Tags
Private - Private interface to component tags. Allows for adding/removing tags.
Modifying the tags of a component might have unintended sideffects and should in most cases only be done
by the component owner module.
Wrapper over the openDAQ
daqTagsPrivateinterface. - Tail
Reader - A reader that always returns the last
history_sizesamples of a signal. - Tail
Reader Status - ITailReaderStatus inherits from IReaderStatus to expand information returned read function
Wrapper over the openDAQ
daqTailReaderStatusinterface. - Task
- A packaged callback with possible continuations and dependencies that can be arranged in a dependency graph (directed acyclic graph). The task is not executed directly but only when the graph is scheduled for execution and all dependencies have been satisfied.
Wrapper over the openDAQ
daqTaskinterface. - Task
Graph - A dependency graph (directed acyclic graph) of tasks that can be scheduled for execution on a Scheduler.
Wrapper over the openDAQ
daqTaskGraphinterface. - Tick
Converter - Converts integer domain ticks into absolute
SystemTimes. Reads the origin and tick resolution once at construction, so build it once per domain and reuse it for every tick. - Type
- The base object type that is inherited by all Types (eg. Struct type, Simple type, Property object class) in openDAQ.
Types are used for the construction of objects that are require validation/have pre-defined fields such as
Structs and Property objects. Types should be inserted into the Type manager to be used by different parts
of the SDK.
Wrapper over the openDAQ
daqTypeinterface. - Type
Manager - Container for Type objects. The Type manager is used when creating certain types of objects (eg. Structs and Property object classes). The Types stored within the manager contain pre-defined fields, as well as constraints specifying how objects should look.
The currently available types in openDAQ that should be added to the Type manager are the Struct type
and the Property object class. The former is used to validate Structs when they are created, while the latter
contains pre-defined properties that are added to Property objects on construction.
When adding a Property object class to the manager, they can form inheritance chains with one-another.
Thus, a parent of a given class must be added to the manager before any of its children. Likewise, a class
cannot be removed before its children are removed.
Wrapper over the openDAQ
daqTypeManagerinterface. - Type
Manager Private - @ingroup types_types
@defgroup types_types_type_manager Type manager private
Wrapper over the openDAQ
daqTypeManagerPrivateinterface. - Unit
- Describes a measurement unit with IDs as defined in <a href=“https://unece.org/trade/cefact/UNLOCODE-Download”>Codes for Units of Measurement used in International Trade</a>.
Unit objects implement the Struct methods internally and are Core type
ctStruct. @subsection unit_components Unit components - Unit
Builder - Builder component of Unit objects. Contains setter methods to configure the Unit parameters, and a
buildmethod that builds the Unit object. Wrapper over the openDAQdaqUnitBuilderinterface. - Updatable
- @ingroup types_utility
@defgroup types_updatable Updatable
Wrapper over the openDAQ
daqUpdatableinterface. - Update
Parameters - IUpdateParameters interface provides a set of methods to give user flexibility to load instance configuration.
Wrapper over the openDAQ
daqUpdateParametersinterface. - User
- An immutable structure which describes an openDAQ user. It holds username, password as a hash string and a list of groups assigned to the user.
Wrapper over the openDAQ
daqUserinterface. - User
Internal - Internal User interface. It should be used only in openDAQ core implementation files.
Wrapper over the openDAQ
daqUserInternalinterface. - User
Lock - This class manages the lock state of an object, usually a device. A device can be locked either with a specific user or without one. If the device is locked with a specific user, only that user can unlock it. If the device is locked without a user, any user can unlock it.
Wrapper over the openDAQ
daqUserLockinterface. - Validator
- Used by openDAQ properties to validate whether a value fits the value restrictions of the Property.
Whenever a value is set to on a Property object, if the corresponding Property has a validator configured, the value will
be validated, throwing a validation error, if the value is not compliant with the validation restrictions. For example,
a validator can check the written value for lower-than, greater-than, equality, or other number relations.
The validation conditions are configured with an evaluation string when the validator is constructed. The string constructs an
Eval value that replaces any instance of the keyword “value” or “val” with the value being set. The result of the Eval
value evaluation is the output of the
validatefunction call. For example, validators created with the string “value == 5” would reject any value that is not equal to 5. Wrapper over the openDAQdaqValidatorinterface. - Version
Info - Represents a semantic version composing of: - major version representing breaking changes - minor version representing new features - patch version representing only bug fixes.
Wrapper over the openDAQ
daqVersionInfointerface. - Work
- A lightweight implementation of callback used in scheduler for worker tasks.
Wrapper over the openDAQ
daqWorkinterface.
Enums§
- Component
Kind - The most-derived component interface an object implements, letting you discover a component’s concrete type before committing to a cast.
- Load
Error - An error locating, downloading, or loading the native openDAQ libraries.
- Value
- Any openDAQ value in its natural Rust form.
Traits§
- Interface
- An openDAQ interface wrapper type.
- Sample
- A Rust element type a reader can decode samples into.
Functions§
- clear_
error_ info - Clear any error information stored for the calling thread.
- healthcheck
- Print a diagnostic report about where the native libraries were searched for and whether they load.
- init
- Load the openDAQ native libraries now (locating or downloading them first), instead of implicitly on first use.
- init_
from - Load the openDAQ native libraries from an explicit directory.
- install_
native_ libraries - Download and unpack the prebuilt native libraries for this platform into
the per-user cache, verifying the archive checksum, and return the
directory holding them. Called automatically on first use unless
OPENDAQ_NO_DOWNLOADis set; call it yourself to prefetch. - native_
library_ directory - The directory holding the native openDAQ libraries (and the bundled device / function-block modules), triggering the download when necessary.
Type Aliases§
- Result
- Result alias used by every fallible openDAQ call.