liftof_rb::threads::monitoring

Function monitoring

Source
pub fn monitoring(
    board_id: u8,
    tp_sender: &Sender<TofPacket>,
    rb_moni_interval: f32,
    pa_moni_every_x: f32,
    pb_moni_every_x: f32,
    ltb_moni_every_x: f32,
    verbose: bool,
    thread_control: Arc<Mutex<ThreadControl>>,
)
Expand description

Gather monitoring data and pass it on over a channel

The readout of all other than the RB sensors itself (RBMoniData) is locked to the readout of the RB sensors. The readout interval of the other sensors has to be specified in numbers of rb_moni_interval.

§Arguments:

  • board_id - this RB’s ID. It will be used for all monitoring data as identifiier.
  • tp_sender - the resulting moni data will be wrapped in TofPackets. Use tp_sender to send them to their destination
  • rb_moni_interval - Number of seconds between 2 consecutive polls of RBMoniData. Set to 0 to disable monitoring.
  • pa_moni_every_x - Get PA (preamp) moni data every x polls of RBMoniData Set to 0 to disable monitoring.
  • pb_moni_every_x - Get PB (power board) moni data every x polls of RBMoniData Set to 0 to disable monitoring.
  • ltb_moni_every_x - Get LTB moni data every x polls of RBMoniData Set to 0 to disable monitoring.
  • verbose - print additional output for debugging
  • thread_control - central thread control, e.g. kill signal