ifw-daq
2.1.0-pre1
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> {
103 std::string proc_name,
104 std::string output_path,
105 std::shared_ptr<daq::ObservableEventLog> event_log);
108 boost::future<std::shared_ptr<::daqif::DaqReply>>
110 const std::string& file_prefix,
111 const std::string& primary_sources,
112 const std::string& metadata_sources,
113 const std::string& properties)
override;
115 boost::future<std::shared_ptr<::daqif::DaqReply>>
StopDaq(
const std::string&
id)
override;
117 boost::future<std::shared_ptr<::daqif::DaqReply>>
120 boost::future<std::shared_ptr<::daqif::DaqReply>>
121 AbortDaq(
const std::string&
id)
override;
123 boost::future<std::shared_ptr<::daqif::DaqReply>>
126 boost::future<std::shared_ptr<::daqif::DaqReply>>
127 UpdateKeywords(
const std::string&
id,
const std::string& keywords)
override;
129 boost::future<std::shared_ptr<::daqif::AwaitDaqReply>>
131 daqif::DaqState state,
132 daqif::DaqSubState substate,
133 double timeout)
override;
135 boost::future<std::shared_ptr<::daqif::DaqStatus>>
136 GetStatus(
const std::string&
id)
override;
138 boost::future<std::vector<std::shared_ptr<::daqif::DaqStatus>>>
142 boost::future<std::shared_ptr<::daqif::DaqReply>>
143 StopDaq(
const std::string&
id,
bool forced);
144 boost::future<std::shared_ptr<::daqif::DaqReply>>
145 AbortDaq(
const std::string&
id,
bool forced);
147 boost::asio::io_context& m_io_ctx;
154 std::string m_proc_name;
159 std::string m_output_path;
161 std::shared_ptr<daq::ObservableEventLog> m_event_log;
162 boost::signals2::connection m_log_observer_connection;
168 log4cplus::Logger m_logger;
171 #endif // #ifndef DAQ_OCM_OCM_DAQ_SERVICE_HPP_
bool operator==(ParsedSource const &rhs) const
boost::future< std::shared_ptr<::daqif::DaqReply > > ForceStopDaq(const std::string &id) override
boost::future< std::shared_ptr<::daqif::DaqStatus > > GetStatus(const std::string &id) override
ParsedSource & operator=(ParsedSource &&rhs)=default
ParsedSource ParseSourceUri(std::string_view s)
Parse user provided string in the format "<name>@<rr-uri>".
daq::DaqContext ParseStartDaqContext(std::string const &properties)
Parse the JSON properties user provides with StartDaq.
boost::future< std::vector< std::shared_ptr<::daqif::DaqStatus > > > GetActiveList() override
boost::future< std::shared_ptr<::daqif::DaqReply > > UpdateKeywords(const std::string &id, const std::string &keywords) override
ParsedSource & operator=(ParsedSource const &rhs)=default
static constexpr char const * LOGGER_NAME
Adapts boost::asio::io_context into a compatible boost::thread Executor type.
Declaration of daq::Manager
std::ostream & operator<<(std::ostream &os, ParsedSource const &s)
Contains declaration for EventLogObserverLogger.
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
Contains declaration for EventLog, ObservableEventLog and related events.
boost::future< std::shared_ptr<::daqif::DaqReply > > ForceAbortDaq(const std::string &id) override
Structure carrying context needed to start a Data Acquisition and construct a Data Product Specificat...
Implements the MAL interface daqif::OcmDaq (async version).
boost::future< std::shared_ptr<::daqif::DaqReply > > AbortDaq(const std::string &id) override
Contains declaration of daq::Context.
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 proc_name, std::string output_path, std::shared_ptr< daq::ObservableEventLog > event_log)
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::DaqReply > > StopDaq(const std::string &id) override
ParsedSource(ParsedSource const &)=default
A simple daq::ObservableEventLog observer that logs observed events to provided logger.
Manager owns DaqController and FitsController (active data acquisitions) instances and multiplexes re...