|
ifw-daq
1.0.0
IFW Data Acquisition modules
|
Go to the documentation of this file.
8 #ifndef DAQ_OCM_OCM_DAQ_SERVICE_HPP_
9 #define DAQ_OCM_OCM_DAQ_SERVICE_HPP_
15 #include <boost/asio/io_context.hpp>
20 #include <log4cplus/logger.h>
21 #include <mal/Mal.hpp>
23 namespace mal = ::elt::mal;
88 public std::enable_shared_from_this<OcmDaqService> {
104 boost::future<std::shared_ptr<::ocmif::DaqReply>>
106 const std::string& file_prefix,
107 const std::string& primary_sources,
108 const std::string& metadata_sources,
109 const std::string& properties)
override;
111 boost::future<std::shared_ptr<::ocmif::DaqReply>>
StopDaq(
const std::string&
id)
override;
113 boost::future<std::shared_ptr<::ocmif::DaqReply>>
116 boost::future<std::shared_ptr<::ocmif::DaqReply>>
117 AbortDaq(
const std::string&
id)
override;
119 boost::future<std::shared_ptr<::ocmif::DaqReply>>
122 boost::future<std::shared_ptr<::ocmif::DaqReply>>
123 UpdateKeywords(
const std::string&
id,
const std::string& keywords)
override;
125 boost::future<std::shared_ptr<::ocmif::AwaitDaqReply>>
127 ocmif::DaqState state,
128 ocmif::DaqSubState substate,
129 double timeout)
override;
131 boost::future<std::shared_ptr<::ocmif::DaqStatus>>
132 GetStatus(
const std::string&
id)
override;
134 boost::future<std::vector<std::shared_ptr<::ocmif::DaqStatus>>>
138 boost::future<std::shared_ptr<::ocmif::DaqReply>>
139 StopDaq(
const std::string&
id,
bool forced);
140 boost::future<std::shared_ptr<::ocmif::DaqReply>>
141 AbortDaq(
const std::string&
id,
bool forced);
143 boost::asio::io_context& m_io_ctx;
150 std::string m_output_path;
152 std::shared_ptr<daq::ObservableEventLog> m_event_log;
153 boost::signals2::connection m_log_observer_connection;
159 log4cplus::Logger m_logger;
162 #endif // #ifndef DAQ_OCM_OCM_DAQ_SERVICE_HPP_
bool operator==(ParsedSource const &rhs) const
ParsedSource & operator=(ParsedSource &&rhs)=default
ParsedSource ParseSourceUri(std::string_view s)
Parse user provided string in the format "<name>@<rr-uri>".
daq::DaqProperties ParseStartDaqProperties(std::string const &properties)
Parse the JSON properties user provides with StartDaq.
ParsedSource & operator=(ParsedSource const &rhs)=default
static constexpr char const * LOGGER_NAME
Structure carrying properties needed to start a DataAcquisition.
Adapts boost::asio::io_context into a compatible boost::thread Executor type.
Declaration of daq::Manager
boost::future< std::shared_ptr<::ocmif::DaqReply > > ForceStopDaq(const std::string &id) override
std::ostream & operator<<(std::ostream &os, ParsedSource const &s)
Contains declaration for EventLogObserverLogger.
boost::future< std::shared_ptr<::ocmif::DaqReply > > ForceAbortDaq(const std::string &id) override
A simple daq::ObservableEventLog observer that logs observed events to provided logger.
Contains declaration for EventLog, ObservableEventLog and related events.
Implements the MAL interface ocmif::OcmDaq (async version).
boost::future< std::shared_ptr<::ocmif::DaqReply > > AbortDaq(const std::string &id) override
boost::future< std::vector< std::shared_ptr<::ocmif::DaqStatus > > > GetActiveList() override
boost::future< std::shared_ptr<::ocmif::AwaitDaqReply > > AwaitDaqState(const std::string &id, ocmif::DaqState state, ocmif::DaqSubState substate, double timeout) override
std::vector< ParsedSource > ParseSourceUris(std::string_view s)
Parse user provided string in the format "<name>@<rr-uri>[ <name>@...]".
ParsedSource(ParsedSource &&)=default
OcmDaqService(boost::asio::io_context &io_ctx, mal::Mal &mal, daq::Manager &mgr, std::string output_path)
boost::future< std::shared_ptr<::ocmif::DaqReply > > StopDaq(const std::string &id) override
Manager owns DaqController and FitsController (active data acquisitions) instances and multiplexes re...
boost::future< std::shared_ptr<::ocmif::DaqReply > > UpdateKeywords(const std::string &id, const std::string &keywords) override
ParsedSource(ParsedSource const &)=default
Contains declaration of daq::Properties.
boost::future< std::shared_ptr<::ocmif::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<::ocmif::DaqStatus > > GetStatus(const std::string &id) override