Skip to main content
Open topic with navigation CAPL Functions » ISO11783 » Virtual Terminal Interaction Layer (VT IL) » VTIL_SetMsgRawData

VTIL_SetMsgRawData

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long VTIL_SetMsgRawData( dbMsg msg, long dataSize, byte data[] ); // form 1
long VTIL_SetMsgRawData( dbNode vt,  dbMsg msg, long dataSize, char data[] ); // form 2

Description

Sets the data bytes of the message. The length of the parameter group is adjusted to size of parameter dataSize.

Parameters

  • msg: message name from database, must be assigned to the node as Tx message
  • dataSize: number of data bytes
  • data: data bytes
  • pgData: data and DLC are taken from this parameter group
  • vt: VT simulation node to apply the function

Return Values

  • 0: Function has been executed successfully
  • < 0: An error has occurred, see IL Error Code

Example

Example form 1
void SendPointingEvent(word x, word y, byte touchState)
{
  char buf[8];
  buf[0] = 0x02; // Pointing Event
  buf[1] = x & 0xFF;
  buf[2] = (x >> 8) & 0xFF;
  buf[3] = y & 0xFF;
  buf[4] = (y >> 8) & 0xFF;
  buf[5] = touchState;
  buf[6] = 0xFF;
  buf[7] = 0xFF;
  VTIL_SetMsgRawData(VT12_VT, elCount(buf), buf);
  VTIL_SetMsgEvent(VT12_VT);
}