Skip to main content

C2xGetThisValue32

Valid for: CANoe DE Note: This function is only usable in a CAPL callback that had been registered with C2xReceivePacket.

Function Syntax

long C2xGetThisValue32(long offset);

Description

This function reads the data of a received packet in Intel format.

Parameters

  • offset: Byte offset relative to the beginning of a data packet or the payload (see description above).

Return Values

Read value.

Example

void OnC2xPacket(long channel, long dir, long radioChannel, long signalStrength, long signalQuality, long packet)
{
  byte rx_data[100];
  long rx_length;
  long val32;

  // get the payload of the packet
  rx_length = C2xGetThisData(0, elCount(rx_data), rx_data);

  // get 32-bit integer value at offset 0 of the payload
  val32 = C2xGetThisValue32(0);
}
See Also