Professional Documents
Culture Documents
+
Step by Step
Part - 5
By
Mohammed Amer AlBatati
nodes.
The reason is that, Node.ned defines only one
input gate and one output gate.
The solution is to use gate vectors instead of
single gates.
Messages
Depending on the model domain, message
kind);
msg->setKind( kind );
msg->setBitLength( length );
msg->setTimestamp( simtime );
int K = msg->getKind();
int L = msg->getBitLength();
simtime_t T = msg->getTimestamp();
etc
one slide
one line
Messages Encapsulation
Example
IP
MAC
MAC
IP
Messages Encapsulation
cont.
Inspecting cMessage objects (previous code).
Messages Encapsulation
cont.
Modify Node.cc code to include the encapsulation
example.
Messages Encapsulation
cont.
Inspecting cPacekt objects (new code).
Messages Decapsulation
Example
Assume that the following cPacket was
received as MACdata.
MAC
IP
statement:
IP
MAC
Name
IP
ID
Year
H
W E
A LP
Name N ID
D TE
IP
Year
At
Node.cc