Skip to main content

GetFrFrame

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long GetFrFrame(this, FrFrame * frame);

Description

This function can only be called inside of an on PDU handler. The function will return in its second parameter the FlexRay frame, the PDU was contained.

Parameters

  • this: Handle to the currently handled (received) PDU object.
  • packet: Reference to a FlexRay Frame object that will contain the overall received packet data and information.

Return Values

  • 0: Data access successful.
  • -1: Wrong bus system; FlexRay frame is not available.
  • -2: Frame does not support this info.
  • -3: The PDU object is invalid.
  • -4: PDU is not of Rx type.
  • -5: Parameter too small (e.g. array has too less bytes)
  • -6: Frame or PDU is not available (any more)

Example

on PDU PDU_C
{
  FrFrame (1,0,1) aFrFrame_01;
  long result;
  result = GetFrFrame(this, aFrFrame_01); // PDU is assumed to be sent on FlexRay
  if (result == 0)
  {
    write("Received PDU 'PDU_C' in FlexRay Slot %lu", aFrFrame_01.FR_SlotID);
  }
  else
  {
    write("Error accessing PDU!");
  }
}
on PDUGetCANMessageGetEthernetPacketGetPDUsTPIPv6SrcAddrGetPDUsTPIPv6DstAddrGetPDUsTPIPv4SrcAddrGetPDUsTPIPv4DstAddrGetPDUsTPUDPSrcPortGetPDUsTPUDPDstPortGetPDUsTPTCPSrcPortGetPDUsTPTCPDstPort