openDAQ
Open data acquisition platform
ContextPtr Class Reference

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

Inherits ObjectPtr< 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

daq::SchedulerPtr getScheduler () const
 Gets the scheduler. More...
 
daq::LoggerPtr getLogger () const
 Gets the logger. More...
 
daq::BaseObjectPtr getModuleManager () const
 Gets the Module Manager as a Base Object. More...
 
daq::TypeManagerPtr getTypeManager () const
 Gets the Type Manager. More...
 
daq::AuthenticationProviderPtr getAuthenticationProvider () const
 Gets the Authentication provider. More...
 
daq::Event< daq::ComponentPtr, daq::CoreEventArgsPtr > getOnCoreEvent () const
 Gets the Core Event object that triggers whenever a change happens within the openDAQ core structure. More...
 
daq::DictPtr< daq::IString, daq::IBaseObject > getOptions () const
 Gets the dictionary of options. More...
 
daq::DictPtr< daq::IString, daq::IBaseObject > getModuleOptions (const daq::StringPtr &moduleId) const
 Retrieves the options associated with the specified module ID. More...
 
daq::DictPtr< daq::IString, daq::IBaseObject > getDiscoveryServers () const
 Gets the dictionary of available discovery services. More...
 

Member Function Documentation

◆ getAuthenticationProvider()

daq::AuthenticationProviderPtr getAuthenticationProvider ( ) const
inline

Gets the Authentication provider.

Returns
The authentication provider.

◆ getDiscoveryServers()

daq::DictPtr<daq::IString, daq::IBaseObject> getDiscoveryServers ( ) const
inline

Gets the dictionary of available discovery services.

Returns
The dictionary of available discovery services.

◆ getLogger()

daq::LoggerPtr getLogger ( ) const
inline

Gets the logger.

Returns
The logger.

◆ getModuleManager()

daq::BaseObjectPtr getModuleManager ( ) const
inline

Gets the Module Manager as a Base Object.

Returns
The module manager.

◆ getModuleOptions()

daq::DictPtr<daq::IString, daq::IBaseObject> getModuleOptions ( const daq::StringPtr &  moduleId) const
inline

Retrieves the options associated with the specified module ID.

Parameters
moduleIdThe identifier of the module for which options are requested.
Returns
A dictionary containing the options associated with the specified module ID.

◆ getOnCoreEvent()

daq::Event<daq::ComponentPtr, daq::CoreEventArgsPtr> getOnCoreEvent ( ) const
inline

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

Returns
The 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()

daq::DictPtr<daq::IString, daq::IBaseObject> getOptions ( ) const
inline

Gets the dictionary of options.

Returns
The dictionary of options

◆ getScheduler()

daq::SchedulerPtr getScheduler ( ) const
inline

Gets the scheduler.

Returns
The scheduler.

◆ getTypeManager()

daq::TypeManagerPtr getTypeManager ( ) const
inline

Gets the Type Manager.

Returns
The type manager.