openDAQ
Open data acquisition platform
IModule Struct Referenceabstract

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

+ Inheritance diagram for IModule:
+ Collaboration diagram for IModule:

Detailed Description

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.

Public Member Functions

virtual ErrCode INTERFACE_FUNC getVersionInfo (IVersionInfo **version)=0
 Retrieves the module version information. More...
 
virtual ErrCode INTERFACE_FUNC getName (IString **name)=0
 Gets the module name. More...
 
virtual ErrCode INTERFACE_FUNC getId (IString **id)=0
 Gets the module id. More...
 
virtual ErrCode INTERFACE_FUNC getAvailableDevices (IList **availableDevices)=0
 Returns a list of known devices info. The implementation can start discovery in background and only return the results in this function. More...
 
virtual ErrCode INTERFACE_FUNC getAvailableDeviceTypes (IDict **deviceTypes)=0
 Returns a dictionary of known and available device types this module can create. More...
 
virtual ErrCode INTERFACE_FUNC createDevice (IDevice **device, IString *connectionString, IComponent *parent, IPropertyObject *config=nullptr)=0
 Creates a device object that can communicate with the device described in the specified connection string. The device object is not automatically added as a sub-device of the caller, but only returned by reference. More...
 
virtual ErrCode INTERFACE_FUNC getAvailableFunctionBlockTypes (IDict **functionBlockTypes)=0
 Returns a dictionary of known and available function block types this module can create. More...
 
virtual ErrCode INTERFACE_FUNC createFunctionBlock (IFunctionBlock **functionBlock, IString *id, IComponent *parent, IString *localId, IPropertyObject *config=nullptr)=0
 Creates and returns a function block with the specified id. The function block is not automatically added to the FB list of the caller. More...
 
virtual ErrCode INTERFACE_FUNC getAvailableServerTypes (IDict **serverTypes)=0
 Returns a dictionary of known and available servers types that this module can create. More...
 
virtual ErrCode INTERFACE_FUNC createServer (IServer **server, IString *serverTypeId, IDevice *rootDevice, IPropertyObject *config=nullptr)=0
 Creates and returns a server with the specified server type. More...
 
virtual ErrCode INTERFACE_FUNC createStreaming (IStreaming **streaming, IString *connectionString, IPropertyObject *config=nullptr)=0
 Creates and returns a streaming object using the specified connection string and config object. More...
 
virtual ErrCode INTERFACE_FUNC getAvailableStreamingTypes (IDict **streamingTypes)=0
 Returns a dictionary of known and available streaming types that this module (client) can create. More...
 
- Public Member Functions inherited from IBaseObject
virtual ErrCode INTERFACE_FUNC borrowInterface (const IntfID &intfID, void **obj) const =0
 Returns another interface which is supported by the object without incrementing the reference count. More...
 
virtual ErrCode INTERFACE_FUNC dispose ()=0
 Disposes all references held by the object. More...
 
virtual ErrCode INTERFACE_FUNC getHashCode (SizeT *hashCode)=0
 Returns hash code of the object. More...
 
virtual ErrCode INTERFACE_FUNC equals (IBaseObject *other, Bool *equal) const =0
 Compares object to another object for equality. More...
 
virtual ErrCode INTERFACE_FUNC toString (CharPtr *str)=0
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from IUnknown
virtual ErrCode INTERFACE_FUNC queryInterface (const IntfID &intfID, void **obj)=0
 Returns another interface which is supported by the object and increments the reference count. More...
 
virtual int INTERFACE_FUNC addRef ()=0
 Increments the reference count for an interface on an object. More...
 
virtual int INTERFACE_FUNC releaseRef ()=0
 Decrements the reference count for an interface on an object. More...
 

Member Function Documentation

◆ createDevice()

virtual ErrCode INTERFACE_FUNC createDevice ( IDevice **  device,
IString connectionString,
IComponent parent,
IPropertyObject config = nullptr 
)
pure virtual

