Skip to main content

AfdxSetTokenData

Open topic with navigation CAPL Functions » AFDX » AfdxSetTokenData

Function Syntax

long AfdxSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long offset, long length, byte buffer[] ); // form 1
long AfdxSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long offset, long length, char buffer[] ); // form 2
long AfdxSetTokenData( long packet, char protocolDesignator[], char tokenDesignator[], long offset, long length, struct * buffer ); // form 3

Description

This function copies a number of bytes from source buffer to a token’s data area. The token is not resized. Use AfdxResizeToken to change the token’s length.

Parameters

  • packet: Handle of the message that has been created with AfdxInitPacket.
  • protocolDesignator: Name of the protocol, e.g. “afdx”.
  • tokenDesignator: Name of the token, e.g. “source”.
  • offset: This is the offset from the beginning of the token’s data area. If this is 0, data is copied starting at byte 0 of the token’s data area.
  • length: This is the number of bytes to be copied from the specified buffer to the token’s data area. Note that the token is not resized. Make sure that the token’s size is at least length bytes.
  • buffer: This is the source buffer for the copied data.

Return Values

Example

See example of AfdxInitPacket

See Also