|
ifw-daq
3.0.0-pre2
IFW Data Acquisition modules
|
Simulator that implements Modmetadaqsimif and sets up simulation behaviour for Simulator. More...
Public Member Functions | |
| def | __init__ (self, name, mal, dataroot) |
| DaqReply | StartDaq (self, str daq_id) |
| DaqStopReply | StopDaq (self, str daq_id) |
| DaqReply | AbortDaq (self, str daq_id) |
| DaqStatus | GetDaqStatus (self, str daq_id) |
| Daq | get_daq (self, daq_id) |
| Get daq or raise DaqException. More... | |
| DaqReply | make_daq_reply (self, daq_id) |
| DaqStatus | make_daq_status (self, daq_id) |
| Create DaqStatus instance. More... | |
| DaqStopReply | make_daq_stop_reply (self, daq_id) |
| Create DaqStopReply instance. More... | |
| def | add_sim_hook (self, str cmd_name, hook) |
Add the simulation hook hook for the specified command cmd_name (e.g. More... | |
| def | reset (self) |
| Reset simulator to initial default state. More... | |
| def | clear_sim_hooks (self) |
| Remove all simulation hooks. More... | |
| def | run_sim_hook (self, result, *args) |
| Runs simulation hook that may modify or replace the default implementation. More... | |
Public Attributes | |
| name | |
| mal | |
| dataroot | |
| current_daq | |
| daqs | |
| sim_hooks | |
Simulator that implements Modmetadaqsimif and sets up simulation behaviour for Simulator.
Registered hooks are run once and then removed before executed. Each hook is a callable that takes the result from the default implementation as well as the arguments given to the original implementation. The hook can then choose to modify the existing result or replace it.
Definition at line 49 of file simulator.py.
| def metadaq.simulator.Simulator.__init__ | ( | self, | |
| name, | |||
| mal, | |||
| dataroot | |||
| ) |
Definition at line 51 of file simulator.py.
| DaqReply metadaq.simulator.Simulator.AbortDaq | ( | self, | |
| str | daq_id | ||
| ) |
Definition at line 104 of file simulator.py.
| def metadaq.simulator.Simulator.add_sim_hook | ( | self, | |
| str | cmd_name, | ||
| hook | |||
| ) |
Add the simulation hook hook for the specified command cmd_name (e.g.
"StartDaq").
Any previous hooks will be replaced.
Definition at line 155 of file simulator.py.
| def metadaq.simulator.Simulator.clear_sim_hooks | ( | self | ) |
Remove all simulation hooks.
Definition at line 165 of file simulator.py.
| Daq metadaq.simulator.Simulator.get_daq | ( | self, | |
| daq_id | |||
| ) |
Get daq or raise DaqException.
Definition at line 119 of file simulator.py.
| DaqStatus metadaq.simulator.Simulator.GetDaqStatus | ( | self, | |
| str | daq_id | ||
| ) |
Definition at line 113 of file simulator.py.
| DaqReply metadaq.simulator.Simulator.make_daq_reply | ( | self, | |
| daq_id | |||
| ) |
Definition at line 124 of file simulator.py.
| DaqStatus metadaq.simulator.Simulator.make_daq_status | ( | self, | |
| daq_id | |||
| ) |
Create DaqStatus instance.
Definition at line 132 of file simulator.py.
| DaqStopReply metadaq.simulator.Simulator.make_daq_stop_reply | ( | self, | |
| daq_id | |||
| ) |
Create DaqStopReply instance.
Definition at line 142 of file simulator.py.
| def metadaq.simulator.Simulator.reset | ( | self | ) |
Reset simulator to initial default state.
Definition at line 159 of file simulator.py.
| def metadaq.simulator.Simulator.run_sim_hook | ( | self, | |
| result, | |||
| * | args | ||
| ) |
Runs simulation hook that may modify or replace the default implementation.
The hook to execute is automatically determined from the call stack, so this should only ever be executed directly from the service command implementation method.
Definition at line 174 of file simulator.py.
| DaqReply metadaq.simulator.Simulator.StartDaq | ( | self, | |
| str | daq_id | ||
| ) |
Definition at line 61 of file simulator.py.
| DaqStopReply metadaq.simulator.Simulator.StopDaq | ( | self, | |
| str | daq_id | ||
| ) |
Definition at line 72 of file simulator.py.
| metadaq.simulator.Simulator.current_daq |
Definition at line 55 of file simulator.py.
| metadaq.simulator.Simulator.daqs |
Definition at line 56 of file simulator.py.
| metadaq.simulator.Simulator.dataroot |
Definition at line 54 of file simulator.py.
| metadaq.simulator.Simulator.mal |
Definition at line 53 of file simulator.py.
| metadaq.simulator.Simulator.name |
Definition at line 52 of file simulator.py.
| metadaq.simulator.Simulator.sim_hooks |
Definition at line 58 of file simulator.py.