ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
stop.hpp
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup daq_common_libdaq
4 * @copyright 2022 ESO - European Southern Observatory
5 *
6 * @brief Contains declaration for the StopAsync operation
7 */
8#ifndef OCM_DAQ_OP_STOP_HPP_
9#define OCM_DAQ_OP_STOP_HPP_
10#include <daq/config.hpp>
11
12#include <boost/thread/future.hpp>
13
14#include <daq/dpPart.hpp>
15#include <daq/error.hpp>
17#include <daq/utility.hpp>
18
19namespace daq::op {
20
21/**
22 * A composite async operation that starts DAQ
23 *
24 * @ingroup daq_common_libdaq
25 */
26struct StopAsync {
27public:
28 explicit StopAsync(ErrorPolicy policy, AsyncOpParams params) noexcept;
29 /**
30 * Initiates operation that stop metadata acquisition.
31 *
32 * @note Caller is responsible for keeping object alive until
33 * result is set.
34 *
35 * @todo: Return a move-only type containing only the data?
36 */
37 [[nodiscard]] boost::future<Result<DpParts>> Initiate();
38
39private:
40 [[nodiscard]] boost::future<void> StopMeta();
41 [[nodiscard]] boost::future<void> StopPrim();
42
43 ErrorPolicy m_policy;
44 AsyncOpParams m_params;
45 bool m_error;
46 std::vector<DpPart> m_parts;
47 std::string m_keywords;
48};
49
50} // namespace daq::op
51#endif // #ifndef OCM_DAQ_OP_STOP_HPP_
Contains declaration for DpPart.
Contains error related declarations for DAQ.
ErrorPolicy
Error policy supported by certain operations.
Definition: error.hpp:26
Parameters required for each async operation.
A composite async operation that starts DAQ.
Definition: stop.hpp:26
boost::future< Result< DpParts > > Initiate()
Initiates operation that stop metadata acquisition.
Definition: stop.cpp:26
Declaration of utilities.