ifw-daq
3.0.0-pre2
IFW Data Acquisition modules
|
OCM Server application. More...
Files | |
file | ocmDaqService.cpp |
Declaration of OcmDaqService. | |
Classes | |
class | OcmDaqService |
Implements the MAL interface daqif::OcmDaq (async version). More... | |
OCM Server application.
class OcmDaqService |
Implements the MAL interface daqif::OcmDaq (async version).
The server is only safe to use as a shared pointer, as weak pointers to this object is stored in asynchronous continuations, apart from the initiating operation. Provided boost::asio::io_context must outlive object and any pending operations.
This object can be deleted while there are operations that have not complete yet. In that case, when the operation finally completes, an exception is sent as reply, even if the requested operation would have succeeded otherwise. The io_context must stay alive however, as it will be used as an executor when asynchonous operation is continued.
A note on thread safety:
The public (asynchronous) interface will immediately defer the execution to the provided executor, so depending on the executor this can provide thread safety.
Definition at line 98 of file ocmDaqService.hpp.
Public Member Functions | |
OcmDaqService (boost::asio::io_context &io_ctx, mal::Mal &mal, daq::Manager &mgr, std::string proc_name, std::string output_path, std::shared_ptr< daq::ObservableEventLog > event_log) | |
~OcmDaqService () | |
boost::future< std::shared_ptr<::daqif::DaqReply > > | StartDaq (const std::string &id, const std::string &file_prefix, const std::string &primary_sources, const std::string &metadata_sources, const std::string &properties) override |
boost::future< std::shared_ptr<::daqif::DaqReply > > | StartDaqV2 (const std::string &specification) override |
boost::future< std::shared_ptr<::daqif::DaqReply > > | StopDaq (const std::string &id) override |
boost::future< std::shared_ptr<::daqif::DaqReply > > | ForceStopDaq (const std::string &id) override |
boost::future< std::shared_ptr<::daqif::DaqReply > > | AbortDaq (const std::string &id) override |
boost::future< std::shared_ptr<::daqif::DaqReply > > | ForceAbortDaq (const std::string &id) override |
boost::future< std::shared_ptr<::daqif::DaqReply > > | UpdateKeywords (const std::string &id, const std::string &keywords) override |
boost::future< std::shared_ptr<::daqif::AwaitDaqReply > > | AwaitDaqState (const std::string &id, daqif::DaqState state, daqif::DaqSubState substate, double timeout) override |
boost::future< std::shared_ptr<::daqif::DaqStatus > > | GetStatus (const std::string &id) override |
boost::future< std::vector< std::shared_ptr<::daqif::DaqStatus > > > | GetActiveList () override |
Static Public Attributes | |
static constexpr char const * | LOGGER_NAME = "ocm.service.daq" |
OcmDaqService::OcmDaqService | ( | boost::asio::io_context & | io_ctx, |
mal::Mal & | mal, | ||
daq::Manager & | mgr, | ||
std::string | proc_name, | ||
std::string | output_path, | ||
std::shared_ptr< daq::ObservableEventLog > | event_log | ||
) |
io_ctx | ASIO io context to use as an executor. This object must outlive OcmDaqService. The io context will be progated to any created daq::DaqController instances as well. |
mal | The mal instance to use to create instances. This object must outlive OcmDaqService. |
mgr | The data acquisition manager to use. This object must outlive OcmDaqService. |
Definition at line 180 of file ocmDaqService.cpp.
OcmDaqService::~OcmDaqService | ( | ) |
Definition at line 204 of file ocmDaqService.cpp.
|
override |
Definition at line 482 of file ocmDaqService.cpp.
|
override |
Definition at line 696 of file ocmDaqService.cpp.
|
override |
Definition at line 497 of file ocmDaqService.cpp.
|
override |
Definition at line 384 of file ocmDaqService.cpp.
|
override |
Definition at line 670 of file ocmDaqService.cpp.
|
override |
Definition at line 638 of file ocmDaqService.cpp.
|
override |
Definition at line 209 of file ocmDaqService.cpp.
|
override |
Definition at line 316 of file ocmDaqService.cpp.
|
override |
Definition at line 369 of file ocmDaqService.cpp.
|
override |
Definition at line 574 of file ocmDaqService.cpp.
|
staticconstexpr |
Definition at line 101 of file ocmDaqService.hpp.