This group contains APIs that used for node configuration purpose.
With protocol lin2.1 in slave node, some service like (Data dump, Conditional change nad with id from 2 to 255) are not supported by LinStack but user can implement it in application by use function ld_receive_message and ld_send_message in transport layer.
With protocol J2602 in slave node, some service like (Data dump, Assign NAD, Conditional change NAD) are not supported by LinStack but user can implement it in application by choosing these services in supported_sid in PEX GUI and use function ld_receive_message and ld_send_message in transport layer. When received target reset master request slave node just update status_byte and send response positive message.
Functions | |
l_u8 | ld_is_ready (l_ifc_handle iii) |
This call returns the status of the last requested configuration service. More... | |
void | ld_check_response (l_ifc_handle iii, l_u8 *const RSID, l_u8 *const error_code) |
This call returns the result of the last node configuration service, in the parameters RSID and error_code. A value in RSID is always returned but not always in the error_code. Default values for RSID and error_code is 0 (zero). More... | |
void | ld_assign_frame_id_range (l_ifc_handle iii, l_u8 NAD, l_u8 start_index, const l_u8 *const PIDs) |
This function assigns the protected identifier of up to four frames. More... | |
void | ld_save_configuration (l_ifc_handle iii, l_u8 NAD) |
This function to issue a save configuration request to a slave node. More... | |
l_u8 | ld_read_configuration (l_ifc_handle iii, l_u8 *const data, l_u8 *const length) |
This function copies current configuration in a reserved area. More... | |
l_u8 | ld_set_configuration (l_ifc_handle iii, const l_u8 *const data, l_u16 length) |
This function configures slave node according to data. More... | |
void | ld_assign_NAD (l_ifc_handle iii, l_u8 initial_NAD, l_u16 supplier_id, l_u16 function_id, l_u8 new_NAD) |
This call assigns the NAD (node diagnostic address) of all slave nodes that matches the initial_NAD, the supplier ID and the function ID. Master node only. More... | |
void | ld_conditional_change_NAD (l_ifc_handle iii, l_u8 NAD, l_u8 id, l_u8 byte_data, l_u8 mask, l_u8 invert, l_u8 new_NAD) |
This call changes the NAD if the node properties fulfill the test specified by id, byte, mask and invert. Master node only. More... | |
void ld_assign_frame_id_range | ( | l_ifc_handle | iii, |
l_u8 | NAD, | ||
l_u8 | start_index, | ||
const l_u8 *const | PIDs | ||
) |
This function assigns the protected identifier of up to four frames.
[in] | iii | lin interface handle |
[in] | NAD | Node address value of the target node |
[in] | start_index | specifies which is the first frame to assign a PID |
[in] | PIDs | list of protected identifier |
This API is available for master interfaces only
Definition at line 136 of file lin_diagnostic_service.c.
void ld_assign_NAD | ( | l_ifc_handle | iii, |
l_u8 | initial_NAD, | ||
l_u16 | supplier_id, | ||
l_u16 | function_id, | ||
l_u8 | new_NAD | ||
) |
This call assigns the NAD (node diagnostic address) of all slave nodes that matches the initial_NAD, the supplier ID and the function ID. Master node only.
[in] | iii | LIN interface handle |
[in] | initial_NAD | Initial node address of the target node |
[in] | supplier_id | Supplier ID of the target node |
[in] | function_id | Function identifier of the target node |
[in] | new_NAD | New node address |
This call assigns the NAD (node diagnostic address) of all slave nodes that matches the initial_NAD, the supplier ID and the function ID. The new NAD of the slave node will be new_NAD. This function is used for master node only.
Definition at line 860 of file lin_diagnostic_service.c.
This call returns the result of the last node configuration service, in the parameters RSID and error_code. A value in RSID is always returned but not always in the error_code. Default values for RSID and error_code is 0 (zero).
For slave interfaces ld_check_response shall do nothing
[in] | iii | lin interface handle |
[out] | RSID | buffer for saving the response ID |
[out] | error_code | buffer for saving the error code |
This API is available for master interfaces only
Definition at line 106 of file lin_diagnostic_service.c.
void ld_conditional_change_NAD | ( | l_ifc_handle | iii, |
l_u8 | NAD, | ||
l_u8 | id, | ||
l_u8 | byte_data, | ||
l_u8 | mask, | ||
l_u8 | invert, | ||
l_u8 | new_NAD | ||
) |
This call changes the NAD if the node properties fulfill the test specified by id, byte, mask and invert. Master node only.
[in] | iii | :LIN interface handle |
[in] | NAD | Current NAD value of the target node |
[in] | id | Property ID of the target node |
[in] | byte | Byte location of property value to be read from the target node |
[in] | mask | Value for masking the read property byte |
[in] | invert | Value for excluding the read property byte |
[in] | new_NAD | New NAD value to be assigned when the condition is met |
This call changes the NAD if the node properties fulfill the test specified by id, byte, mask and invert.
Definition at line 902 of file lin_diagnostic_service.c.
l_u8 ld_is_ready | ( | l_ifc_handle | iii | ) |
This call returns the status of the last requested configuration service.
[in] | iii | lin interface handle |
Definition at line 80 of file lin_diagnostic_service.c.
This function copies current configuration in a reserved area.
[in] | iii | Lin interface handle |
[out] | data | Data area to save configuration, |
[out] | length | Length of data area (1 + n, NAD + PIDs) |
This function is implemented Slave Only.
Set the expected length value to EXP = NN + NF, where : NN = the number of NAD. NF = the number of configurable frames; Moreover: Not taken PID's diagnostics frame: 3C, 3D
Definition at line 438 of file lin_diagnostic_service.c.
void ld_save_configuration | ( | l_ifc_handle | iii, |
l_u8 | NAD | ||
) |
This function to issue a save configuration request to a slave node.
[in] | iii | Interface name |
[in] | NAD | Node address of target |
This function is available for master nodes only. This function is available for all diagnostic classes and only for LIN2.1 and above. This function is called to send a save configuration request to a specific slave node with the given NAD, or to all slave nodes if NAD is set to broadcast This function is implemented for Master Only.
Definition at line 178 of file lin_diagnostic_service.c.
This function configures slave node according to data.
[in] | iii | Lin interface handle |
[in] | data | Structure containing the NAD and all the n PIDs for the frames of the specified NAD, |
[in] | length | Length of data area (1 + n, NAD + PIDs) |
This function is implemented Slave Only.
Set the expected length value to EXP = NN + NF, where : NN = the number of NAD. NF = the number of configurable frames; Moreover: Not taken PID's diagnostics frame: 3C, 3D
Definition at line 503 of file lin_diagnostic_service.c.