I'm trying to write a counter which is sending a msg+CTR but when I'm running the program it's saying this type of error "Program / Model 46-0106 Error in node Veh1 on channel WLAN 1 in C2X IL CAPL function C2xGetTokenInt: Protocol "EU_ApplMsg::DENM" not found" Please can anybody tell me what that error mean and how to fix it?
void OnC2xPacket( long channel, long dir, long radioChannel, long signalStrength, long signalQuality, long packet )
{
byte aRx_stationID;
aRx_stationID = C2xGetTokenInt(packet, "DENM", "header.stationID");
if(aRx_stationID == 222)
{
@Veh1::sVarRxDenmCounter = C2xGetTokenInt(packet, "DENM", "denm.situation.eventType.causeCode");
if(@Veh1::sVarRxDenmCounter != gRxPacketCounterNew && gRxPacketCounterInit != 1)
{
@Veh1::sVarLostPacketNumber++;
@Veh1::sVarRecieveDataAge = 0;
}
else
{
@Veh1::sVarRecieveDataAge =1;
}
gRxPacketCounterNew = ((@Veh1::sVarRxDenmCounter+1)%256);
gRxPacketCounterInit = 0;
if(@Veh1::sVarLostPacketNumber > 1000)
{
@Veh1::sVarLostPacketNumber =0;
}
}
}
I used in the capl code the CAM and DENM messages to send Tx and receive Rx and in the capl code I don't have an error found but maybe there is an infinite loop or somebody else has a piece of knowledge about that issue.