Skip to main content

C2xAddToken

Valid for: CANoe DE

Function Syntax

long C2xAddToken( long packet, char protocolDesignator[], char tokenDesignator[] );

Description

This function adds an additional token at the end of a protocol header.

Parameters

  • packet: Handle of a packet that has been created with C2xInitPacket
  • protocolDesignator: Name of the protocol
  • tokenDesignator: Name of the token

Return Values

Example

long packetHandle = 0;
packetHandle = C2xInitPacket("wsmp");
C2xAddToken(packetHandle, "wsmp", "transmitPower");
C2xAddToken(packetHandle, "wsmp", "dataRate");
C2xAddToken(packetHandle, "wsmp", "channelNumber");
C2xCompletePacket(packetHandle);
C2xOutputPacket(packetHandle);