Skip to main content

AfdxGetSignalOpaque

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

Function Syntax

  • long AfdxGetSignalOpaque( long packet, char signalName[], long bufSize, byte buffer[] ); // form 1
  • long AfdxGetSignalOpaque( long packet, long offset, long bufSize, byte buffer[] ); // form 2
  • long AfdxGetSignalOpaque( long packet, long offset, long length, long bufSize, byte buffer[] ); // form 3

Description

This function copies the content of an opaque data to the specified buffer. There are two different opaque data types available in AFDX:
  • Fixed length opaque data: n bytes (form 3 only)
  • Variable length opaque type: 16-bit length value n, data field filled up with n bytes, padding area filled with 0 (form 2 only)
Since the opaque type is not detectable from the payload stream it must be described explicitly by the network designer.

Parameters

  • packet: Handle of the message.
  • signalName: Name of the signal.
    Note: The signal, the signal’s data type and the message need to be defined in the assigned DBC file.
  • offset: The offset value points to the starting byte of the opaque signal in the AFDX payload area.
  • bufSize: Size of available buffer area.
  • length: This is the number of bytes to be copied from the fixed size opaque signal to the specified buffer.
  • buffer: Buffer containing the read data.
    Make sure that the size of the buffer is at least length bytes.

Return Values

  • Number of copied data bytes.
  • If this value is > bufSize an error occurred.

Example

Analyze signals from an incoming AFDX packet using DBC information