openDAQ
Open data acquisition platform
ConnectionStatusContainerPrivatePtr Class Reference

Provides access to private methods for managing the Device's connection statuses. More...

Inherits ObjectPtr< IConnectionStatusContainerPrivate >.

Detailed Description

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.

Public Member Functions

void addConfigurationConnectionStatus (const daq::StringPtr &connectionString, const daq::EnumerationPtr &initialValue) const
 Adds a new configuration connection status with the specified connection string and initial value. More...
 
void addStreamingConnectionStatus (const daq::StringPtr &connectionString, const daq::EnumerationPtr &initialValue, const daq::StreamingPtr &streamingObject) const
 Adds a new streaming connection status with the specified connection string, initial value, and streaming object. More...
 
void removeStreamingConnectionStatus (const daq::StringPtr &connectionString) const
 Removes a streaming connection status associated with the specified connection string. More...
 
void updateConnectionStatus (const daq::StringPtr &connectionString, const daq::EnumerationPtr &value, const daq::StreamingPtr &streamingObject) const
 Updates the value of an existing connection status. More...
 
void updateConnectionStatusWithMessage (const daq::StringPtr &connectionString, const daq::EnumerationPtr &value, const daq::StreamingPtr &streamingObject, const daq::StringPtr &message) const
 Updates the value of an existing connection status with a message. More...
 

Member Function Documentation

◆ addConfigurationConnectionStatus()

void addConfigurationConnectionStatus ( const daq::StringPtr &  connectionString,
const daq::EnumerationPtr &  initialValue 
) const
inline

Adds a new configuration connection status with the specified connection string and initial value.

Parameters
connectionStringThe connection string identifying the status.
initialValueThe initial value of the status.

◆ addStreamingConnectionStatus()

void addStreamingConnectionStatus ( const daq::StringPtr &  connectionString,
const daq::EnumerationPtr &  initialValue,
const daq::StreamingPtr &  streamingObject 
) const
inline

Adds a new streaming connection status with the specified connection string, initial value, and streaming object.

Parameters
connectionStringThe connection string identifying the status.
initialValueThe initial value of the status.
streamingObjectThe streaming object associated with the status.

◆ removeStreamingConnectionStatus()

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

Removes a streaming connection status associated with the specified connection string.

Parameters
connectionStringThe connection string identifying the status to remove.

◆ updateConnectionStatus()

void updateConnectionStatus ( const daq::StringPtr &  connectionString,
const daq::EnumerationPtr &  value,
const daq::StreamingPtr &  streamingObject 
) const
inline

Updates the value of an existing connection status.

Parameters
connectionStringThe connection string identifying the status to update.
valueThe new value of the status.
streamingObjectThe streaming object associated with the connection, used in triggered Core events. Set to nullptr for configuration connections.

◆ updateConnectionStatusWithMessage()

void updateConnectionStatusWithMessage ( const daq::StringPtr &  connectionString,
const daq::EnumerationPtr &  value,
const daq::StreamingPtr &  streamingObject,
const daq::StringPtr &  message 
) const
inline

Updates the value of an existing connection status with a message.

Parameters
connectionStringThe connection string identifying the status to update.
valueThe new value of the status.
streamingObjectThe streaming object associated with the connection, used in triggered Core events. Set to nullptr for configuration connections.
messageThe new message of the connection status. Usually describes last reconnect attempt failure.