ethInjectPacket
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
Description
Transmits an Ethernet packet by a specific ethernetPort defined in<packet>. Allows to output a frame not only on a simulation port like output, but on a physical port as well e.g. for error injection.
Note: The injection is not supported for measurement ports that are connected to a multidrop segment in the hardware configuration.
Parameters
- packet: Variable of type ethernetPacket.
- direction: Transmit direction from viewpoint of the connected segment:
<rx>or<0>to send from a simulated port (into the connected segment) in real mode<tx>or<1>to send from a physical measurement port (away from the connected segment) in real mode- In simulated mode use
<tx>or<rx>(respectively<0>or<1>) to send from simulated ports either into the connected segment (rx) or away from the connected segment (tx).
Return Values
- 0: Success
- 1: Invalid Ethernet port
- 2: Packet failure
- 3: Output not allowed