J1939 Documentation
Version 4.16.00
|
Whenever it is necessary to identify a Parameter Group in the data field of a CAN data frame, it will be expressed in 24 bits. The 24-bit value is sent least significant byte first. The Parameter Group Number is a 24-bit value that has the following constituent components:
Within the stack, the PGN value is a 32 bit value.
Functions | |
J1939_Status_tv | J1939_PgnAddList (uint8_t ubNetV, J1939_PGN_Entry_ts *ptsPgnListV) |
void | J1939_PgnListUserInit (uint8_t ubNetV) |
J1939_Status_tv | J1939_PgnGetCycleTime (uint8_t ubNetV, uint32_t ulPgnV, uint16_t *puwTimeV) |
J1939_Status_tv | J1939_PgnRequest (uint8_t ubNetV, uint32_t ulPgnV, uint8_t ubDestAddrV) |
J1939_Status_tv | J1939_PgnSetCycleTime (uint8_t ubNetV, uint32_t ulPgnV, uint16_t uwTimeV) |
J1939_Status_tv | J1939_PgnSetDataSize (uint8_t ubNetV, uint32_t ulPgnV, uint16_t uwSizeV) |
J1939_Status_tv J1939_PgnAddList | ( | uint8_t | ubNetV, |
J1939_PGN_Entry_ts * | ptsPgnListV ) |
[in] | ubNetV | - J1939 Network channel |
[in] | ptsPgnListV | - Pointer to PGN list |
The function adds an application defined PGN list for the network defined by ubNetV. The list is an array of elements of structure J1939_PGN_Entry_s.
J1939_Status_tv J1939_PgnGetCycleTime | ( | uint8_t | ubNetV, |
uint32_t | ulPgnV, | ||
uint16_t * | puwTimeV ) |
[in] | ubNetV | - J1939 Network channel |
[in] | ulPgnV | - Parameter Group Number (PGN) |
[in] | puwTimeV | - pointer to buffer for cycle time value |
The function retrieves the cycle time of a PGN defined by the parameter ulPgnV. If the PGN is available in the stored PGN list the function returns eJ1939_ERR_NONE.
void J1939_PgnListUserInit | ( | uint8_t | ubNetV | ) |
[in] | ubNetV | - J1939 Network channel |
This function is called when a PGN list is added to the J1939 protocol stack. It used to initialise application specific parameters related to the PGN list.
J1939_Status_tv J1939_PgnRequest | ( | uint8_t | ubNetV, |
uint32_t | ulPgnV, | ||
uint8_t | ubDestAddrV ) |
[in] | ubNetV | - J1939 Network channel |
ulPgnV | - Parameter Group Number (PGN) | |
ubDestAddrV | - Destination address |
The function sends a J1939 Request message (RQST) for a PGN defined by ulPgnV. The Request message is send to an ECU with address ubDestAddrV.
J1939_Status_tv J1939_PgnSetCycleTime | ( | uint8_t | ubNetV, |
uint32_t | ulPgnV, | ||
uint16_t | uwTimeV ) |
[in] | ubNetV | - J1939 Network channel |
[in] | ulPgnV | - Parameter Group Number (PGN) |
[in] | uwTimeV | - cycle time |
The function modifies the cycle time of a PGN defined by the parameter ulPgnV. If the PGN is available in the stored PGN list the function returns eJ1939_ERR_NONE.
J1939_Status_tv J1939_PgnSetDataSize | ( | uint8_t | ubNetV, |
uint32_t | ulPgnV, | ||
uint16_t | uwSizeV ) |
[in] | ubNetV | - J1939 Network channel |
[in] | ulPgnV | - Parameter Group Number (PGN) |
[in] | uwSizeV | - Data size |
The function modifies the data size of a PGN defined by the parameter ulPgnV. If the PGN is available in the stored PGN list the function returns eJ1939_ERR_NONE.