Communication Stack
The vspyx.Communication.Stack
is a simple framework for processing layered data, as is generally seen in network traffic. If you’re not interested in creating custom protocol decodings, the information in this section is likely of little use to you, since you can treat the Stack like a black box and interact with the decodings in the Environment instead.
Our Communication Stack is not a “stack” in the direct pipeline sense of the word. Instead, we have a collection of vspyx.Communication.PointProcessor
s which each seek to apply a transformation to some data.
When the Stack receives a NetworkEvent from the ECU’s controller, it creates a vspyx.Communication.DataLinkEventPoint
and submits it into the Stack for processing.
From here, the Stack (and for that matter the rest of the ECU simulation) deals with Points. When processing a Point, the Stack will simply offer the Point to each PointProcessor by calling it’s OnPoint function.
The PointProcessor implementations handle the rest, and have an OnPoint callback as part of their interface. When a PointProcessor creates a new Point, it will call OnPoint. The Stack will then offer this new Point to all of the PointProcessors so it can be decoded further, before dispatching it out to the ECU’s Environment.