11 /* Public: Parse a CAN signal from a message and apply required transformation.
13 * data - the payload containing the signal.
14 * bit_offset - the starting bit for the signal.
15 * bit_size - the width of the signal.
16 * factor - the transformation factor for the signal value, applied after
17 * pulling out the bit field. Use 1.0 for no factor.
18 * offset - the transformation offset for the signal value, applied after
19 * pulling out the bit field. Use 0 for no offset.
21 * Returns the decoded and transformed value of the signal.
23 float bitfield_parse_float(uint64_t data, uint8_t bit_offset, uint8_t bit_size,
24 float factor, float offset);
26 /* Public: Parse a CAN signal from a message and interpret it as a boolean.
28 * data - the payload containing the signal.
29 * bit_offset - the starting bit for the signal.
30 * bit_size - the width of the signal.
31 * factor - the transformation factor for the signal value, applied after
32 * pulling out the bit field. Use 1.0 for no factor.
33 * offset - the transformation offset for the signal value, applied after
34 * pulling out the bit field. Use 0 for no offset.
36 * Returns false if the value was 0, otherwise true.
38 bool bitfield_parse_bool(uint64_t data, uint8_t bit_offset, uint8_t bit_size,
39 float factor, float offset);