Skip to content

Messages delivered twice when MessageEngine.setSpeed() used #58

@remikey

Description

@remikey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreadyThis issue is fixed. It awaits to be released.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions