Skip to main content

serial_number

Function serial_number 

Source
pub fn serial_number(frame: &[u8; 9]) -> Result<u64, SensorError>
Expand description

Decodes the nine bytes of get_serial_number to the 48-bit serial number.

Table 24: serial = word[0] << 32 | word[1] << 16 | word[2], each word followed by its CRC.

§Arguments

§Returns

The serial number.

§Errors

Returns SensorError::Crc if any of the three CRC bytes does not match its word.