J1939 Documentation
Version 4.16.00
|
The functions in this file are used to convert a CAN message identifier to J1939 specific values and vice versa.
Functions | |
uint32_t | J1939_MsgIdFromPgn (uint16_t uwPriorityV, uint32_t ulPgnV, uint8_t ubDestAddrV, uint8_t ubSrcAddrV) |
uint8_t | J1939_MsgPageFromId (uint32_t ulIdentifierV) |
uint32_t | J1939_MsgPgnFromId (uint32_t ulIdentifierV) |
uint8_t | J1939_MsgPriorityFromId (uint32_t ulIdentifierV) |
uint32_t J1939_MsgIdFromPgn | ( | uint16_t | uwPriorityV, |
uint32_t | ulPgnV, | ||
uint8_t | ubDestAddrV, | ||
uint8_t | ubSrcAddrV ) |
[in] | uwPriorityV | - Priority value |
[in] | ulPgnV | - PGN value |
[in] | ubDestAddrV | - Destination address |
[in] | ubSrcAddrV | - Source address |
This function calculates the CAN identifier with the supplied values for priority, Parameter Group Number (PGN) and source address. The parameter ubDestAddrV is only evaluated for PGN values less than 61440, i.e. the PDU format is less than 240.
uint8_t J1939_MsgPageFromId | ( | uint32_t | ulIdentifierV | ) |
[in] | ulIdentifierV | - Extended identifier value |
This function calculates the data page value (0 to 3) from the passed CAN identifier value, given by ulIdentifierV.
uint32_t J1939_MsgPgnFromId | ( | uint32_t | ulIdentifierV | ) |
Calculate PGN.
ulIdentifierV | - Extended identifier value |
This function calculates the Parameter Group number (PGN) from the passed CAN identifier value, given by ulIdentifierV.
uint8_t J1939_MsgPriorityFromId | ( | uint32_t | ulIdentifierV | ) |
Calculate priority.
ulIdentifierV | - Extended identifier value |
This function calculates the priority from the passed CAN identifier value, given by ulIdentifierV.