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

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

Detailed Description

template<typename InterfaceType>
class GenericServerPtr< InterfaceType >

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.

Public Member Functions

void stop () const
 Stops the server. This is called when we remove the server from the Instance or Instance is closing.
 
daq::StringPtr getId () const
 Gets the server id. More...
 
void enableDiscovery () const
 Enables the server to be discovered by the clients.
 
daq::ListPtr< daq::ISignal > getSignals (const daq::SearchFilterPtr &searchFilter=nullptr) const
 Gets a list of the server's signals. More...
 

Member Function Documentation

◆ getId()

daq::StringPtr getId ( ) const
inline

Gets the server id.

Returns
The server id.

◆ getSignals()

daq::ListPtr<daq::ISignal> getSignals ( const daq::SearchFilterPtr &  searchFilter = nullptr) const
inline

Gets a list of the server's signals.

Returns
The flat list of signals.

Server signals are most often the mirrored representations of signals that belong to the client connected to the instance via this server.