The MessageEngine is treated separately from other ClockListeners by JBotSim's Scheduler. Indeed, it calls MessageEngine.onClock() directly, before anything else, in order to make sure that all messages have been delivered before the round starts.
In most cases, everything works well.
However, when one tries to change the delivering rate of the MessageEngine (MessageEngine.setSpeed()), the MessageEngine registers itself to the Topology as a ClockListener. From that on, the MessageEngine is both called:
- at the start of each round;
- during the rounds in which the
ClockListener mechanism expires.
Although seldom used, this incoherent behavior must be fixed.
Please keep the MessageEngine as a ClockListener so that it might be used as such by other schedulers.
Also, fix/improve/enhance any related feature in the process.
The
MessageEngineis treated separately from otherClockListeners by JBotSim'sScheduler. Indeed, it callsMessageEngine.onClock()directly, before anything else, in order to make sure that all messages have been delivered before the round starts.In most cases, everything works well.
However, when one tries to change the delivering rate of the
MessageEngine(MessageEngine.setSpeed()), theMessageEngineregisters itself to theTopologyas aClockListener. From that on, theMessageEngineis both called:ClockListenermechanism expires.Although seldom used, this incoherent behavior must be fixed.
Please keep the
MessageEngineas aClockListenerso that it might be used as such by other schedulers.Also, fix/improve/enhance any related feature in the process.