Cooked processing of diagnostic messages manages one complete message at a time.
Functions | |
void | ld_send_message (l_ifc_handle iii, l_u16 length, l_u8 NAD, const l_u8 *const data) |
Pack the information specified by data and length into one or multiple diagnostic frames. More... | |
void | ld_receive_message (l_ifc_handle iii, l_u16 *const length, l_u8 *const NAD, l_u8 *const data) |
Prepare the LIN diagnostic module to receive one message and store it in the buffer pointed to by data. More... | |
l_u8 | ld_tx_status (l_ifc_handle iii) |
Get the status of the last made call to ld_send_message. More... | |
l_u8 | ld_rx_status (l_ifc_handle iii) |
Get the status of the last made call to ld_send_message. More... | |
void ld_receive_message | ( | l_ifc_handle | iii, |
l_u16 *const | length, | ||
l_u8 *const | NAD, | ||
l_u8 *const | data | ||
) |
Prepare the LIN diagnostic module to receive one message and store it in the buffer pointed to by data.
[in] | iii | Lin interface handle |
[in] | length | Length of data to receive |
[in] | NAD | Node address of slave node |
[in] | data | Data to be sent |
Prepare the LIN diagnostic module to receive one message and store it in the buffer pointed to by data. At the call, length shall specify the maximum length allowed. When the reception has completed, length is changed to the actual length and NAD to the NAD in the message.
Definition at line 385 of file lin_commontl_api.c.
l_u8 ld_rx_status | ( | l_ifc_handle | iii | ) |
Get the status of the last made call to ld_send_message.
[in] | iii | Lin interface handle |
The call returns the status of the last made call to ld_receive_message. < br / > The following values can be returned: < br / > LD_IN_PROGRESS: The reception is not yet completed. < br / > LD_COMPLETED: The reception has completed successfully and all < br / > information (length, NAD, data) is available. (You can < br / > also issue a new ld_receive_message call). This < br / > value is also returned after initialization of the < br / > transport layer. < br / > LD_FAILED: The reception ended in an error. The data was only < br / > partially received and should not be trusted. Initialize < br / > before processing further transport layer messages. < br / > For LIN2.0 and J2602 Users can make a new call to ld_receive_message. For LIN2.1 and above, the transport layer shall be reinitialized before processing further messages. To find out why a transmission has failed, check the status management function l_ifc_read_status. * LD_N_CR_TIMEOUT The reception failed because of a N_Cr timeout (For LIN2.1 and above only)< br / > LD_WRONG_SN The reception failed because of an unexpected sequence number. (For LIN2.1 and above only)
Definition at line 431 of file lin_commontl_api.c.
Pack the information specified by data and length into one or multiple diagnostic frames.
[in] | iii | Lin interface handle |
[in] | length | Length of data to send |
[in] | NAD | Node address of slave node |
[in] | data | Data to be sent |
Pack the information specified by data and length into one or multiple diagnostic frames. If the call is made in a master node application the frames are transmitted to the slave node with the address NAD. If the call is made in a slave node application the frames are transmitted to the master node with the address NAD. The parameter NAD is not used in slave nodes.
Definition at line 214 of file lin_commontl_api.c.
l_u8 ld_tx_status | ( | l_ifc_handle | iii | ) |
Get the status of the last made call to ld_send_message.
[in] | iii | Lin interface handle |
Get the status of the last made call to ld_send_message. The following values can be returned: LD_IN_PROGRESS: The transmission is not yet completed. LD_COMPLETED: The transmission has completed successfully (and you can issue a new ld_send_message call). This value is also returned after initialization of the transport layer. LD_FAILED: The transmission ended in an error. The data was only partially sent. The transport layer shall be reinitialized before processing further messages. To find out why a transmission has failed, check the status management function l_read_status. For LIN2.0 and J2602 Users can make a new call to ld_send_message. For LIN2.1 and above, the transport layer shall be reinitialized before processing further messages. LD_N_AS_TIMEOUT: The transmission failed because of a N_As timeout. This applies for LIN2.1 and above only.
Definition at line 415 of file lin_commontl_api.c.