Appendix: Eventlog File Format

This appendix describes the eventlog file format. Eventlog files, generated by the simulation when enabled, record all activities during the simulation, [1] allowing the file to be subsequently used to reproduce the simulation’s history on a sequence chart or through another method.

The file is structured as a line-oriented text file. Blank lines and lines starting with “#” (indicating comments) are disregarded. Other lines begin with an entry identifier, such as E for Event or BS for BeginSend, followed by attribute-identifier and value pairs. An exception is debug output (captured from EV<<... statements), which starts with a hyphen and is followed by the actual text.

The grammar of the eventlog file is as follows:

<file> ::= <line>*
<line> ::= <empty-line> | <user-log-message> | <event-log-entry>
<empty-line> ::= CR LF
<user-log-message> ::= - SPACE <text> CR LF
<event-log-entry> ::= <event-log-entry-type> SPACE <parameters> CR LF
<event-log-entry-type> ::= SB | SE | BU | MB | ME | MC | MD | MR | GC | GD |
                           CC | CD | CS | MS | CE | BS | ES | SD | SH | DM | E
<parameters> ::= (<parameter>)*
<parameter> ::= <name> SPACE <value>
<name> ::= <text>
<value> ::= <boolean> | <integer> | <text> | <quoted-text>

The eventlog file must also fulfill the following requirements:

  • simulation events are in increasing event number and simulation time order

Here is a fragment of an existing eventlog file as an example:

E # 14 t 1.018454036455 m 8 ce 9 msg 6
BS id 6 tid 6 c cMessage n send/endTx pe 14
ES t 4.840247053855
MS id 8 d t=TRANSMIT,,#808000;i=device/pc_s
MS id 8 d t=,,#808000;i=device/pc_s

E # 15 t 1.025727827674 m 2 ce 13 msg 25
- another frame arrived while receiving -- collision!
CE id 0 pe 12
BS id 0 tid 0 c cMessage n end-reception pe 15
ES t 1.12489449434
BU id 2 txt "Collision! (3 frames)"
DM id 25 pe 15

Supported Entry Types and Their Attributes

The following entries and attributes are supported in the eventlog file:

SB (SimulationBegin): mandatory first line of the eventlog file, followed by an empty line

  • ov (omnetppVersion, int): OMNeT++ version, e.g. 0x0401 (=1025) is release 4.1

  • ev (eventlogVersion, int): eventlog version number

  • rid (runId, string): identifies the simulation run

SE (SimulationEnd): optional last non-empty line of the eventlog file, followed by an empty line

  • e (isError, bool): specifies if the simulation terminated due to an error

  • c (resultCode, int): the error code in case of an error, otherwise the normal result code

  • m (message, string): human readable description

E (Event): an event that is processing a message, terminated by an empty line

  • # (eventNumber, eventnumber_t): unique event number

  • t (simulationTime, simtime_t): simulation time when the event occurred

  • m (moduleId, int): id of the processing module

  • ce (causeEventNumber, eventnumber_t): event number from which the message being processed was sent, or -1 if the message was sent from initialize

  • msg (messageId, msgid_t): id of the message being processed

  • f (fingerprints, string): current simulation fingerprints

S (Snapshot): a snapshot of the current simulation state, followed by state entries, and terminated by an emtpy line

  • f (fileOffset, int64_t): file offset of this entry

  • # (eventNumber, eventnumber_t): event number of the last processed event

  • t (simulationTime, simtime_t): simulation time of the last processed event

I (Index): incremental snapshot specifying additional and removed entries with an event number and a line index, followed by an empty line

  • f (fileOffset, int64_t): file offset of this entry

  • i (previousIndexFileOffset, int64_t): file offset of the previous index entry

  • s (previousSnapshotFileOffset, int64_t): file offset of the previous snapshot entry

  • # (eventNumber, eventnumber_t): event number of the last processed event

  • t (simulationTime, simtime_t): simulation time of the last processed event

abstract (Reference): base class for index entry references

  • # (eventNumber, eventnumber_t): event number of the last referred event

  • b (beginEntryIndex, int): begin index of the referred entry within the event

  • e (endEntryIndex, int): end index of the referred entry within the event

