Skip to main content

C2xOutputPacket

Valid for: CANoe DE

Function Syntax

  • long C2xOutputPacket(long packet) // form 1
  • long C2xOutputPacket(long packet, long txPower) // form 2

Description

This function sends a WLAN packet. (form 1)
This function sends a WLAN packet with a specific txPower. (form 2)
This method extends the existing OutputPacket function and allows to send a frame with a dedicated Tx-power. It can be used in combination with the existing (old) OutputPacket function, which still uses the default-txPower defined in the Setup-Dialog or by SetSendParameters.
Note:
  • Be aware that this method belongs only to the raw Output-method, the SendMsg-method for periodic transmission is not affected at all!
  • This method can only be used with VN4610 hardware.

Parameters

  • packet: Handle of the packet to send
  • txPower: Transmission power in dBm

Return Values

Example

See also example of C2xInitPacket
void SendGNPacket()
{
  long handle;   // handle to c2x message
  long counter = 0, txPower = 25;
  handle = C2xInitPacket("geo_cnh");    // Create a c2x message

  // If nothing went wrong...
  if (handle != 0 && txPower > -20)
  {
    counter++;
    C2xSetTokenInt(handle, "geo_cnh", "reserved", counter);   // Fill the message with the payload
    C2xOutputPacket(handle, txPower);   // transmit packet with decreasing txPower
    txPower--;
  }
}