|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
What one hold is: how long, and who to tell. More...
#include <HoldTimer.hpp>
Public Attributes | |
| uint32_t | duration_ms = 0 |
| How long to hold, in milliseconds. | |
| uint32_t | extended_ms = 0 |
| What extend() restarts the countdown at, measured from the extend call. | |
| std::function< void()> | on_expire |
| Called when the hold ends of its own accord. | |
| std::function< void(bool)> | on_active |
| true when the hold begins, false when it ends by any path. | |
| std::string | label = "HOLD" |
| Names this hold in the log ("FIRE", "Flow Test"). | |
What one hold is: how long, and who to tell.
The durations arrive here rather than living on the timer as members. That is deliberate – FireManager carried them in fire_duration_ms_ behind a configure() setter documented "call before start()", and reloadConfig() was exactly the caller that forgot, so a burn silently ran the previous config's window. A number that is passed in cannot go stale.
Definition at line 22 of file HoldTimer.hpp.
| uint32_t sequencer::HoldSpec::duration_ms = 0 |
How long to hold, in milliseconds.
Definition at line 24 of file HoldTimer.hpp.
| uint32_t sequencer::HoldSpec::extended_ms = 0 |
What extend() restarts the countdown at, measured from the extend call.
0 refuses extend() entirely – a characterization pulse has a duration the operator asked for, and stretching it silently would make the mass they weighed describe a different window.
Definition at line 28 of file HoldTimer.hpp.
| std::string sequencer::HoldSpec::label = "HOLD" |
Names this hold in the log ("FIRE", "Flow Test").
Definition at line 36 of file HoldTimer.hpp.
| std::function<void(bool)> sequencer::HoldSpec::on_active |
true when the hold begins, false when it ends by any path.
nullptr means nobody is told – which is how a hold that the controller must not hear about simply has no way to notify it, rather than relying on a suppression flag someone can forget to check.
Definition at line 34 of file HoldTimer.hpp.
| std::function<void()> sequencer::HoldSpec::on_expire |
Called when the hold ends of its own accord.
Not called when stop() cancels it.
Definition at line 30 of file HoldTimer.hpp.