openDAQ
Open data acquisition platform
StreamingPtr Class Reference

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. More...

Inherits ObjectPtr< IStreaming >.

Detailed Description

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 object itself is in active state.
  • Streaming is selected as an active source of the corresponding signal.

Usually, the data transfer protocol provides information about the signals whose data can be sent over the protocol. It allows the implementation to reject unsupported signals from being added to the streaming. Each Streaming object provides the string representation of a connection address used to connect to the streaming service of the device. This string representation is used as a unique ID to determine the streaming source for the mirrored signal.

Public Member Functions

daq::Bool getActive () const
 Gets the active state of the Streaming. More...
 
void setActive (daq::Bool active) const
 Sets the Streaming to be either active or inactive. More...
 
void addSignals (const daq::ListPtr< daq::ISignal > &signals) const
 Adds signals to the Streaming. More...
 
void removeSignals (const daq::ListPtr< daq::ISignal > &signals) const
 Removes signals from the Streaming. More...
 
void removeAllSignals () const
 Removes all added signals from the Streaming.
 
daq::StringPtr getConnectionString () const
 Gets the string representation of a connection address used to connect to the streaming service of the device. More...
 

Member Function Documentation

◆ addSignals()

void addSignals ( const daq::ListPtr< daq::ISignal > &  signals) const
inline

Adds signals to the Streaming.

Parameters
signalsThe list of signals to be added.
Exceptions
DuplicateItemExceptionif a signal on the list is already added to the Streaming.
NoInterfaceExceptionif a signal on the list is not a mirrored signal.

After a signal is added to the Streaming, the Streaming automatically appears in the list of available streaming sources of a signal.

◆ getActive()

daq::Bool getActive ( ) const
inline

Gets the active state of the Streaming.

Returns
True if the Streaming is active; false otherwise.

◆ getConnectionString()

daq::StringPtr getConnectionString ( ) const
inline

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

Returns
The string used to connect to the streaming service.

◆ removeSignals()

void removeSignals ( const daq::ListPtr< daq::ISignal > &  signals) const
inline

Removes signals from the Streaming.

Parameters
signalsThe list of signals to be removed.
Exceptions
NotFoundExceptionif a signal on the list was not added to the Streaming.

After a signal is removed from the Streaming, the Streaming is automatically excluded in the list of available streaming sources of a signal.

◆ setActive()

void setActive ( daq::Bool  active) const
inline

Sets the Streaming to be either active or inactive.

Parameters
activeThe new active state of the Streaming.