Closed howhangliu closed 1 year ago
Hi all, Currently, after some modification, the configuration can run, but the result is still strange. I've done the following.
Add some configurations for the clock of switch1.
[Config OutOfBandSyncBase]
description = "Base config for out-of-band synchronization"
*.switch1.clock.typename = "OscillatorBasedClock"
*.switch1.clock.oscillator.typename = "RandomDriftOscillator"
*.switch1.clock.oscillator.driftRateChange = uniform(-125ppm, 125ppm)
*.switch1.clock.oscillator.changeInterval = 0.1ms
....
I also comment some codes in [General].
...
# Ethernet interface and queueing
#*.*.eth[*].typename = "LayeredEthernetInterface"
#*.*.eth[*].bitrate = 1Gbps
#*.switch1.eth[0].macLayer.queue.typename = "GatingPriorityQueue"
#*.switch1.eth[0].macLayer.queue.numQueues = 2
#*.switch1.eth[0].macLayer.queue.classifier.typename = "ContentBasedClassifier"
#*.switch1.eth[0].macLayer.queue.classifier.packetFilters = ["source1*", "source2*"]
#*.switch1.eth[0].macLayer.queue.queue[*].typename = "DropTailQueue"
#*.switch1.eth[0].macLayer.queue.gate[*].initiallyOpen = false
#*.switch1.eth[0].macLayer.queue.gate[*].durations = [10us, 10us]
#*.switch1.eth[0].macLayer.queue.gate[0].offset = 3.118us
#*.switch1.eth[0].macLayer.queue.gate[1].offset = 13.118us
The result is a bit strange. I plot the timeChanged:vector from ClockDriftShowcase.switch1.clock. I expect a random change curve, but now is a linearly increasing line.
If you have any idea please let me know. Thank you very much.
The OutOfBandSyncBase is a base configuration, so it's not supposed to be run on its own. That's why there are errors. The ConstantClockDriftOutOfBandSync and RandomClockDriftOutOfBandSync configs extend it and set the clock type (this is what your modification did).
To get the clock time to difference to simulation time statistic, apply a lineartrend vector operation with -1 as argument.
Hi @adamgeorge309 , Thank you for the reply. Can you explain the last sentance a bit more? How to apply the lineartrend vector operation with -1 as argument?
Right click on the chart, select Apply / Linear trend from the context menu, set the parameter to -1 in the popup dialog.
Hello INET contributors,
Recently, I was trying to run the showcases of tsn/timesynchronization/clockdrfit and there is a configuration called: [Config OutOfBandSyncBase].
When I try to run the simulation, the error message pops up:
Module not found on path '^.^.switch1.clock' defined by par ClockDriftShowcase.source1.app[1].masterClockModule' -- in module (inet::SimpleClockSynchronizer) ClockDriftShowcase.source1.app[1] (id=63), during network initialization.
Do you have any idea how to fix the problem?
Thank you. Best regards