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 slavesoffsets
- The slave offsetsget_reg_addr_ranges
- A function to get the register address ranges
§Returns
Vec<Vec<Range<usize>>>
- The controlword offsetsVec<Vec<Range<usize>>>
- The statusword offsetsVec<std::time::Instant>
- The timestampsVec<bool>
- The flag to check if the slave is respondingVec<u8>
- The buffer to store the watchdog data