3. Document Conventions
Terms
- NvM
- Non-Volatile Memory
Hexadecimal Values
Hexadecimal values in this document will always be prefixed with “0x”. Hexadecimal format values in transaction snippets will be represented by a pair of x’s, for example:
xx
ASCII Values
ASCII text strings in transaction snippets will be represented by a pair of a’s, for example:
aa
Bitfields (Binary Values)
Binary values in this document will always be prefixed with “0b”. Binary (or bitfield) values in transaction snippets will be represented by single ‘b’ characters, for example:
b
Binary values will always be in groups that are multiples of 8 bits. In cases where some bits are unused, the unused bits will be marked as “Reserved”, for example.
bbbb b b b b
| | | | |
| | | | '-- Bit 0
| | | '-- Bit 1
| | '-- Bit 2
| '-- Bit 3
'-- Reserved
Reserved bits should be passed as zeros on writes and reads.
Grouped Bytes
If bytes are grouped (for example, 4 bytes used to represent a single 32-bit value) the transaction snippet will show the bytes as being connected using the ‘o’ character, for example:
xx xx xx xx
| | | |
'--o--o--o-- Represents a 32-bit value
Grouped values are always in Motorola format (i.e. most-significant byte first).
Floating Point Numbers
Floating point values are represented in transaction snippets as four ‘f’ character pairs, for example:
ff ff ff ff
| | | |
'--o--o--o-- Single-precision floating point value
The four pairs represent the four bytes of data transmitted over CAN that make up the single precision float value. The four pairs will always be grouped using the conventions outlined in section 2.3 above.
Grouped values are always in Motorola format (i.e. most-significant byte first).
Units
Units in transaction snippets will be called out inside a pair of square braces, for example:
[MotNwtMtr]
If no units are specified, then the signal’s units are assumed to be Counts.
Ranges
Ranges for signals in transaction snippets will be called out inside a pair of parentheses, for example:
(minimum, maximum)
If no range is specified, then the range for the signal’s value is assumed to be bounded by the signals type.
Type | Minimum | Maximum |
---|---|---|
uint8 | 0 | 255 |
uint16 | 0 | 65535 |
uint32 | 0 | 4294967295 |
sint8 | -128 | 127 |
sint16 | -32768 | 32767 |
sint32 | -2147483648 | 2147483647 |
float32 | error* | error* |
- *The float32 type does not have a specific minimum nor maximum value and thus each signal is required to provide a valid range specific to each.
Scale/Offset
Scale values for signals in transaction snippets will be called out inside a pair of curly braces, for example:
{*1/(2^16)}
The above scale would imply multiplying the raw value from the CAN bus by 1/65536 to achieve the scaled representation. An example including an offset would look like this:
{*1/(2^4) +11.0125}
In this second example, the raw value from the bus shall have a scale of 1/16 applied and then an offset of +11.0125 added. Offsets may be positive or negative as indicated by the preceding sign.