Functions | |
void | ld_put_raw (l_ifc_handle iii, const l_u8 *const ld_data, mtb_stc_lin_context_t *context) |
This function is used to allow the application code to send data using the Transport Layer. More... | |
void | ld_get_raw (l_ifc_handle iii, l_u8 *const ld_data, mtb_stc_lin_context_t *context) |
This function is used to allow the application code to receive data using the Transport Layer. More... | |
l_u8 | ld_raw_tx_status (l_ifc_handle iii, const mtb_stc_lin_context_t *context) |
This call returns the status of the last performed frame transmission on the bus when a raw API was used. More... | |
l_u8 | ld_raw_rx_status (l_ifc_handle iii, const mtb_stc_lin_context_t *context) |
The call returns the status of the raw frame receive function. More... | |
void ld_put_raw | ( | l_ifc_handle | iii, |
const l_u8 *const | ld_data, | ||
mtb_stc_lin_context_t * | context | ||
) |
This function is used to allow the application code to send data using the Transport Layer.
It essentially copies 8 bytes of data from a user application array to a frame buffer array. The data is sent in the next suitable frame (Slave response frame).
The data area will be copied in the call, the pointer will not be memorized.
This function is used to send one frame of a complete message at a time. Therefore, a multiframe message requires multiple calls to this function.
Always check ld_raw_tx_status() to see if there is a place for the frame in the buffer before calling this function. If no more queue resources are available, the data may be jettisoned and the appropriate error status will be set.
iii | The name of the interface handle. The parameter is not used within the middleware as the interface is defined by the context parameter. See l_ifc_handle. |
ld_data | The array of data to be sent. |
context | The pointer to the context structure mtb_stc_lin_context_t allocated by the user. This structure is used during LIN Slave operation for internal configuration and data retention. The user must not modify anything in this structure. |
void ld_get_raw | ( | l_ifc_handle | iii, |
l_u8 *const | ld_data, | ||
mtb_stc_lin_context_t * | context | ||
) |
This function is used to allow the application code to receive data using the Transport Layer.
It essentially copies some data from a frame buffer array to a user application array.
This function is used to receive one frame of a complete Transport Layer message at a time. Therefore, a multiframe Transport Layer message requires multiple calls to this API function.
If the receive queue is empty, no data will be copied. Always check ld_raw_rx_status() to ensure there is data in the queue before calling this function.
iii | The interface handle. See l_ifc_handle. |
ld_data | The array to which the oldest received diagnostic frame data is copied. |
context | The pointer to the context structure mtb_stc_lin_context_t allocated by the user. This structure is used during LIN Slave operation for internal configuration and data retention. The user must not modify anything in this structure. |
l_u8 ld_raw_tx_status | ( | l_ifc_handle | iii, |
const mtb_stc_lin_context_t * | context | ||
) |
This call returns the status of the last performed frame transmission on the bus when a raw API was used.
iii | The interface handle. See l_ifc_handle. |
context | The pointer to the context structure mtb_stc_lin_context_t allocated by the user. This structure is used during LIN Slave operation for internal configuration and data retention. The user must not modify anything in this structure. |
l_u8 ld_raw_rx_status | ( | l_ifc_handle | iii, |
const mtb_stc_lin_context_t * | context | ||
) |
The call returns the status of the raw frame receive function.
iii | The name of the interface handle. The parameter is not used within the middleware as the interface is defined by the context parameter. See l_ifc_handle. |
context | The pointer to the context structure mtb_stc_lin_context_t allocated by the user. This structure is used during LIN Slave operation for internal configuration and data retention. The user must not modify anything in this structure. |