RF (ReferenceFound): specifies an eventlog entry found in the snapshot

  • no parameters

RA (ReferenceAdded): specifies an eventlog entry added to the index

  • no parameters

RR (ReferenceRemoved): specifies an eventlog entry removed from the index

  • no parameters

abstract (ModuleReference): base class for entries referring to a module

  • id (moduleId, int): id of the module

abstract (GateReference): base class for entries referring to a gate

  • m (moduleId, int): id of module where the gate is

  • g (gateId, int): id of the gate

abstract (ConnectionReference): base class for entries referring to a connection

  • sm (sourceModuleId, int): id of the source module identifying the connection

  • sg (sourceGateId, int): id of the gate at the source module identifying the connection

abstract (MessageReference): base class for entries referring to a message

  • id (messageId, msgid_t): id of the message

abstract (ModuleDescription): base class for entries describing a module

  • c (moduleClassName, string): C++ class name of the module

  • t (nedTypeName, string): fully qualified NED type name

  • pid (parentModuleId, int): id of the parent module

  • n (fullName, string): full dotted hierarchical module name

  • cm (compoundModule, bool): whether module is a simple or compound module

abstract (GateDescription): base class for entries describing a gate

  • n (name, string): gate name

  • i (index, int): gate index if vector, -1 otherwise

  • o (isOutput, bool): whether the gate is input or output

abstract (ConnectionDescription): base class for entries describing a connection

  • dm (destModuleId, int): id of the destination module

  • dg (destGateId, int): id of the gate at the destination module

abstract (MessageDescription): base class for entries describing a message

  • tid (messageTreeId, msgid_t): id of the message inherited by dup

  • eid (messageEncapsulationId, msgid_t): id of the message inherited by encapsulation

  • etid (messageEncapsulationTreeId, msgid_t): id of the message inherited by both dup and encapsulation

  • c (messageClassName, string): C++ class name of the message

  • n (messageName, string): message name

  • k (messageKind, short): message kind

  • p (messagePriority, short): message priority

  • l (messageLength, int64_t): message length in bits

  • er (hasBitError, bool): true indicates that the message has bit errors

  • m (ownerModuleId, int): id of the owner module where the message was found or -1 (FES)

  • sm (senderModuleId, int): id of the source module where the message was sent from

  • sg (senderGateId, int): id of the gate at the source module from which the message is being sent

  • st (sendingTime, simtime_t): simulation time when the message was sent

  • am (arrivalModuleId, int): id of the destination module where the message was sent to

  • ag (arrivalGateId, int): id of the gate at the source module from which the message is being sent

  • at (arrivalTime, simtime_t): simulation time when the message will arrive

  • d (detail, string): detailed information of message content when recording message data is turned on

  • pe (previousEventNumber, eventnumber_t): event number from which the message being cloned was sent, or -1 if the message was sent from initialize

abstract (ModuleDisplayString): base class for entries describing a module display string

  • d (displayString, string): the new display string

abstract (GateDisplayString): base class for entries describing a gate display string

  • d (displayString, string): the new display string

abstract (ConnectionDisplayString): base class for entries describing a connection display string

  • d (displayString, string): the new display string

abstract (MessageDisplayString): base class for entries describing a message display string

  • d (displayString, string): the new display string

CMB (ComponentMethodBegin): beginning of a call to another module

  • sm (sourceComponentId, int): id of the caller component

  • tm (targetComponentId, int): id of the component being called

  • m (methodName, string): C++ method name

CME (ComponentMethodEnd): end of a call to another component

  • no parameters

MC (ModuleCreated): creating a module

  • no parameters

MD (ModuleDeleted): deleting a module

  • no parameters

GC (GateCreated): creating a gate

  • no parameters

GD (GateDeleted): deleting a gate

  • no parameters

CC (ConnectionCreated): creating a connection

  • no parameters

CD (ConnectionDeleted): deleting a connection

  • no parameters

MDC (ModuleDisplayStringChanged): a module display string change

  • no parameters

GDC (GateDisplayStringChanged): a gate display string change

  • no parameters

CDC (ConnectionDisplayStringChanged): a connection display string change

  • no parameters

EDC (MessageDisplayStringChanged): a message display string change

  • no parameters

CM (CreateMessage): creating a message

  • no parameters

