Module utils

Source
Expand description

A module containing utitlities functions for processing VBus data.

Functionsยง

calc_and_compare_checksum_v0
Calc and compare checksum according to VBus protocol version x.0.
calc_and_set_checksum_v0
Calc and set checksum according to VBus protocol version x.0.
calc_checksum_v0
Calc checksum according to VBus protocol version x.0.
calc_crc16
Calculate the CRC16 checksum over a slice of bytes.
copy_bytes_extracting_septett
Copy bytes from src to dst, extracting the MSB into a separate byte and appending it at the end of dst.
copy_bytes_injecting_septett
Copy bytes from src to dst, injecting the MSBs stored in a separate byte at the end of src.
has_msb_set
Checks a slice of bytes whether one of them has its MSB set.
utc_timestamp
Return a Utc timestamp for the given UNIX epoch seconds.