ACassimiro / TSNsched

Automated Schedule Generation for Time-Sensitive Networks (TSN).
GNU General Public License v3.0
87 stars 38 forks source link

Support for multiple streams sourced at a single Device #10

Closed ermin-sakic closed 3 years ago

ermin-sakic commented 3 years ago

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!

ACassimiro commented 3 years ago

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.