MX Foundation 4
|
In raw mode, all received frames are available to the calling application. Detected errors will be reported in the MXF_A664_DATAREC.control field. Detected errors are physical errors. Protocol error check (MAC/IP/UDP) is not performed.
In this mode, by default, errors are silently discarded and statistics counters can be used to monitor the count of different errors.
The KMXF_A664_RAW_RX_ERROR_ONLY attribute can also be used so that erroneous frames are enqueued in the physical port for analysis. In that case, acquisition must be started on both COM/SAP port and physical port. Detected errors will be reported in the MXF_A664_DATAREC.control and MXF_A664_DATAREC.service.rxAcq.rxError fields of records received with the physical port buffer handle. Discarded frame duplicate is not considered as an error, so will not be enqueued in the raw port.
Another technique is to register an asynchronous event handler callback that will be called when an error is detected.
The error detection mechanism allows any receive protocol stack error and events to be reported to a calling application.
With COM/SAP port, a receive error can be detected on any layer of the stack depending of the frame type received;
COM/SAP Layer, VL Layer, IP/UDP Layer, EDE Boeing Layer, Physical Ports Layer.
The errors are reported to an application by setting a callback function handler used to identify the source of the trap, analyze the status of the error, and process it (recovery) if necessary.
Detecting errors on a channel is made in two steps;
In this case any pending read completes normally (rc=0, records read=0). The handler can receive one or more events with a list of structures containing, for each error, the information about the COM/SAP port and the associated VL and Physical Port handle.
The error status specifies the error or event type that occurred.
The example below shows the basic setup for receiving errors with the handler.
ar664_error_injection_detection.c
Statistics can be used to get a quick overview of the bus operation. Detected errors are reported for the various layers of statistics. Also, errors for completely invalid packet that can't be given to the application will be logged.
The following statistics are available:
STRUCTURE | Description |
---|---|
MXF_A664_STAT_PORT_TX | COM/SAP Tx Port Statistics |
MXF_A664_STAT_PORT_RX | COM/SAP Rx Port Statistics |
MXF_A664_STAT_VL_TX | Virtual Link Tx Statistics |
MXF_A664_STAT_VL_RX | Virtual Link Rx Statistics |
MXF_A664_STAT_VL_RX_EDE_REDUNDANCY | EDE RM statistics for an AFDX port |
MXF_A664_STAT_VL_RX_MAC_REDUNDANCY | MAC RM statistics for an AFDX port |
MXF_A664_STAT_IP | IP statistics for a physical port |
MXF_A664_STAT_UDP | UDP statistics for a physical port |
MXF_A664_STAT_MAC_RX | MAC statistics for a physical port |
Refer to the mxfChannelStatisticGet() function for more details;