|
ifw-daq
1.0.0
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>
20 std::chrono::milliseconds));
29 status(std::move(status_arg)) {
32 throw std::runtime_error(
"not implemented");
35 throw std::runtime_error(
"not implemented");
38 throw std::runtime_error(
"not implemented");
41 throw std::runtime_error(
"not implemented");
43 boost::future<daq::State>
44 AwaitAsync(std::vector<std::string> sources, std::chrono::milliseconds timeout)
override {
45 throw std::runtime_error(
"not implemented");
57 throw std::runtime_error(
"not implemented");
66 std::shared_ptr<daq::ObservableStatus>
status;
69 #endif // #ifndef DAQ_OCM_SERVER_MOCK_MANAGER_MOCK_HPP_
boost::future< daq::Status > AbortAsync(daq::ErrorPolicy policy) override
Aborts the data acquisition.
MOCK_METHOD1(StartDaqAsync, boost::future< daq::State >(std::string_view))
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.
virtual std::vector< std::shared_ptr< DaqController const > > GetDaqControllers()=0
MOCK_METHOD0(GetStatusSignal, daq::StatusSignal &())
Declaration of daq::Manager
void UpdateKeywords(daq::fits::KeywordVector const &keywords) override
Updates (replace or add) list of keywords.
MOCK_CONST_METHOD1(HaveDaq, bool(std::string_view))
MOCK_METHOD2(UpdateKeywords, void(std::string_view, daq::fits::KeywordVector const &))
std::shared_ptr< daq::ObservableStatus > GetStatus() DAQ_NOEXCEPT override
std::string const & GetId() const DAQ_NOEXCEPT override
boost::future< daq::State > StartAsync() override
Starts the data acquisition.
MOCK_METHOD1(AddDaq, void(std::shared_ptr< daq::DaqController >))
std::shared_ptr< daq::ObservableStatus > status
boost::future< daq::Status > StopAsync(daq::ErrorPolicy policy) override
Stops the data acquisition.
virtual std::string MakeDaqId() const =0
Creates a new unique identifier based on the instrumend id and current time.
virtual boost::future< Result< Status > > AwaitDaqStateAsync(std::string_view id, State state, std::chrono::milliseconds timeout)=0
Await DAQ state.
DaqControllerFake(std::shared_ptr< daq::ObservableStatus > status_arg)
Utility class that represents a result and an error.
Contains declaration for for DaqController.
Contains declaration for Status and ObservableStatus.
virtual bool HaveDaq(std::string_view id) const DAQ_NOEXCEPT=0
Query existing data acquisition by id.
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.
virtual boost::future< State > StartDaqAsync(std::string_view id)=0
Start DaqController identified by id.
MOCK_METHOD2(AbortDaqAsync, boost::future< daq::Status >(std::string_view, daq::ErrorPolicy))
bool GetErrorFlag() const DAQ_NOEXCEPT override
virtual boost::future< Status > AbortDaqAsync(std::string_view id, ErrorPolicy policy)=0
Abort DaqController identified by id.
Non observable status object that keeps stores status of data acquisition.
MOCK_CONST_METHOD0(MakeDaqId, std::string())
std::vector< KeywordVariant > KeywordVector
Vector of keywords.
virtual void AddDaq(std::shared_ptr< DaqController > daq)=0
Add data acquisition.
MOCK_METHOD2(StopDaqAsync, boost::future< daq::Status >(std::string_view, daq::ErrorPolicy))
virtual StatusSignal & GetStatusSignal()=0
std::shared_ptr< daq::ObservableStatus const > GetStatus() const DAQ_NOEXCEPT override
Manager owns DaqController and FitsController (active data acquisitions) instances and multiplexes re...
MOCK_METHOD3(AwaitDaqStateAsync, boost::future< daq::Result< daq::Status >>(std::string_view, daq::State, std::chrono::milliseconds))
ErrorPolicy
Error policy supported by certain operations.
Controls the execution of single data acquisition that ultimately result in a set of FITS keywords an...
MOCK_METHOD0(GetDaqControllers, std::vector< std::shared_ptr< daq::DaqController const >>())
virtual Status GetStatus(std::string_view id) const =0
Get status.
std::shared_ptr< daq::ObservableEventLog > GetEventLog() DAQ_NOEXCEPT override
virtual boost::future< Status > StopDaqAsync(std::string_view id, ErrorPolicy policy)=0
Stop DaqController identified by id.