Hi deepak,
We analyzed your files:
1) In the NPF file: you have 11 SIDs , including SID: partNo2 = 0xc6; and PartNumber = 0xc7;
In lin_cfg.h 2 flags were generated for these 2 SID:
#define DIAGSRV_PARTNUMBER_ORDER 8
#define DIAGSRV_PARTNO2_ORDER 9
So, in Slave main app you should implement:
if(diag_get_flag(DIAGSRV_PARTNUMBER_ORDER )
{
l_u16 req_len = 0;
l_u8 req_data[10];
diag_clear_flag(DIAGSRV_PARTNUMBER_ORDER);
/* Receive data */
ld_receive_message(&req_len, req_data);
req_data[0] += 0x40; // RSID = SID + 0x40
/* Put your code to perform necessary action here */
/* Send response */
ld_send_message(10, req_data);
}
if(diag_get_flag(DIAGSRV_PARTNO2_ORDER )
{
l_u16 req_len_1 = 0;
l_u8 req_data_1[10];
diag_clear_flag(DIAGSRV_PARTNO2_ORDER );
/* Receive data */
ld_receive_message(&req_len_1, req_data_1);
req_data_1[0] += 0x40; // RSID = SID + 0x40
/* Put your code to perform necessary action here */
/* Send response */
ld_send_message(10, req_data_1);
}
The current implementation in your Slave main app is wrong.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------