Function init_watchdog_settings

Source
pub fn init_watchdog_settings(
    slave_number: u32,
    offsets: &SlaveOffsets,
    get_reg_addr_ranges: &impl Fn(&SlaveOffsets, u16, &String) -> Vec<Range<usize>>,
) -> (Vec<Vec<Range<usize>>>, Vec<Vec<Range<usize>>>, Vec<Instant>, Vec<bool>, Vec<u8>)
Expand description

initialize the watchdog settings find the offsets of the controlword and statusword data in the domain data initialize the timestamp, flag and buffer for the watchdog data

§Arguments

  • slave_number - The number of slaves
  • offsets - The slave offsets
  • get_reg_addr_ranges - A function to get the register address ranges

§Returns

  • Vec<Vec<Range<usize>>> - The controlword offsets
  • Vec<Vec<Range<usize>>> - The statusword offsets
  • Vec<std::time::Instant> - The timestamps
  • Vec<bool> - The flag to check if the slave is responding
  • Vec<u8> - The buffer to store the watchdog data