Creates a device object that can communicate with the device described in the specified connection string. The device object is not automatically added as a sub-device of the caller, but only returned by reference.

Parameters
[out]deviceThe device object created to communicate with and control the device.
connectionStringDescribes the connection info of the device to connect to.
parentThe parent component/device to which the device attaches.
configA configuration object that contains parameters used to configure a device in the form of key-value pairs.

◆ createFunctionBlock()

virtual ErrCode INTERFACE_FUNC createFunctionBlock ( IFunctionBlock **  functionBlock,
IString id,
IComponent parent,
IString localId,
IPropertyObject config = nullptr 
)
pure virtual

Creates and returns a function block with the specified id. The function block is not automatically added to the FB list of the caller.

Parameters
idThe id of the function block to create. Ids can be retrieved by calling getAvailableFunctionBlockTypes().
parentThe parent component/device to which the device attaches.
localIdThe local id of the function block.
configFunction block configuration. In case of a null value, implementation should use default configuration.
[out]functionBlockThe created function block.

◆ createServer()

virtual ErrCode INTERFACE_FUNC createServer ( IServer **  server,
IString serverTypeId,
IDevice rootDevice,
IPropertyObject config = nullptr 
)
pure virtual

Creates and returns a server with the specified server type.

Parameters
serverTypeIdThe id of the server type to create. ServerType can be retrieved by calling getAvailableServerTypes().
configServer configuration. In case of a null value, implementation should use default configuration.
rootDeviceRoot device.
[out]serverThe created server.

◆ createStreaming()

virtual ErrCode INTERFACE_FUNC createStreaming ( IStreaming **  streaming,
IString connectionString,
IPropertyObject config = nullptr 
)
pure virtual

Creates and returns a streaming object using the specified connection string and config object.

Parameters
connectionStringTypically a connection string usually has a well known prefix, such as daq.lt//.
configA config object that contains parameters used to configure a streaming connection. In case of a null value, implementation should use default configuration.
[out]streamingThe created streaming object.

◆ getAvailableDevices()

virtual ErrCode INTERFACE_FUNC getAvailableDevices ( IList **  availableDevices)
pure virtual

Returns a list of known devices info. The implementation can start discovery in background and only return the results in this function.

Parameters
[out]availableDevicesThe list of known devices information.

◆ getAvailableDeviceTypes()

virtual ErrCode INTERFACE_FUNC getAvailableDeviceTypes ( IDict **  deviceTypes)
pure virtual

Returns a dictionary of known and available device types this module can create.

Parameters
[out]deviceTypesThe dictionary of known device types.

◆ getAvailableFunctionBlockTypes()

virtual ErrCode INTERFACE_FUNC getAvailableFunctionBlockTypes ( IDict **  functionBlockTypes)
pure virtual

Returns a dictionary of known and available function block types this module can create.

Parameters
[out]functionBlockTypesThe dictionary of known function block types.

◆ getAvailableServerTypes()

virtual ErrCode INTERFACE_FUNC getAvailableServerTypes ( IDict **  serverTypes)
pure virtual

Returns a dictionary of known and available servers types that this module can create.

Parameters
[out]serverTypesThe dictionary of known server types.

◆ getAvailableStreamingTypes()

virtual ErrCode INTERFACE_FUNC getAvailableStreamingTypes ( IDict **  streamingTypes)
pure virtual

Returns a dictionary of known and available streaming types that this module (client) can create.

Parameters
[out]streamingTypesThe dictionary of known streaming types.

◆ getId()

virtual ErrCode INTERFACE_FUNC getId ( IString **  id)
pure virtual

Gets the module id.

Parameters
[out]idThe module id.

◆ getName()

virtual ErrCode INTERFACE_FUNC getName ( IString **  name)
pure virtual

Gets the module name.

Parameters
[out]nameThe module name.

◆ getVersionInfo()

virtual ErrCode INTERFACE_FUNC getVersionInfo ( IVersionInfo **  version)
pure virtual

Retrieves the module version information.

Parameters
[out]versionThe semantic version information.