Changed
- iaViewer 0.5: Improved responsitivity: Handles now huge drawings by using deferred drawing. Support assertion failures. Fixed vScroll bug.
Added
- support for model assertions: models can call assertionFailed(). Simulator by default stops on assertionFailure. Use sim.run(stopOnAssertionFailure=False) to override this. Simulator displays a list of all assertion failures at end of simulation
- Support remote controllable vThreads: Create a vThread with remoteController=True and the vThread will have then a moddy port "threadControlPort" which expects "start" or "kill" messages. Unlike normal vThreads, remoteControlled threads do not start automatically, but are waiting for "start" command. If a thread is terminated, all pending timers are stopped, all receive queues are cleared and no messages can be received while terminated.
- New tutorial: 6_vthreadRemoteControlled.py to demonstrate remote controllable vThreads and model assertions
- Allow vThreads to exit their main loop: in that case, the thread is dead (a remoteControlled thread may be restarted)
- simPart.time() as a shortcut for models (models can call self.time() instead of self._sim.time())
- support sim.run(maxEvents=None) for infinite number of events.
- commonly used status box appearance colors bcXXX, e.g. bcWhiteOnRed (see moddy/__init__.py)
Fixed
- simulator's incorrect stop time handling. Sometimes, last event has not been processed
- simulator now terminates correctly (without a timeout) when a model thread throws an exception