Hi,
Thanks for your code. I am running an example on the project.
My example has two flows as follows:
Flow flow0 = new Flow(Flow.UNICAST);
flow0.setStartDevice(dev4);
flow0.addToPath(switch0);
flow0.addToPath(switch2);
flow0.setEndDevice(dev10);
flow0.setFlowSendingPeriodicity(2000);
Flow flow1 = new Flow(Flow.UNICAST);
flow1.setStartDevice(dev5);
flow1.addToPath(switch1);
flow1.addToPath(switch2);
flow1.setEndDevice(dev10);
flow1.setFlowSendingPeriodicity(3000);
The topology is:
Dev4 -> SW0 -> SW2 -> Dev10
^
|
Dev5 -> Sw1 ->
And the result is:
>>>> INFORMATION OF SWITCH: switch0 <<<<
Port list -
=> Port name: switch0Port1
Connects to: switch2
Cycle start: 0.0
Cycle duration: 2000.0
Fragments: flow1Fragment1,
Priority number: 7
Index 0 Slot start: 1949.088
Index 0 Slot duration: 8.004
------------------------
>>>> INFORMATION OF SWITCH: switch1 <<<<
Port list -
=> Port name: switch1Port1
Connects to: switch2
Cycle start: 0.0
Cycle duration: 3000.0
Fragments: flow2Fragment1,
Priority number: 7
Index 0 Slot start: 2940.996
Index 0 Slot duration: 8.0
------------------------
>>>> INFORMATION OF SWITCH: switch2 <<<<
Port list -
=> Port name: switch2Port9
Connects to: dev10
Cycle start: 0.0
Cycle duration: 1000.0
Fragments: flow1Fragment2, flow2Fragment2,
Priority number: 7
Index 0 Slot start: 949.992
Index 0 Slot duration: 50.0
------------------------
I notice that Cycle duration of Switch2 is 1ms. It means that there is a slot in 1ms. But cycle of flow0 is 2ms, and cycle of flow1 is 3ms. There will has two slot without packets within every 6ms.
I think it is better that the Cycle duration of Switch2 shall be 6ms (i.e. Least Common Multiple of two flow). In each cycle, there are four time slots .

Which part of the code do I need to modify?
Thanks
Hi,
Thanks for your code. I am running an example on the project.
My example has two flows as follows:
The topology is:
And the result is:
I notice that Cycle duration of Switch2 is 1ms. It means that there is a slot in 1ms. But cycle of flow0 is 2ms, and cycle of flow1 is 3ms. There will has two slot without packets within every 6ms.
I think it is better that the Cycle duration of Switch2 shall be 6ms (i.e. Least Common Multiple of two flow). In each cycle, there are four time slots .

Which part of the code do I need to modify?
Thanks