|
OverSim
|
A message parser using the cMemCommBuffer to serialize cmessages. More...
#include <GenericPacketParser.h>
Public Member Functions | |
| char * | encapsulatePayload (cPacket *msg, unsigned int *length) |
| serializes messages in a buffer | |
| cPacket * | decapsulatePayload (char *buf, unsigned int length) |
| deserializes messages from a char[] of size length | |
Public Member Functions inherited from PacketParser | |
| virtual void | initialize () |
| Called on initialisation. | |
| virtual void | handleMessage (cMessage *msg) |
| Is called if the modules receives a message. | |
Private Attributes | |
| cNetCommBuffer | commBuffer |
| the buffer used to encapsulate and decapsulate messages | |
A message parser using the cMemCommBuffer to serialize cmessages.
Definition at line 37 of file GenericPacketParser.h.
|
virtual |
deserializes messages from a char[] of size length
| buf | the buffer to extract the message from |
| length | the length of the buffer |
Implements PacketParser.
Definition at line 41 of file GenericPacketParser.cc.
|
virtual |
serializes messages in a buffer
| msg | the message to serialize |
| length | the length of the message |
Implements PacketParser.
Definition at line 29 of file GenericPacketParser.cc.
|
private |
the buffer used to encapsulate and decapsulate messages
Definition at line 59 of file GenericPacketParser.h.
Referenced by decapsulatePayload(), and encapsulatePayload().