I am using the pcan_uds.dll to develop a software to download the application program first, i have to use the TP_AddMapping function to map the CANID with the SA and TA, when the targetType is PCANTP_ADDRESSING_PHYSICAL the function works well, but when i use PCANTP_ADDRESSING_FUNCTIONAL with the CANID 0x7DF, it show out the CANID is already mapped.Maybe the pcan_uds.dll use the 0x7DF as functional adressing acquiescently,then i delete the 7DF mapping, but when i use the diagnosticSessionControl service, the request does not send out,so i am very confusing about this question, look up forword for your help!! below is my code.
Code: Select all
tpStatus = m_pTP_AddMapping(m_PcanHandle, 0x702, 0x782,
PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
N_AI.SA, N_AI.TA, PCANTP_ADDRESSING_PHYSICAL, 0x00);
qDebug() << "addMapping 1" << tpStatus;
tpStatus = m_pTP_AddMapping(m_PcanHandle, 0x782, 0x702,
PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
N_AI.TA, N_AI.SA, PCANTP_ADDRESSING_PHYSICAL, 0x00);
qDebug() << "addMapping 2" << tpStatus;
tpStatus = m_pTP_AddMapping(m_PcanHandle, 0x7DF, CAN_ID_NO_MAPPING,
PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
N_AI.SA, N_AI.TA, PCANTP_ADDRESSING_FUNCTIONAL, 0x00);
qDebug() << "addMapping 3" << tpStatus; //the tpStatus is 2.