Skip to main contentC2xSetTokenData
Open topic with navigation
CAPL Functions » Car2x » C2xSetTokenData
Valid for: CANoe DE
Function Syntax
long C2xSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long length, char data[] );
long C2xSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long length, byte data[] );
long C2xSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long length, struct dataStruct );
long C2xSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long byteOffset, long length, char data[] );
long C2xSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long byteOffset, long length, byte data[] );
long C2xSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long byteOffset, long length, struct dataStruct );
Description
This function sets the data or a part of data of a token. It does not resize the token. Use C2xResizeToken to change the length.
Parameters
- packet: Handle of a packet that has been created with C2xInitPacket.
- protocolDesignator: Name of the protocol, e.g. eth.
- tokenDesignator: Name of the token, e.g. source.
- byteOffset: Offset from the beginning of the token in byte.
- length: Number of bytes to be copied.
- data: Data that are copied to the token.
- dataStruct: Struct containing the data.
Return Values
Example
See example of C2xInitPacket.
See Also: Various CAPL Functions