ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
Go to the documentation of this file. 1 #ifndef DAQ_OCM_SERVER_MOCK_MANAGER_MOCK_HPP_
2 #define DAQ_OCM_SERVER_MOCK_MANAGER_MOCK_HPP_
7 #include <gmock/gmock.h>
19 std::chrono::milliseconds));
33 throw std::runtime_error(
"not implemented");
36 throw std::runtime_error(
"not implemented");
39 throw std::runtime_error(
"not implemented");
42 throw std::runtime_error(
"not implemented");
45 throw std::runtime_error(
"not implemented");
47 boost::future<daq::State>
48 AwaitAsync(std::vector<std::string> sources, std::chrono::milliseconds timeout)
override {
49 throw std::runtime_error(
"not implemented");
61 throw std::runtime_error(
"not implemented");
73 boost::signals2::connection
75 return signal.connect(slot);
80 std::shared_ptr<daq::ObservableStatus>
status;
84 #endif // #ifndef DAQ_OCM_SERVER_MOCK_MANAGER_MOCK_HPP_
boost::future< daq::Status > AbortAsync(daq::ErrorPolicy policy) override
Aborts the data acquisition.
MOCK_CONST_METHOD1(GetStatus, daq::Status(std::string_view))
State
Observable states of the data acquisition process.
virtual void UpdateKeywords(std::string_view id, fits::KeywordVector const &keywords)=0
Update FITS keywords for DaqController identified by id.
boost::signals2::connection ConnectContext(ContextSignal::slot_type const &slot) override
Connect observer that is invoked when context is modified.
MOCK_CONST_METHOD1(MakeDaqId, std::string(std::chrono::system_clock::time_point *))
MOCK_METHOD0(GetStatusSignal, daq::StatusSignal &())
daq::DaqContext const & GetContext() const DAQ_NOEXCEPT override
Declaration of daq::Manager
void UpdateKeywords(daq::fits::KeywordVector const &keywords) override
Updates (replace or add) list of keywords.
std::string id
DAQ identfier, possibly provided by user.
virtual bool HaveDaq(std::string_view id, std::string_view file_id={}) const DAQ_NOEXCEPT=0
Query existing data acquisition by id and optional file_id.
MOCK_METHOD2(UpdateKeywords, void(std::string_view, daq::fits::KeywordVector const &))
std::shared_ptr< daq::ObservableStatus > GetStatus() DAQ_NOEXCEPT override
virtual StatusSignal & GetStatusSignal()=0
std::string const & GetId() const DAQ_NOEXCEPT override
MOCK_METHOD0(RestoreFromWorkspace, void())
boost::future< daq::State > StartAsync() override
Starts the data acquisition.
std::shared_ptr< daq::ObservableStatus > status
virtual boost::future< Result< Status > > AwaitDaqStateAsync(std::string_view id, State state, std::chrono::milliseconds timeout)=0
Await DAQ state.
boost::future< daq::Status > StopAsync(daq::ErrorPolicy policy) override
Stops the data acquisition.
Structure carrying context needed to start a Data Acquisition and construct a Data Product Specificat...
virtual std::string MakeDaqId(std::chrono::system_clock::time_point *time=nullptr) const =0
Creates a new unique identifier based on the instrument id and current time.
virtual boost::future< Status > StopDaqAsync(std::string_view id, ErrorPolicy policy)=0
Stop DaqController identified by id.
DaqControllerFake(std::shared_ptr< daq::ObservableStatus > status_arg)
virtual boost::future< State > StartDaqAsync(DaqContext ctx)=0
Start DaqController identified by id.
Utility class that represents a result and an error.
Contains declaration for for DaqController.
virtual std::vector< std::shared_ptr< DaqController const > > GetDaqControllers()=0
Contains declaration for Status and ObservableStatus.
MOCK_CONST_METHOD2(HaveDaq, bool(std::string_view, std::string_view))
daq::State GetState() const DAQ_NOEXCEPT override
boost::future< daq::State > AwaitAsync(std::vector< std::string > sources, std::chrono::milliseconds timeout) override
Awaits that data acquisition stops or aborts.
MOCK_METHOD2(AbortDaqAsync, boost::future< daq::Status >(std::string_view, daq::ErrorPolicy))
bool GetErrorFlag() const DAQ_NOEXCEPT override
MOCK_METHOD1(StartDaqAsync, boost::future< daq::State >(daq::DaqContext))
Non observable status object that keeps stores status of data acquisition.
virtual void RestoreFromWorkspace()=0
Restore from state stored in workspace.
std::vector< KeywordVariant > KeywordVector
Vector of keywords.
MOCK_METHOD2(StopDaqAsync, boost::future< daq::Status >(std::string_view, daq::ErrorPolicy))
std::shared_ptr< daq::ObservableStatus const > GetStatus() const DAQ_NOEXCEPT override
boost::future< daq::State > ScheduleMergeAsync() override
Schedules DAQ for merging by sending request to DPM.
MOCK_METHOD3(AwaitDaqStateAsync, boost::future< daq::Result< daq::Status >>(std::string_view, daq::State, std::chrono::milliseconds))
Controls the execution of single data acquisition that ultimately result in a set of FITS keywords an...
boost::signals2::signal< void(DaqContext const &)> ContextSignal
ErrorPolicy
Error policy supported by certain operations.
virtual Status GetStatus(std::string_view id) const =0
Get status.
MOCK_METHOD0(GetDaqControllers, std::vector< std::shared_ptr< daq::DaqController const >>())
Manager owns DaqController and FitsController (active data acquisitions) instances and multiplexes re...
std::shared_ptr< daq::ObservableEventLog > GetEventLog() DAQ_NOEXCEPT override
virtual boost::future< Status > AbortDaqAsync(std::string_view id, ErrorPolicy policy)=0
Abort DaqController identified by id.