ADTF Substreamshttps://www.digitalwerk.net/wp-content/uploads/substreams-1024x529.png 1024 529 Digitalwerk Digitalwerk https://www.digitalwerk.net/wp-content/uploads/substreams-1024x529.png
Is it possible to have a subset of transmitted data in an ADTF sample?
The short answer is no, but… ADTF 3.7 is (will be) capable of separating data streams into single signals – so-called Substreams.
The Filters in this example Filter Graph make use of the new Substream API. The special Sample Streams created by those filters allow selecting the data from a bundle of Substreams to be transmitted by the receiver side. The purple elements in the picture represent the Substream components, connections, and pins over which the filters communicate. Blue connections and black pins are still basic Sample Stream communication
- Substream Selector allows to select a single Substream (by setting a property) as basic Sample Stream („old world“) so that it is possible to connect a „regular“ Filter to it which can handle the data.
- Demo Substream Dumper will dump data of all samples of all connected and available Substreams.
- Demo Substream Generator generates data of multiple Substreams whenever a timer triggers.
- Demo Requestable Substream Generator works almost the same like Demo Substream Generator but show the second benefit of the Substream API: It provides a large number of different signals (Substreams), but it generates only samples of Substreams that have been requested by some consumer (in this case Substream Selector).
ADTF will provide additional core components within the Component View:
- Substream Assembler is a Filter that will combine multiple input basic Sample Streams („old world“ filters) into one outgoing bundle of Substreams
- Substream Merger is a Filter that accepts multiple Substreams which will be merged into one bundle of Substreams
- Substream Selector is a Sample Stream implementation which selects one Substream from an input bundle of Substreams and forwards only the selected as basic Sample Stream to be the connectable with a Filter which does not support Substreams
So what can we do with it?
Imagine some Filter for a protocol, that has a fixed header/payload structure but the structure of the payload is different depending on an ID in the header. This Filter will generate the sample data’s structure with header and payload and a receiving Filter has to sort out what type of payload structure has to be used to read the sample.
This setup has two flaws:
- if payload structures change, the receiving filter has to be updated to reflect those changes.
- protocol messages are transmitted no matter if they’re used by the receiver or not.
With Substreams this task is much easier and more reusable. You can simply select on the receiving side what sample stream to subscribe to. The Generator Filter will sort different payloads into Substreams that can be subscribed by the Receiving Filter. This Receiving Filter will always get the stream of samples that he is able to deal with.
With this approach, it is possible to add and remove receiving Filters according to the needs of the Filter Graph’s use case and you don’t need to take care that structures in the samples will fit. Also, bandwidth for Sample Streams is reduced since only relevant data is transmitted, decoded, and not a whole protocol message.
As of now we will publish more interesting articles about the latest software development trends as well as blog posts about future aspects in the field of ADAS. So please make sure to visit our TechBlog regularly.