ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
abort.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 AbortAsync operation
7 */
8#ifndef OCM_DAQ_OP_ABORT_HPP_
9#define OCM_DAQ_OP_ABORT_HPP_
10#include <daq/config.hpp>
11
12#include <boost/thread/future.hpp>
13
14#include <daq/error.hpp>
16#include <daq/utility.hpp>
17
18namespace daq::op {
19
20/**
21 * A composite async operation that aborts a DAQ
22 *
23 * @ingroup daq_common_libdaq
24 */
25struct AbortAsync {
26public:
28
29 explicit AbortAsync(ErrorPolicy policy, AsyncOpParams params) noexcept;
30 /**
31 * Initiates operation that stats metadata acquisition.
32 *
33 * @returns future that is Set on failure or when also primary data acquisition has started.
34 * the value is Set after starting all (or failed).
35 *
36 * If tolerant policy is used exceptions from AbortMeta() or AbortPrim() are ignored.
37 */
38 [[nodiscard]] boost::future<ResultType> Initiate();
39
40private:
41 /**
42 * @throws std::exception derived exception if aborting failed.a
43 */
44 [[nodiscard]] boost::future<void> AbortMeta();
45 /**
46 * @throws std::exception derived exception if aborting failed.a
47 */
48 [[nodiscard]] boost::future<void> AbortPrim();
49
50 ErrorPolicy m_policy;
51 bool m_error;
52 AsyncOpParams m_params;
53};
54
55} // namespace daq::op
56#endif // #ifndef OCM_DAQ_OP_ABORT_HPP_
Contains error related declarations for DAQ.
ErrorPolicy
Error policy supported by certain operations.
Definition: error.hpp:26
Utility class that represents a result and an error.
Definition: utility.hpp:17
A composite async operation that aborts a DAQ.
Definition: abort.hpp:25
boost::future< ResultType > Initiate()
Initiates operation that stats metadata acquisition.
Definition: abort.cpp:24
Parameters required for each async operation.
Declaration of utilities.