OverSim
|
Applicaton that communicates with a realword application via a socket. More...
#include <RealworldApp.h>
Protected Member Functions | |
virtual char * | encapsulate (cPacket *msg, unsigned int *length, sockaddr **addr, socklen_t *addrlen) |
Converts an IP datagram to a data block for sending it to the (realworld) network. | |
virtual cPacket * | decapsulate (char *buf, uint32_t length, sockaddr *addr, socklen_t addrlen) |
Parses data received from the (realworld) network and converts it into a cMessage. | |
virtual bool | isApp () |
The Connector connects to an application, so this method to returns "true". | |
Protected Member Functions inherited from RealworldConnector | |
virtual void | transmitToNetwork (cPacket *msg) |
Send a message to the (realworld) network. | |
virtual void | updateDisplayString () |
Additional Inherited Members | |
Public Member Functions inherited from RealworldConnector | |
RealworldConnector () | |
virtual | ~RealworldConnector () |
virtual int | numInitStages () const |
virtual void | initialize (int stage) |
Initialization of the module. | |
virtual void | handleMessage (cMessage *msg) |
The "main loop". | |
Protected Attributes inherited from RealworldConnector | |
int | gateIndexNetwOut |
unsigned int | mtu |
long | numSent |
long | numSendError |
long | numRcvdOK |
long | numRcvError |
cMessage * | packetNotification |
PacketBuffer | packetBuffer |
RealtimeScheduler * | scheduler |
PacketParser * | parser |
Applicaton that communicates with a realword application via a socket.
Definition at line 33 of file RealworldApp.h.
|
protectedvirtual |
Parses data received from the (realworld) network and converts it into a cMessage.
buf | A pointer to the data to be parsed |
length | The lenght of the buffer in bytes |
addr | Ignored (deleted) |
addrlen | Ignored |
Implements RealworldConnector.
Definition at line 52 of file RealworldApp.cc.
|
protectedvirtual |
Converts an IP datagram to a data block for sending it to the (realworld) network.
msg | A pointer to the message to be converted |
length | A pointer to an int that will hold the length of the converted data |
addr | Ignored (set to 0) |
addrlen | Ignored (set to 0) |
Implements RealworldConnector.
Definition at line 30 of file RealworldApp.cc.
|
inlineprotectedvirtual |
The Connector connects to an application, so this method to returns "true".
Reimplemented from RealworldConnector.
Definition at line 69 of file RealworldApp.h.