The diagnostics service provides the following PGs defined inside the J1939-73 specification:
|
int16_t | ECU_Pgn57088 (uint8_t *pubDataV, uint16_t uwSizeV, uint8_t ubSrcAddrV, uint8_t ubNetV) |
|
int16_t | ECU_Pgn65226 (uint8_t *pubDataV, uint16_t uwSizeV, uint8_t ubSrcAddrV, uint8_t ubNetV) |
|
int16_t | ECU_Pgn65227 (uint8_t *pubDataV, uint16_t uwSizeV, uint8_t ubSrcAddrV, uint8_t ubNetV) |
|
int16_t | ECU_Pgn65228 (uint8_t *pubDataV, uint16_t uwSizeV, uint8_t ubSrcAddrV, uint8_t ubNetV) |
|
int16_t | ECU_Pgn65230 (uint8_t *pubDataV, uint16_t uwSizeV, uint8_t ubSrcAddrV, uint8_t ubNetV) |
|
int16_t | ECU_Pgn65235 (uint8_t *pubDataV, uint16_t uwSizeV, uint8_t ubSrcAddrV, uint8_t ubNetV) |
|
void | J1939_DiagAddDtc (uint8_t ubNetV, uint32_t ulSpnV, uint8_t ubFmiV, uint8_t ubCountV) |
|
void | J1939_DiagAddDtcPrev (uint8_t ubNetV, uint32_t ulSpnV, uint8_t ubFmiV, uint8_t ubCountV) |
|
void | J1939_DiagClearDtc (uint8_t ubNetV) |
|
void | J1939_DiagClearDtcPrev (uint8_t ubNetV) |
|
void | J1939_DiagHoldEvent (uint8_t ubNetV, uint8_t ubBroadcastSignalV) |
|
◆ J1939_Broadcast_e
Definitions for Stop Start Broadcast (DM13)
Enumerator |
---|
eJ1939_BROADCAST_STOP | Stop broadcast messages
|
eJ1939_BROADCAST_START | Start broadcast messages
|
eJ1939_BROADCAST_NO_ACTION | No action / change required
|
◆ ECU_Pgn57088()
int16_t ECU_Pgn57088 |
( |
uint8_t * | pubDataV, |
|
|
uint16_t | uwSizeV, |
|
|
uint8_t | ubSrcAddrV, |
|
|
uint8_t | ubNetV ) |
- Parameters
-
[in,out] | pubDataV | Pointer to message data |
[in] | uwSizeV | Size of data |
[in] | ubSrcAddrV | Source address of PDU |
[in] | ubNetV | J1939 Network channel |
- Returns
- Defined by J1939_Handler_Result_e
This handler covers the DM13 diagnostic message.
◆ ECU_Pgn65226()
int16_t ECU_Pgn65226 |
( |
uint8_t * | pubDataV, |
|
|
uint16_t | uwSizeV, |
|
|
uint8_t | ubSrcAddrV, |
|
|
uint8_t | ubNetV ) |
- Parameters
-
[in,out] | pubDataV | Pointer to message data |
[in] | uwSizeV | Size of data |
[in] | ubSrcAddrV | Source address of PDU |
[in] | ubNetV | J1939 Network channel |
- Returns
- Defined by J1939_Handler_Result_e
The DM1 handler is automatically sent by the protocol stack in case a DTC is added by J1939_DiagAddDtc().
◆ ECU_Pgn65227()
int16_t ECU_Pgn65227 |
( |
uint8_t * | pubDataV, |
|
|
uint16_t | uwSizeV, |
|
|
uint8_t | ubSrcAddrV, |
|
|
uint8_t | ubNetV ) |
- Parameters
-
[in,out] | pubDataV | Pointer to message data |
[in] | uwSizeV | Size of data |
[in] | ubSrcAddrV | Source address of PDU |
[in] | ubNetV | J1939 Network channel |
- Returns
- Defined by J1939_Handler_Result_e
The DM2 handler is called by the protocol stack in case a DTC is added by J1939_DiagAddDtcPrev().
◆ ECU_Pgn65228()
int16_t ECU_Pgn65228 |
( |
uint8_t * | pubDataV, |
|
|
uint16_t | uwSizeV, |
|
|
uint8_t | ubSrcAddrV, |
|
|
uint8_t | ubNetV ) |
- Parameters
-
[in,out] | pubDataV | Pointer to message data |
[in] | uwSizeV | Size of data |
[in] | ubSrcAddrV | Source address of PDU |
[in] | ubNetV | J1939 Network channel |
- Returns
- Defined by J1939_Handler_Result_e
The DM3 handler clear previously active diagnostic trouble codes and responds with an ACK message.
◆ ECU_Pgn65230()
int16_t ECU_Pgn65230 |
( |
uint8_t * | pubDataV, |
|
|
uint16_t | uwSizeV, |
|
|
uint8_t | ubSrcAddrV, |
|
|
uint8_t | ubNetV ) |
- Parameters
-
[in,out] | pubDataV | Pointer to message data |
[in] | uwSizeV | Size of data |
[in] | ubSrcAddrV | Source address of PDU |
[in] | ubNetV | J1939 Network channel |
- Returns
- Defined by J1939_Handler_Result_e
The DM5 handler reports the number of active and previously active DTCs.
◆ ECU_Pgn65235()
int16_t ECU_Pgn65235 |
( |
uint8_t * | pubDataV, |
|
|
uint16_t | uwSizeV, |
|
|
uint8_t | ubSrcAddrV, |
|
|
uint8_t | ubNetV ) |
- Parameters
-
[in,out] | pubDataV | Pointer to message data |
[in] | uwSizeV | Size of data |
[in] | ubSrcAddrV | Source address of PDU |
[in] | ubNetV | J1939 Network channel |
- Returns
- Defined by J1939_Handler_Result_e
The DM11 handler clears active diagnostic trouble codes and responds with an ACK message
◆ J1939_DiagAddDtc()
void J1939_DiagAddDtc |
( |
uint8_t | ubNetV, |
|
|
uint32_t | ulSpnV, |
|
|
uint8_t | ubFmiV, |
|
|
uint8_t | ubCountV ) |
- Parameters
-
[in] | ubNetV | J1939 Network channel |
[in] | ulSpnV | SPN - Suspect Parameter Number |
[in] | ubFmiV | FMI - Failure Mode Identifier |
[in] | ubCountV | OC - Occurrence Count |
The function creates a DTC consisting of the parameters SPN (value range 0 .. 524287) ulSpnV, FMI (value range 0 .. 31) ubFmiV and OC (value range 0 .. 127) ubCountV. The DTC is added to the list of Active Diagnostic Trouble Codes (DM1).
◆ J1939_DiagAddDtcPrev()
void J1939_DiagAddDtcPrev |
( |
uint8_t | ubNetV, |
|
|
uint32_t | ulSpnV, |
|
|
uint8_t | ubFmiV, |
|
|
uint8_t | ubCountV ) |
- Parameters
-
[in] | ubNetV | J1939 Network channel |
[in] | ulSpnV | SPN - Suspect Parameter Number |
[in] | ubFmiV | FMI - Failure Mode Identifier |
[in] | ubCountV | OC - Occurrence Count |
The function creates a DTC consisting of the parameters SPN (value range 0 .. 524287) ulSpnV, FMI (value range 0 .. 31) ubFmiV and OC (value range 0 .. 127) ubCountV. The DTC is added to the list of Previously Active Diagnostic Trouble Codes (DM2).
◆ J1939_DiagClearDtc()
void J1939_DiagClearDtc |
( |
uint8_t | ubNetV | ) |
|
- Parameters
-
[in] | ubNetV | J1939 Network channel |
The function clears all DTCs from the list of Active Diagnostic Trouble Codes (DM1).
◆ J1939_DiagClearDtcPrev()
void J1939_DiagClearDtcPrev |
( |
uint8_t | ubNetV | ) |
|
- Parameters
-
[in] | ubNetV | J1939 Network channel |
The function clears all DTCs from the list of Previously Active Diagnostic Trouble Codes (DM2).
◆ J1939_DiagHoldEvent()
void J1939_DiagHoldEvent |
( |
uint8_t | ubNetV, |
|
|
uint8_t | ubBroadcastSignalV ) |
- Parameters
-
[in] | ubNetV | J1939 Network channel |
[in] | ubBroadcastSignalV | Signal type defined by J1939_Broadcast_e |
The function is called when a DM13 message is received.
A sample implementation of he function is located inside the j1939_user.c
file.
{
{
(void) J1939_PgnSetCounter(ubNetV, 65226, 1);
}
{
}
}
@ eJ1939_BROADCAST_START
Definition j1939_diag.h:92
@ eJ1939_BROADCAST_STOP
Definition j1939_diag.h:89
void J1939_DiagHoldEvent(uint8_t ubNetV, uint8_t ubBroadcastSignalV)
uint16_t J1939_TmrCalcTicks(uint16_t uwReqTimingV)
Calculate number of timer ticks.