CL (CloneMessage): cloning a message either via the copy constructor or by dup

  • cid (cloneId, msgid_t): id of the original message that is cloned

DM (DeleteMessage): deleting a message

  • no parameters

EN (EncapsulatePacket): encapsulating a packet

  • cid (encapsulatedPacketId, msgid_t): id of the encapsulated packet

DE (DecapsulatePacket): decapsulating a packet

  • cid (encapsulatedPacketId, msgid_t): id of the encapsulated packet

BS (BeginSend): beginning to send a message

  • sd (sendDelay, simtime_t): send after this delay

  • up (isUpdate, bool): whether this is a transmission update

  • tx (transmissionId, txid_t): for pairing transmission updates with the original transmission

ES (EndSend): prediction of the arrival of a message, only a message reference because can’t be alone

  • i (isDeliveredImmediately, bool): true indicates the message is delivered

SD (SendDirect): sending a message directly to a destination gate

  • sm (senderModuleId, int): id of the source module from which the message is being sent

  • dm (destModuleId, int): id of the destination module to which the message is being sent

  • dg (destGateId, int): id of the gate at the destination module to which the message is being sent

  • pd (propagationDelay, simtime_t): propagation delay as the message is propagated through the connection

  • td (transmissionDelay, simtime_t): transmission duration as the whole message is sent from the source gate

  • rd (remainingDuration, simtime_t): remaining transmission time (if packet is a tx update)

SH (SendHop): sending a message through a connection identified by its source module and gate id

  • sm (senderModuleId, int): id of the source module from which the message is being sent

  • sg (senderGateId, int): id of the gate at the source module from which the message is being sent

  • pd (propagationDelay, simtime_t): propagation delay as the message is propagated through the connection

  • td (transmissionDelay, simtime_t): transmission duration as the whole message is sent from the source gate

  • rd (remainingDuration, simtime_t): remaining transmission time (if packet is a tx update)

  • d (discard, bool): whether the channel has discarded the message

CE (CancelEvent): canceling an event caused by sending a self message

  • no parameters

MF (ModuleFound): a module found in the simulation while traversing the modules (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the module created entry

  • ei (lastSeenEntryIndex, int): index of the module created entry

GF (GateFound): a gate found in the simulation while traversing the modules (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the gate created entry

  • ei (lastSeenEntryIndex, int): index of the gate created entry

CF (ConnectionFound): a connection found in the simulation while traversing the modules (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the connection created entry

  • ei (lastSeenEntryIndex, int): index of the connection created entry

EF (MessageFound): a message found in the future event queue (FES) or while traversing the modules (used in snapshots)

  • no parameters

MDF (ModuleDisplayStringFound): a module display string found (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the module display string changed entry

  • ei (lastSeenEntryIndex, int): index of the module display string changed entry

GDF (GateDisplayStringFound): a gate display string found (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the gate display string changed entry

  • ei (lastSeenEntryIndex, int): index of the gate display string changed entry

CDF (ConnectionDisplayStringFound): a connection display string found (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the connection display string changed entry

  • ei (lastSeenEntryIndex, int): index of the connection display string changed entry

EDF (MessageDisplayStringFound): a message display string found (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the message display string changed entry

  • ei (lastSeenEntryIndex, int): index of the message display string changed entry

BU (Bubble): display a bubble message

  • id (moduleId, int): id of the module which printed the bubble message

  • txt (text, string): displayed message text

abstract (CustomReference): custom data reference provided by OMNeT users

  • t (type, string): user specified unique type

  • k (key, long): unique key that links custom entries together

abstract (CustomDescription): custom data provided by OMNeT users

  • c (content, string): user specified content (text, CSV, XML, JSON, etc.)

CUC (CustomCreated): created a custom data object

  • no parameters

CUD (CustomDeleted): deleted a custom data object

  • no parameters

CUM (CustomChanged): changed a custom data object

  • no parameters

CUF (CustomFound): found a custom data object (used in snapshots)

  • # (lastSeenEventNumber, eventnumber_t): event number of the corresponding created entry

  • ei (lastSeenEntryIndex, int): index of the corresponding created begin entry

CU (Custom): custom data provided by OMNeT users

  • no parameters