ACassimiro/TSNsched

Support for multiple streams sourced at a single Device

Closed this issue · 1 comments

Hello and thanks for making your source code public!

I am wondering if there is a way to specify multiple streams sourced at a single Talker Device and let solver consider this in the GCL computation? The Device class interface seems to take as input only a single set of packetPeriodicity + XConstraintTime + packetSize arguments.

Thanks!

Hello!

I apologize for the late reply.

You can link multiple flows to one device. Just instantiate a Flow object and use the method .setStartDevice(Device dev) to set the device dev as the source/sender/publisher of that flow. Its interesting to notice that a flow, by default, will have its sending periodicity and first sending time equals to the sending periodicity and first sending time of the source device, and these values are set on the Device constructor method, but you can overwrite those values by using the constructor method Flow(int type, float flowFirstSendingTime, float flowSendingPeriodicity) instead of using Flow(int type), which is the one used in the samples of code. If you insist in using the latter method for constructing your flow objects, you still can use the methods .setFlowFirstSendingTime(float flowFirstSendingTime) and .setFlowSendingPeriodicity(float flowSendingPeriodicity) on your flow objects to overwrite the device first sending time and periodicity on the flow (just make sure you set these values after setting the source device of your flow).

I hope this clarifies your questions. Feel free to ask anything that comes to mind.