Skip to main content

C2xGetTokenSubString

Valid for: CANoe DE

Function Syntax

Description

This function copies a specified number of characters from a given position inside the token and adds a terminating \0.

Parameters

  • packet: Handle of a packet that has been created with C2xInitPacket
  • protocolDesignator: Name of the protocol, e.g. geo_cnh
  • tokenDesignator: Name of the token, e.g. data
  • byteOffset: Offset from the beginning of the token in byte
  • length: Number of characters to be copied
  • buffer: Buffer in which the characters are copied. This function adds a terminating \0. Thus, the size of the buffer must be at least one byte larger than length.

Return Values

With C2xGetLastError you can check if the function has been processed successfully.
  • 0: —
  • ≠0: Number of copied characters

Example

Node System - PreStart in CAPL Browser
Node Callback Function in CAPL Browser