|
ifw-daq
3.0.0-pre2
IFW Data Acquisition modules
|
Manager owns DaqController and FitsController (active data acquisitions) instances and multiplexes requests to them. More...
#include <manager.hpp>
Inheritance diagram for daq::Manager:Public Types | |
| using | Signal = boost::signals2::signal< void(ObservableStatus const &)> |
Public Member Functions | |
| virtual | ~Manager () |
| virtual void | RestoreFromWorkspace ()=0 |
| Restore from state stored in workspace. More... | |
| 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. More... | |
| 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. More... | |
| virtual Status | GetStatus (std::string_view id) const =0 |
| Get status. More... | |
| virtual boost::future< State > | StartDaqAsync (DaqContext ctx)=0 |
Start DaqController identified by id. More... | |
| virtual boost::future< Status > | StopDaqAsync (std::string_view id, ErrorPolicy policy)=0 |
Stop DaqController identified by id. More... | |
| virtual boost::future< Status > | AbortDaqAsync (std::string_view id, ErrorPolicy policy)=0 |
Abort DaqController identified by id. More... | |
| virtual boost::future< Result< Status > > | AwaitDaqStateAsync (std::string_view id, State state, std::chrono::milliseconds timeout)=0 |
| Await DAQ state. More... | |
| virtual void | UpdateKeywords (std::string_view id, fits::KeywordVector const &keywords)=0 |
Update FITS keywords for DaqController identified by id. More... | |
| virtual StatusSignal & | GetStatusSignal ()=0 |
| virtual std::vector< std::shared_ptr< DaqController const > > | GetDaqControllers ()=0 |
Manager owns DaqController and FitsController (active data acquisitions) instances and multiplexes requests to them.
Important responsibilities:
DaqController instance as part of a new data acquisition (using factory)DaqController with another implementation to perform the merging (triggered when DAQ reaches Stopped state).FitsController also act as a data source.
Out of scope:
FitsController instances.Definition at line 124 of file manager.hpp.
| using daq::Manager::Signal = boost::signals2::signal<void(ObservableStatus const&)> |
Definition at line 128 of file manager.hpp.
|
inlinevirtual |
Definition at line 126 of file manager.hpp.
|
pure virtual |
Abort DaqController identified by id.
| id | Data acquisition id. |
| policy | Error policy determining if errors are tolerated or not. |
id does not exist. Implemented in daq::ManagerImpl.
|
pure virtual |
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. Implemented in daq::ManagerImpl.
|
pure virtual |
Implemented in daq::ManagerImpl.
|
pure virtual |
Get status.
| std::invalid_argument | if no data acquisition exist with provided id. |
Implemented in daq::ManagerImpl.
|
pure virtual |
The status observer observes any DAQ status changes.
Implemented in daq::ManagerImpl.
|
pure virtual |
Query existing data acquisition by id and optional file_id.
| id | DAQ id to look up. |
| file_id | Optional file_id to look up. |
Implemented in daq::ManagerImpl.
|
pure virtual |
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. |
Implemented in daq::ManagerImpl.
|
pure virtual |
Restore from state stored in workspace.
This should typically only be done after construction and not when running.
Implemented in daq::ManagerImpl.
|
pure virtual |
Start DaqController identified by id.
| id | Data acquisition id. |
id does not exist. Implemented in daq::ManagerImpl.
|
pure virtual |
Stop DaqController identified by id.
| id | Data acquisition id. |
| policy | Error policy determining if errors are tolerated or not. |
id does not exist. Implemented in daq::ManagerImpl.
|
pure virtual |
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). |
Implemented in daq::ManagerImpl.