March 7, 2016



For TEMU 2.2 there will be some API breakage, firstly the count parameter of the temu_addInterface function will be removed. This parameter is not used at present. If you are using the emulator from C++, the parameter has a default argument, so it should not have any significant effect.

The second more fundamental change will be the event system. The current system is being rewamped with support for pre-allocated event structures. This should speed up the event system by removing allocations during event insertion and removal. The old EventIface has been renamed LegacyEventIface (the LegacyEvent interface has been deprecated as well). The new event system is backwards compatible except for how events are published. Thus, calls to the registerEvent method in the interface should be replaced with temu_eventPublishOldStyle(), this call should be made in the model constructor intead of when the queue object is connected.

The main point with this is that the event API is moving away from the interface based variant, to a function based variant.

There will be two options:

Note that the legacy event interface will be removed completely in release following TEMU 2.2. So it is recommended that you move to the new event system instead.

The advantages are two fold. Firstly the new temu_Object class that all internal classes must inherit from now has a reference to its queue object (which can be connected in the CLI with the connect-timesource function). You therefore no longer need to add a EventIface reference property to your model. Secondly, the new function based interface allow the posting of events using one out of three time bases (cycles, nanoseconds or seconds).

The new API is less confusing, and more easy to use. In addition, it should result in signficant performance advantages for high frequency and high volume event usage.