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