8 #ifndef OCM_DAQ_OP_AWAIT_STATE_HPP_
9 #define OCM_DAQ_OP_AWAIT_STATE_HPP_
10 #include "../config.hpp"
12 #include <boost/asio/steady_timer.hpp>
13 #include <boost/signals2/connection.hpp>
14 #include <boost/thread/future.hpp>
15 #include <log4cplus/logger.h>
17 #include "../status.hpp"
18 #include "../utility.hpp"
44 std::shared_ptr<ObservableStatus> status,
46 std::chrono::milliseconds timeout,
47 log4cplus::Logger
const& logger);
59 [[nodiscard]] boost::future<ResultType>
Initiate();
64 void Abort() noexcept;
67 bool IsConditionSatisfied() const;
68 boost::asio::io_context& m_io_ctx;
71 std::chrono::milliseconds m_timeout;
84 boost::asio::steady_timer m_timer;
85 boost::signals2::scoped_connection m_connection;
86 log4cplus::Logger m_logger;
Stores data acquisition status and allows subscription to status changes.
State
Observable states of the data acquisition process.
Utility class that represents a result and an error.
Async operation to await Data Acquisition state.
boost::future< ResultType > Initiate()
Initiates operation that await state.
void Abort() noexcept
Aborts the operation and completes the operation with DaqOperationAborted.
AwaitStateAsync(boost::asio::io_context &io_ctx, std::shared_ptr< ObservableStatus > status, State state, std::chrono::milliseconds timeout, log4cplus::Logger const &logger)
Constructs operation with the privided parameters.