Skip to main content

AfdxInitSchedule

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

long AfdxInitSchedule( long packet );

Description

Initializes the scheduled transmission of the specified message during the start phase of the measurement. The behavior of the function call differs for different measurement phases.

Parameters

  • packet: Handle of the message that has been created with AfdxInitPacket.

Return Values

Example

on preStart
{
  long packet;
  char errTxt[256];

  packet = AfdxInitPacket(0, "TESTMSG_ALLTYPES", 0 );
  if (packet == 0)
  {
    AfdxGetLastErrorText(elCount(errTxt), errTxt);
    writeEx( -3, 0, "<%NODE_NAME%> AfdxInitPacket failed due to:%s", errTxt );
  }

  if (AfdxInitSchedule(packet) != 0)
  {
    AfdxGetLastErrorText(elCount(errTxt), errTxt);
    writeEx( -3, 0, "<%NODE_NAME%> AfdxInitSchedule failed due to:%s", errTxt );
  }
  AfdxReleasePacket(packet);
}