This beta is should be sufficiently stable for daily use, but does not yet contain
all changes we have planned for the 5.0 release. More betas can be expected
in the next months, adding the missing pieces.
Changes in this release:
Core:
- Added the Canvas API, a figure-based 2D drawing API. The Canvas API allows
augmenting simulations with graphical elements. Item types include various
shapes, text and image, including an SVG-like "path" item (a generalized
polygon/polyline, with arcs and Bezier curves). Transformations (scaling,
rotation, skewing) are supported, as well as transparency.
- New logging API. It features six log levels (FATAL, ERROR, WARN, INFO,
DETAIL, DEBUG, TRACE), category support, compile-time and runtime global
and per-module log level thresholds.
Also, much more information is passed with each log line to the user
interface code, allowing one to display a wealth of information in the log
prefix (log level, file/line, event number, simulation time, module name
and type, object name and type, and so on).
Incompatibilities:
- lower-case ev<< is no longer legal, use EV<< instead
- ev.printf() was removed, use the stream API (EV<<) instead
- Introduced cEvent as a base class of cMessage. cEvent allows scheduling
of arbitrary code for a simulation time that runs independent of modules.
Override the execute() method of cEvent to specify the code. cEvent is
not intended for use in simulation models; the primary motivation is to
allow implementing simulation time limit with an "end-simulation" event,
and to encapsulate foreign events (e.g. SystemC events and crunching)
for seemless integration with the simulation event loop.
- Added support for simulation lifecycle listeners. Listeners are called back
before and after network setup, on network initialization, before and after
network finalization, and so on. The motivation was to allow more flexibility
when writing initialization and shutdown code for schedulers, result
file managers and other extensions.
- Channel objects made equal to modules in the sense that now they also have
IDs (the getId() method was moved from cModule to cComponent, the common base
class of modules and channels), and they are also registered with cSimulation.
- cTopology improvements:
- added factory methods for links and edges
- added methods to manipulate the graph (e.g. build a graph from scratch)
- Removed int8..int64 and uint8..uint64. Models should use the standard integer
types from <stdint.h> that end in "_t": int8_t, uint8_t, etc.
- check_and_cast<> improved; added check_and_cast_nullable<> that accepts NULL
pointer as input
- New fingerprint computation algorithm. The goal was to make the fingerprint
less sensitive to uninteresting changes (e.g. removal of an inactive module),
and more sensitive to interesting ones (e.g. change in packet lengths).
To get the old fingerprints, define USE_OMNETPP4x_FINGERPRINTS when compiling
OMNeT++.
- cClassDescriptor interface changes (method renaming and arg list changes)
- Code cleanup, including:
- removal of 3.x backward compatilibity features (WITH_DOUBLE_SIMTIME,
WITHOUT_CPACKET)
- removal of deprecated classes, functions and macros (cLinkedList,
cSimulation::operator[], Define_Function(), etc.)
- cTopology: internals refactored (use STL instead of arrays, etc.)
- error code enum members renamed from eXXX to E_XXX
Cmdenv:
- Log lines can now be prefixed with information such as the module
path; simulation time; event's class and object name; file/line
of the log statement; class, name and pointer of the object
containing the log statement; etc. The format of this prefix can be
changed from ini files.
- New inifile config options: cmdenv-log-format, cmdenv-log-level.
Tkenv:
- The bgs (background scaling) display string tag has been removed. It was
originally introduced more or less as a default zoom level, but lost its
significance since interactive zoom has been introduced.
- Zooming no longer affects icon sizes on the screen (but you still have
the Increase/Decrease Icon Size, Ctrl+I/Ctrl+O menu items in Tkenv).
- Finished implementation of the Canvas API Tkenv rendering. The
implementation is based on figure renderers (see FigureRenderer class)
that can be registered for various figure classes.
The implementation is based on the Tkpath Tcl/Tk extension, which was
significantly enhanced by our team.
- Tkpath is now also used internally for drawing submodules, connections
and the like. Benefits include:
- unlimited zooming of image backgrounds
- antialiased drawing (Tk canvas didn't have antialiasing)
- OS X: images are no longer forced into 1-bit transparency
- labels are now outlined (have a "halo") to make them readable on noisy backgrounds
- range indicator fill is now semi-transparent (because Tkpath supports that)
- performance improvements e.g. on OS X, and with image backgrounds
- Display log prefix; log prefix format and log level configurable via the Options dialog
IDE:
- Several minor improvements. NED editor support for canvas items is pending.
Example simulations:
- Added samples/canvas, a demo for the Canvas API
Bugs fixed: see
http://dev.omnetpp.org/bugs/changelog_page.php?project_id=1