|
ifw-daq 3.1.0
IFW Data Acquisition modules
|
Implements daq::Manager.
More...
#include <manager.hpp>
Inheritance diagram for daq::ManagerImpl:Public Member Functions | |
| ManagerImpl (rad::IoExecutor &executor, ManagerParams params, Workspace &workspace, fits::KeywordFormatter const &formatter, std::shared_ptr< ObservableEventLog > event_log, DaqControllerFactory &daq_factory, std::shared_ptr< DpmClient > dpm_client, log4cplus::Logger const &logger) | |
| ~ManagerImpl () noexcept | |
| void | RestoreFromWorkspace () override |
| Loads status and constructs DaqControllers corresponding to stored state. | |
| std::string | MakeDaqId (std::chrono::system_clock::time_point *time=nullptr) const override |
| Creates a new unique identifier based on the instrument id and current time. | |
| bool | HaveDaq (std::string_view id, std::string_view file_id={}) const noexcept override |
Query existing data acquisition by id and optional file_id. | |
| Status | GetStatus (std::string_view id) const override |
| Get status. | |
| boost::future< State > | StartDaqAsync (DaqContext ctx) override |
Start DaqController identified by id. | |
| boost::future< Status > | StopDaqAsync (std::string_view id, ErrorPolicy policy) override |
Stop DaqController identified by id. | |
| boost::future< Status > | AbortDaqAsync (std::string_view id, ErrorPolicy policy) override |
Abort DaqController identified by id. | |
| boost::future< Result< Status > > | AwaitDaqStateAsync (std::string_view id, State, std::chrono::milliseconds timeout) override |
| Await DAQ state. | |
| void | UpdateKeywords (std::string_view id, fits::KeywordVector const &keywords) override |
Update FITS keywords for DaqController identified by id. | |
| StatusSignal & | GetStatusSignal () override |
| std::vector< std::shared_ptr< DaqController const > > | GetDaqControllers () override |
Public Member Functions inherited from daq::Manager | |
| virtual | ~Manager () |
| virtual void | RestoreFromWorkspace ()=0 |
| Restore from state stored in workspace. | |
| 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 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. | |
| virtual Status | GetStatus (std::string_view id) const =0 |
| Get status. | |
| virtual boost::future< State > | StartDaqAsync (DaqContext ctx)=0 |
Start DaqController identified by id. | |
| virtual boost::future< Status > | StopDaqAsync (std::string_view id, ErrorPolicy policy)=0 |
Stop DaqController identified by id. | |
| virtual boost::future< Status > | AbortDaqAsync (std::string_view id, ErrorPolicy policy)=0 |
Abort DaqController identified by id. | |
| virtual boost::future< Result< Status > > | AwaitDaqStateAsync (std::string_view id, State state, std::chrono::milliseconds timeout)=0 |
| Await DAQ state. | |
| virtual void | UpdateKeywords (std::string_view id, fits::KeywordVector const &keywords)=0 |
Update FITS keywords for DaqController identified by id. | |
| virtual StatusSignal & | GetStatusSignal ()=0 |
| virtual std::vector< std::shared_ptr< DaqController const > > | GetDaqControllers ()=0 |
Additional Inherited Members | |
Public Types inherited from daq::Manager | |
| using | Signal = boost::signals2::signal< void(ObservableStatus const &)> |
Implements daq::Manager.
Definition at line 264 of file manager.hpp.
|
explicit |
| instrument_id | Instrument id. |
Definition at line 105 of file manager.cpp.
|
noexcept |
Definition at line 124 of file manager.cpp.
|
overridevirtual |
Abort DaqController identified by id.
| id | Data acquisition id. |
| policy | Error policy determining if errors are tolerated or not. |
id does not exist. Implements daq::Manager.
Definition at line 546 of file manager.cpp.
|
overridevirtual |
Await DAQ state.
| id | Data acquisition id. |
| state | target state to await. |
| timeout | How long to wait for state to be reached. |
id does not exist or timeout is negative. Implements daq::Manager.
Definition at line 554 of file manager.cpp.
|
overridevirtual |
Implements daq::Manager.
Definition at line 619 of file manager.cpp.
|
overridevirtual |
Get status.
| std::invalid_argument | if no data acquisition exist with provided id. |
Implements daq::Manager.
Definition at line 424 of file manager.cpp.
|
overridevirtual |
The status observer observes any DAQ status changes.
Implements daq::Manager.
Definition at line 615 of file manager.cpp.
|
overridevirtualnoexcept |
Query existing data acquisition by id and optional file_id.
| id | DAQ id to look up. |
| file_id | Optional file_id to look up. |
Implements daq::Manager.
Definition at line 223 of file manager.cpp.
|
overridevirtual |
Creates a new unique identifier based on the instrument id and current time.
If there is a id collision when using current time a millisecond jitter component is added until a unique id is found.
The format is the same as ARCFILE - the file extension: "<OLAS_ID>-2020-08-19T09:33:11.951"
| [out] | time | Optional time used to produce the ID. |
| std::system_error | on failure. |
Implements daq::Manager.
Definition at line 214 of file manager.cpp.
|
overridevirtual |
Loads status and constructs DaqControllers corresponding to stored state.
Implements daq::Manager.
Definition at line 139 of file manager.cpp.
|
overridevirtual |
Start DaqController identified by id.
| id | Data acquisition id. |
id does not exist. Implements daq::Manager.
Definition at line 498 of file manager.cpp.
|
overridevirtual |
Stop DaqController identified by id.
| id | Data acquisition id. |
| policy | Error policy determining if errors are tolerated or not. |
id does not exist. Implements daq::Manager.
Definition at line 538 of file manager.cpp.
|
overridevirtual |
Update FITS keywords for DaqController identified by id.
| id | Data acquisition id. |
| keywords | FITS keywords to update. |
| std::invalid_argument | if no data acquisition exist with provided id. |
| std::runtime_error | If DaqController state does not allow updating of keywords (it's e.g. already been submitted for merging). |
Implements daq::Manager.
Definition at line 611 of file manager.cpp.