openDAQ
Open data acquisition platform
+ Collaboration diagram for Factories:

Detailed Description

Functions

InstanceBuilderPtr InstanceBuilder ()
 Creates a InstanceBuilder with no parameters configured.
 
InstancePtr InstanceFromBuilder (const InstanceBuilderPtr &builder)
 Creates a Instance with Builder. More...
 
InstancePtr Instance (const std::string &modulePath="", const std::string &localId="")
 Creates a new Instance, using the default logger and module manager. The module manager searches for module shared libraries at the given module path, using the executable directory if left empty. More...
 
InstancePtr InstanceCustom (const ContextPtr &context, const StringPtr &localId)
 Creates a new Instance with the provided Context. More...
 
DevicePtr Client (const ContextPtr &context, const StringPtr &localId, const DeviceInfoPtr &defaultDeviceInfo=nullptr, const ComponentPtr &parent=nullptr)
 Creates a Client implementation of a device. More...
 

Function Documentation

◆ Client()

DevicePtr Client ( const ContextPtr context,
const StringPtr localId,
const DeviceInfoPtr &  defaultDeviceInfo = nullptr,
const ComponentPtr &  parent = nullptr 
)
inline

Creates a Client implementation of a device.

Parameters
contextThe Context to be used by the client.
localIdThe local id of the instance.
defaultDeviceInfoThe DeviceInfo to be used by the client device.
parentThe parent component of the client.

When creating an Instance, it by default creates a Client and sets it as the root device. The Client supports adding function blocks and connecting to devices. The array of function blocks and supported devices depends on the modules loaded by the Module manager.

◆ Instance()

InstancePtr Instance ( const std::string &  modulePath = "",
const std::string &  localId = "" 
)
inline

Creates a new Instance, using the default logger and module manager. The module manager searches for module shared libraries at the given module path, using the executable directory if left empty.

Parameters
modulePathThe module search path to be used by the Module manager.
localIdThe local id of the instance.

If localId is empty, the local id will be set to the OPENDAQ_INSTANCE_ID environment variable if available. Otherwise a random UUID will be generated for the local id.

◆ InstanceCustom()

InstancePtr InstanceCustom ( const ContextPtr context,
const StringPtr localId 
)
inline

Creates a new Instance with the provided Context.

Parameters
contextThe Context.
localIdThe instance local id.

◆ InstanceFromBuilder()

InstancePtr InstanceFromBuilder ( const InstanceBuilderPtr builder)
inline

Creates a Instance with Builder.

Parameters
builderInstance Builder