Routing Integration
Integration
For projects using FlexRay, CAN, and PDU transport, the Integration class provides
a ready-to-go implementation of the instantiation of the routing components.
The Integration class uses the blob module to access configurations, which can be loaded
from memory using the load functions.
Getting started
Generate routing-related blob artifacts with the blob generator tool.
Load the generated blob bytes in your application and pass them to
PduTransportIntegration::init()andIntegration::init().Provide bus and socket endpoints (CAN/FlexRay readers and writers, UDP sockets) to these
init()calls.In the main loop, call
checkTransmissionTimeouts()andsendUdpFrames()onPduTransportIntegrationand run the routing pipeline normally.
Here is the structure of this class, with regard to the Routing components (note that
CHANNELS = PDU_TRANSPORT_CHANNELS + CAN_CHANNELS + FLEXRAY_CHANNELS):
PDU Transport Integration
The PduTransportIntegration class takes care of instantiating all the components related to the UDP-based PDU
transport communication, except for the sockets. The sockets are provided at initialization and their type has
to derive from AbstractDatagramSocket. PduTransportIntegration separates frame creation from
socket transmission:
PduTransportBufferedWriterbatches outgoing PDU transport messages into frame-sized queue entriescheckTransmissionTimeouts()evaluates whether buffered frames must be committed to TX queues because of configured timeoutssendUdpFrames()begins the actual UDP transmission by reading frames from the TX queue and sending up to 10 frames per channel per call through sockets
As a result, data already written to TX queues may still not have been sent out. Data is written to the TX queue when the next message would no longer fit into the current frame buffer or the configured transmission timeout expires. The timeout starts with the first committed message in an empty frame buffer, not with allocation.
The structure of this class is the following:
If we look at the way these components are interconnected and connected with the Integration class, we get: