caplcanoecanalyzer

How to use applPDUILTxPending() in CAPL


How do you use applPDUILTxPending() in CANoe? Also, what is the difference between longID & shortID of a PDU? I have tried the example code given by Vector but it does not work.

dword applPDUILTxPending (dword busContext, dword longID, dword shortID, char name[], dword & aPayloadLength, byte data[])
{
  int i, j;
  byte xor;
  if(strncmp(name, "aPDU_1", elcount(name)) == 0)
  {
    data[6] = i & 0x0F;
    i++;
    i = i % 16;
    xor = 0x00;
    for(j = 0; j < aPayloadLength-1; ++j)
    {
      xor = xor ^ data[j];
    }
    data[7] = xor; 
  }
  return 1; 
}

I am using an AUTOSAR ≥ 4.2 database (ARXML). I was wondering if there is something wrong in my CANoe configurations. Do I have to manually set library files ASRPDUIL.dll or ASRPDUIL2.dll to use applTX functions even if I'm not using any model in my configurations? Any lead on this would be appreciated.


Solution

  • If the AUTOSAR version is ≥ 4.2, applILTxPending() does not work. applPDUILTxPending() can be used to change data before it sends to IL but, the ASRPDUIL2 file should be added to node configuration files. It can be found in the Vector AddOn folder.