ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
mockScheduler.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * @ingroup daq_common_libdpm
4  * @copyright (c) Copyright ESO 2022
5  * All Rights Reserved
6  * ESO (eso.org) is an Intergovernmental Organisation, and therefore special legal conditions apply.
7  *
8  * @brief Mocks for daq::dpm::Scheduler and daq::dpm::DaqScheduler
9  */
10 #ifndef DAQ_DPM_MOCK_MOCKSCHEDULER_HPP
11 #define DAQ_DPM_MOCK_MOCKSCHEDULER_HPP
12 
13 #include <gmock/gmock.h>
14 
15 #include <daq/dpm/scheduler.hpp>
16 
17 namespace daq::dpm {
18 
20  MOCK_METHOD(void, Start, (), (override));
21  MOCK_METHOD(void, Stop, (), (override));
22  MOCK_METHOD(std::string, QueueDaq, (std::string const&), (override));
23  MOCK_METHOD(void, AbortDaq, (std::string const&), (override));
24  MOCK_METHOD(bool, IsQueued, (std::string const&), (const, noexcept, override));
25  MOCK_METHOD(Status, GetDaqStatus, (std::string const&), (const, override));
26  MOCK_METHOD(std::vector<std::string>, GetQueue, (), (const, noexcept, override));
27  MOCK_METHOD(boost::signals2::connection,
29  (StatusSignal::slot_type const& slot),
30  (override));
31 };
32 
34  MOCK_METHOD(void, Start, (), (override));
35  MOCK_METHOD(void, Stop, (), (override));
36  MOCK_METHOD(bool, IsStopped, (), (const, noexcept, override));
37  MOCK_METHOD(void, Poll, (), (override));
38  MOCK_METHOD(std::string const&, GetId, (), (const, noexcept, override));
39  MOCK_METHOD(bool, GetErrorFlag, (), (const, noexcept, override));
40  MOCK_METHOD(State, GetState, (), (const, noexcept, override));
41  MOCK_METHOD(std::filesystem::path const&, GetResult, (), (const, noexcept, override));
42  MOCK_METHOD(ObservableStatus const&, GetStatus, (), (const, noexcept, override));
43  MOCK_METHOD(ObservableStatus&, GetStatus, (), (noexcept, override));
44 };
45 
46 } // namespace daq::dpm
47 #endif // #ifndef DAQ_DPM_MOCK_MOCKSCHEDULER_HPP
Stores data acquisition status and allows subscription to status changes.
Definition: status.hpp:165
Controller for specific DAQ.
Definition: scheduler.hpp:59
virtual auto GetState() const noexcept -> State=0
virtual auto GetId() const noexcept -> std::string const &=0
virtual void Stop()=0
virtual void Poll()=0
virtual void Start()=0
Start/stop operations.
virtual auto GetErrorFlag() const noexcept -> bool=0
virtual auto GetStatus() noexcept -> ObservableStatus &=0
virtual auto GetResult() const noexcept -> std::filesystem::path const &=0
virtual bool IsStopped() const noexcept=0
Schedules asynchronous activities that results in merged Data Product and delivery.
Definition: scheduler.hpp:274
virtual std::vector< std::string > GetQueue() const noexcept=0
Queries current DAQ queue.
virtual std::string QueueDaq(std::string const &dp_spec)=0
Queues DAQ for processing.
virtual void Start()=0
Start/stop operations.
virtual bool IsQueued(std::string const &id) const noexcept=0
Queries if DAQ with ID has been queued before in the current workspace.
virtual boost::signals2::connection ConnectStatus(StatusSignal::slot_type const &slot)=0
Signals.
virtual void AbortDaq(std::string const &id)=0
Abort merging DAQ identified by id.
virtual Status GetDaqStatus(std::string const &id) const =0
Queries current DAQ status, possibly from last recorded status in workspace.
virtual void Stop()=0
State
Observable states of the data acquisition process.
Definition: state.hpp:39
daq::dpm::Scheduler and related class declarations.
Non observable status object that keeps stores status of data acquisition.
Definition: status.hpp:124
MOCK_METHOD(std::string const &, GetId,(),(const, noexcept, override))
MOCK_METHOD(State, GetState,(),(const, noexcept, override))
MOCK_METHOD(void, Poll,(),(override))
MOCK_METHOD(ObservableStatus &, GetStatus,(),(noexcept, override))
MOCK_METHOD(ObservableStatus const &, GetStatus,(),(const, noexcept, override))
MOCK_METHOD(bool, IsStopped,(),(const, noexcept, override))
MOCK_METHOD(std::filesystem::path const &, GetResult,(),(const, noexcept, override))
MOCK_METHOD(void, Stop,(),(override))
MOCK_METHOD(bool, GetErrorFlag,(),(const, noexcept, override))
MOCK_METHOD(void, Start,(),(override))
MOCK_METHOD(std::vector< std::string >, GetQueue,(),(const, noexcept, override))
MOCK_METHOD(void, Stop,(),(override))
MOCK_METHOD(Status, GetDaqStatus,(std::string const &),(const, override))
MOCK_METHOD(bool, IsQueued,(std::string const &),(const, noexcept, override))
MOCK_METHOD(std::string, QueueDaq,(std::string const &),(override))
MOCK_METHOD(void, AbortDaq,(std::string const &),(override))
MOCK_METHOD(boost::signals2::connection, ConnectStatus,(StatusSignal::slot_type const &slot),(override))
MOCK_METHOD(void, Start,(),(override))