openDAQ
Open data acquisition platform
IContext Struct Referenceabstract

The Context serves as a container for the Scheduler and Logger. It originates at the instance, and is passed to the root device, which forwards it to components such as function blocks and signals. More...

+ Inheritance diagram for IContext:
+ Collaboration diagram for IContext:

Detailed Description

The Context serves as a container for the Scheduler and Logger. It originates at the instance, and is passed to the root device, which forwards it to components such as function blocks and signals.

Note: The context holds a strong reference to the Module Manager until the reference is moved via the ContextInternal move function. The strong reference moved to an external owner to avoid memory leaks due to circular references. This is done automatically when the Context is used in the openDAQ Instance constructor.

Public Member Functions

virtual ErrCode INTERFACE_FUNC getScheduler (IScheduler **scheduler)=0
 Gets the scheduler. More...
 
virtual ErrCode INTERFACE_FUNC getLogger (ILogger **logger)=0
 Gets the logger. More...
 
virtual ErrCode INTERFACE_FUNC getModuleManager (IBaseObject **manager)=0
 Gets the Module Manager as a Base Object. More...
 
virtual ErrCode INTERFACE_FUNC getTypeManager (ITypeManager **manager)=0
 Gets the Type Manager. More...
 
virtual ErrCode INTERFACE_FUNC getAuthenticationProvider (IAuthenticationProvider **authenticationProvider)=0
 Gets the Authentication provider. More...
 
virtual ErrCode INTERFACE_FUNC getOnCoreEvent (IEvent **event)=0
 Gets the Core Event object that triggers whenever a change happens within the openDAQ core structure. More...
 
virtual ErrCode INTERFACE_FUNC getOptions (IDict **options)=0
 Gets the dictionary of options. More...
 
virtual ErrCode INTERFACE_FUNC getModuleOptions (IString *moduleId, IDict **options)=0
 Retrieves the options associated with the specified module ID. More...
 
virtual ErrCode INTERFACE_FUNC getDiscoveryServers (IDict **services)=0
 Gets the dictionary of available discovery services. 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

◆ getAuthenticationProvider()

virtual ErrCode INTERFACE_FUNC getAuthenticationProvider ( IAuthenticationProvider **  authenticationProvider)
pure virtual

Gets the Authentication provider.

Parameters
[out]authenticationProviderThe authentication provider.

◆ getDiscoveryServers()

virtual ErrCode INTERFACE_FUNC getDiscoveryServers ( IDict **  services)
pure virtual

Gets the dictionary of available discovery services.

Parameters
[out]servicesThe dictionary of available discovery services.

◆ getLogger()

virtual ErrCode INTERFACE_FUNC getLogger ( ILogger **  logger)
pure virtual

Gets the logger.

Parameters
[out]loggerThe logger.

◆ getModuleManager()

virtual ErrCode INTERFACE_FUNC getModuleManager ( IBaseObject **  manager)
pure virtual

Gets the Module Manager as a Base Object.

Parameters
[out]managerThe module manager.

◆ getModuleOptions()

virtual ErrCode INTERFACE_FUNC getModuleOptions ( IString moduleId,
IDict **  options 
)
pure virtual

Retrieves the options associated with the specified module ID.

Parameters
moduleIdThe identifier of the module for which options are requested.
[out]optionsA dictionary containing the options associated with the specified module ID.

◆ getOnCoreEvent()

virtual ErrCode INTERFACE_FUNC getOnCoreEvent ( IEvent **  event)
pure virtual

Gets the Core Event object that triggers whenever a change happens within the openDAQ core structure.

Parameters
[out]eventThe Core Event object. The event triggers with a Component reference and a CoreEventArgs object as arguments.

The Core Event is triggered on various changes to the openDAQ Components. This includes changes to property values, addition/removal of child components, connecting signals to input ports and others. The event type can be identified via the event ID available within the CoreEventArgs object. Each event type has a set of predetermined parameters available in the parameters field of the arguments. These can be used by any openDAQ server, or other listener to react to changes within the core structure.

◆ getOptions()

virtual ErrCode INTERFACE_FUNC getOptions ( IDict **  options)
pure virtual

Gets the dictionary of options.

Parameters
[out]optionsThe dictionary of options

◆ getScheduler()

virtual ErrCode INTERFACE_FUNC getScheduler ( IScheduler **  scheduler)
pure virtual

Gets the scheduler.

Parameters
[out]schedulerThe scheduler.

◆ getTypeManager()

virtual ErrCode INTERFACE_FUNC getTypeManager ( ITypeManager **  manager)
pure virtual

Gets the Type Manager.

Parameters
[out]managerThe type manager.