ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
Implements daq::Manager
.
More...
#include <manager.hpp>
Public Member Functions | |
ManagerImpl (rad::IoExecutor &executor, ManagerParams params, Workspace &workspace, std::shared_ptr< ObservableEventLog > event_log, DaqControllerFactory &daq_factory) | |
~ManagerImpl () noexcept | |
void | RestoreFromWorkspace () override |
Loads status and constructs DaqControllers corresponding to stored state. More... | |
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. More... | |
bool | HaveDaq (std::string_view id, std::string_view file_id={}) const noexcept override |
Query existing data acquisition by id and optional file_id . More... | |
Status | GetStatus (std::string_view id) const override |
Get status. More... | |
boost::future< State > | StartDaqAsync (DaqContext ctx) override |
Start DaqController identified by id . More... | |
boost::future< Status > | StopDaqAsync (std::string_view id, ErrorPolicy policy) override |
Stop DaqController identified by id . More... | |
boost::future< Status > | AbortDaqAsync (std::string_view id, ErrorPolicy policy) override |
Abort DaqController identified by id . More... | |
boost::future< Result< Status > > | AwaitDaqStateAsync (std::string_view id, State, std::chrono::milliseconds timeout) override |
Await DAQ state. More... | |
void | UpdateKeywords (std::string_view id, fits::KeywordVector const &keywords) override |
Update FITS keywords for DaqController identified by id . More... | |
StatusSignal & | GetStatusSignal () override |
std::vector< std::shared_ptr< DaqController const > > | GetDaqControllers () override |
Public Member Functions inherited from daq::Manager | |
virtual | ~Manager () |
Additional Inherited Members | |
Public Types inherited from daq::Manager | |
using | Signal = boost::signals2::signal< void(ObservableStatus const &)> |
Implements daq::Manager
.
Definition at line 253 of file manager.hpp.
|
explicit |
instrument_id | Instrument id. |
Definition at line 95 of file manager.cpp.
|
noexcept |
Definition at line 109 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 472 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 480 of file manager.cpp.
|
overridevirtual |
Implements daq::Manager.
Definition at line 526 of file manager.cpp.
|
overridevirtual |
Get status.
std::invalid_argument | if no data acquisition exist with provided id . |
Implements daq::Manager.
Definition at line 366 of file manager.cpp.
|
overridevirtual |
The status observer observes any DAQ status changes.
Implements daq::Manager.
Definition at line 522 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 205 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 196 of file manager.cpp.
|
overridevirtual |
Loads status and constructs DaqControllers corresponding to stored state.
Implements daq::Manager.
Definition at line 124 of file manager.cpp.
|
overridevirtual |
Start DaqController identified by id
.
id | Data acquisition id. |
id
does not exist. Implements daq::Manager.
Definition at line 432 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 464 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 518 of file manager.cpp.