ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
Public Member Functions | Protected Member Functions | List of all members
daq::CommonDaqController Class Reference

Implements common behaviour of OcmDaqController and DpmDaqController. More...

#include <daqController.hpp>

+ Inheritance diagram for daq::CommonDaqController:

Public Member Functions

 CommonDaqController (boost::asio::io_context &io_context, DaqContext context, std::shared_ptr< ObservableStatus > status, std::shared_ptr< ObservableEventLog > event_log)
 
std::shared_ptr< ObservableStatusGetStatus () DAQ_NOEXCEPT override
 
std::shared_ptr< ObservableStatus const > GetStatus () const DAQ_NOEXCEPT override
 
std::shared_ptr< ObservableEventLogGetEventLog () DAQ_NOEXCEPT override
 
std::string const & GetId () const DAQ_NOEXCEPT override
 
bool GetErrorFlag () const DAQ_NOEXCEPT override
 
DaqContext const & GetContext () const DAQ_NOEXCEPT override
 
boost::signals2::connection ConnectContext (ContextSignal::slot_type const &slot) override
 Connect observer that is invoked when context is modified. More...
 
- Public Member Functions inherited from daq::DaqController
 DaqController ()=default
 
virtual ~DaqController ()=default
 
virtual boost::future< StateStartAsync ()=0
 Starts the data acquisition. More...
 
virtual boost::future< StatusStopAsync (ErrorPolicy policy)=0
 Stops the data acquisition. More...
 
virtual boost::future< StatusAbortAsync (ErrorPolicy policy)=0
 Aborts the data acquisition. More...
 
virtual boost::future< StateScheduleMergeAsync ()=0
 Schedules DAQ for merging by sending request to DPM. More...
 
virtual void UpdateKeywords (fits::KeywordVector const &keywords)=0
 Updates (replace or add) list of keywords. More...
 
virtual boost::future< StateAwaitAsync (std::vector< std::string > sources, std::chrono::milliseconds timeout)=0
 Awaits that data acquisition stops or aborts. More...
 
virtual State GetState () const DAQ_NOEXCEPT=0
 

Protected Member Functions

template<class T , class... Args>
void AddEvent (Args &&... args)
 
boost::asio::io_context & GetIoCtx () noexcept
 
rad::IoExecutorGetIoExecutor () noexcept
 
DaqContextGetContextMut () noexcept
 
ObservableEventLogGetEventLogRef () noexcept
 
ObservableStatusGetStatusRef () noexcept
 
ObservableStatus const & GetStatusRef () const noexcept
 
void EmitContextSignal ()
 

Additional Inherited Members

- Public Types inherited from daq::DaqController
using ContextSignal = boost::signals2::signal< void(DaqContext const &)>
 

Detailed Description

Implements common behaviour of OcmDaqController and DpmDaqController.

Definition at line 333 of file daqController.hpp.

Constructor & Destructor Documentation

◆ CommonDaqController()

daq::CommonDaqController::CommonDaqController ( boost::asio::io_context &  io_context,
DaqContext  context,
std::shared_ptr< ObservableStatus status,
std::shared_ptr< ObservableEventLog event_log 
)

Definition at line 114 of file daqController.cpp.

Member Function Documentation

◆ AddEvent()

template<class T , class... Args>
void daq::CommonDaqController::AddEvent ( Args &&...  args)
inlineprotected

Definition at line 350 of file daqController.hpp.

◆ ConnectContext()

boost::signals2::connection daq::CommonDaqController::ConnectContext ( ContextSignal::slot_type const &  slot)
overridevirtual

Connect observer that is invoked when context is modified.

Parameters
oObserver callable invoked on context changes.
Returns
signal connection object that can be used to disconnect observer:

Implements daq::DaqController.

Definition at line 152 of file daqController.cpp.

◆ EmitContextSignal()

void daq::CommonDaqController::EmitContextSignal ( )
inlineprotected

Definition at line 371 of file daqController.hpp.

◆ GetContext()

DaqContext const & daq::CommonDaqController::GetContext ( ) const
overridevirtual

Implements daq::DaqController.

Definition at line 147 of file daqController.cpp.

◆ GetContextMut()

DaqContext& daq::CommonDaqController::GetContextMut ( )
inlineprotectednoexcept

Definition at line 359 of file daqController.hpp.

◆ GetErrorFlag()

bool daq::CommonDaqController::GetErrorFlag ( ) const
overridevirtual
Returns
Error flag.

Implements daq::DaqController.

Definition at line 143 of file daqController.cpp.

◆ GetEventLog()

std::shared_ptr< ObservableEventLog > daq::CommonDaqController::GetEventLog ( )
overridevirtual
Returns
event log associated with this daq.

Implements daq::DaqController.

Definition at line 135 of file daqController.cpp.

◆ GetEventLogRef()

ObservableEventLog& daq::CommonDaqController::GetEventLogRef ( )
inlineprotectednoexcept

Definition at line 362 of file daqController.hpp.

◆ GetId()

std::string const & daq::CommonDaqController::GetId ( ) const
overridevirtual
Returns
data acquisition identifier.

Implements daq::DaqController.

Definition at line 139 of file daqController.cpp.

◆ GetIoCtx()

boost::asio::io_context& daq::CommonDaqController::GetIoCtx ( )
inlineprotectednoexcept

Definition at line 353 of file daqController.hpp.

◆ GetIoExecutor()

rad::IoExecutor& daq::CommonDaqController::GetIoExecutor ( )
inlineprotectednoexcept

Definition at line 356 of file daqController.hpp.

◆ GetStatus() [1/2]

std::shared_ptr< ObservableStatus const > daq::CommonDaqController::GetStatus ( ) const
overridevirtual

Implements daq::DaqController.

Definition at line 131 of file daqController.cpp.

◆ GetStatus() [2/2]

std::shared_ptr< ObservableStatus > daq::CommonDaqController::GetStatus ( )
overridevirtual
Returns
status object associated with this daq.

Implements daq::DaqController.

Definition at line 127 of file daqController.cpp.

◆ GetStatusRef() [1/2]

ObservableStatus const& daq::CommonDaqController::GetStatusRef ( ) const
inlineprotectednoexcept

Definition at line 368 of file daqController.hpp.

◆ GetStatusRef() [2/2]

ObservableStatus& daq::CommonDaqController::GetStatusRef ( )
inlineprotectednoexcept

Definition at line 365 of file daqController.hpp.


The documentation for this class was generated from the following files: