public class Message
extends java.lang.Object
Message
and therefore inherit the following characteristics:getMessageType()
.setLength(long)
and retrieved by getLength()
.TimeStamp
for the purpose of transfer
time measurements. They can be managed with the functions addTimeStamp()
,
getTimeStamp()
and removeTimeStamps()
. This is especially important when
dealing with time measurements.Message
contains several output functions (#printMessage(PrintWriter)
, #printHeader(PrintWriter)
,
#printContent(PrintWriter)
) that can be overridden if needed.Generator
). Generally
a generator contains an element of the class MessageFactory
, which copies a given default
message on to the heap with the help of the copy constructor (can be overwritten). By using the
port concept, a message is passed from one model component to the next, whereby a reference
to each message is additionally passed on during the process of the handshake protocol
between two components. Messages are usually deleted in so-called sinks (Sink
).LabelMessage
and IPPacket
are two implemented examples. LabelMessage
has one
additional label whereas IPPacket
includes the most important fields of the IP header like
source and destination id, a group and type field as well as a member for a tag usually used for
scheduling. Special Methods to access and set these fields start with get<*>()
and
set<*>()
.
The length field of a message does not have to be used (initialized) as the
default length is DEFAULT_MESSAGE_LENGTH
(1).
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MESSAGE_LENGTH |
public static final int DEFAULT_MESSAGE_LENGTH