8 #ifndef OCM_DAQ_TEST_MOCK_DAQ_CONTROLLER_HPP_
9 #define OCM_DAQ_TEST_MOCK_DAQ_CONTROLLER_HPP_
14 #include <gmock/gmock.h>
29 boost::future<daq::State>(std::vector<std::string>, std::chrono::milliseconds));
41 boost::signals2::connection
43 return signal.connect(slot);
53 std::shared_ptr<ObservableStatus> status,
54 std::shared_ptr<ObservableEventLog> event_log)
55 -> std::shared_ptr<DaqController>
override {
59 std::shared_ptr<ObservableStatus> status,
60 std::shared_ptr<ObservableEventLog> event_log)
61 -> std::shared_ptr<DaqController>
override {
65 std::map<std::string, std::shared_ptr<DaqControllerMock>>
ocm_mocks;
66 std::map<std::string, std::shared_ptr<DaqControllerMock>>
dpm_mocks;
Abstract factory for DaqControllers.
Controls the execution of single data acquisition that ultimately result in a set of FITS keywords an...
virtual boost::future< Status > StopAsync(ErrorPolicy policy)=0
Stops the data acquisition.
virtual std::shared_ptr< ObservableStatus > GetStatus() DAQ_NOEXCEPT=0
virtual boost::future< Status > AbortAsync(ErrorPolicy policy)=0
Aborts the data acquisition.
virtual boost::future< State > AwaitAsync(std::vector< std::string > sources, std::chrono::milliseconds timeout)=0
Awaits that data acquisition stops or aborts.
virtual DaqContext const & GetContext() const DAQ_NOEXCEPT=0
virtual boost::future< State > ScheduleMergeAsync()=0
Schedules DAQ for merging by sending request to DPM.
virtual void UpdateKeywords(fits::KeywordVector const &keywords)=0
Updates (replace or add) list of keywords.
virtual boost::future< State > StartAsync()=0
Starts the data acquisition.
virtual std::string const & GetId() const DAQ_NOEXCEPT=0
virtual bool GetErrorFlag() const DAQ_NOEXCEPT=0
boost::signals2::signal< void(DaqContext const &)> ContextSignal
virtual std::shared_ptr< ObservableEventLog > GetEventLog() DAQ_NOEXCEPT=0
std::vector< KeywordVariant > KeywordVector
Vector of keywords.
ErrorPolicy
Error policy supported by certain operations.
State
Observable states of the data acquisition process.
Contains declaration for for DaqController.
Structure carrying context needed to start a Data Acquisition and construct a Data Product Specificat...
Factory that creates mock versions.
auto MakeOcmPhase(DaqContext daq_ctx, std::shared_ptr< ObservableStatus > status, std::shared_ptr< ObservableEventLog > event_log) -> std::shared_ptr< DaqController > override
Create instance for the OCM phase of the DAQ process.
auto MakeDpmPhase(DaqContext daq_ctx, std::shared_ptr< ObservableStatus > status, std::shared_ptr< ObservableEventLog > event_log) -> std::shared_ptr< DaqController > override
Create instance for the DPM phase of the DAQ process.
std::map< std::string, std::shared_ptr< DaqControllerMock > > dpm_mocks
std::map< std::string, std::shared_ptr< DaqControllerMock > > ocm_mocks
Mock version of daq::DaqController.
MOCK_CONST_METHOD0(GetStatus, std::shared_ptr< daq::ObservableStatus const >())
MOCK_METHOD2(AwaitAsync, boost::future< daq::State >(std::vector< std::string >, std::chrono::milliseconds))
MOCK_CONST_METHOD0(GetErrorFlag, bool())
MOCK_METHOD1(StopAsync, boost::future< daq::Status >(ErrorPolicy))
MOCK_METHOD0(StartAsync, boost::future< daq::State >())
MOCK_METHOD0(GetEventLog, std::shared_ptr< daq::ObservableEventLog >())
boost::signals2::connection ConnectContext(ContextSignal::slot_type const &slot) override
Connect observer that is invoked when context is modified.
MOCK_CONST_METHOD0(GetContext, DaqContext const &())
MOCK_METHOD0(ScheduleMergeAsync, boost::future< daq::State >())
MOCK_METHOD0(GetStatus, std::shared_ptr< daq::ObservableStatus >())
daq::State GetState() const override
MOCK_METHOD1(AbortAsync, boost::future< daq::Status >(ErrorPolicy))
MOCK_CONST_METHOD0(GetId, std::string const &())
MOCK_METHOD1(UpdateKeywords, void(fits::KeywordVector const &))