TunOutDevice Class Reference

TunOutDevice is a pseudo interface that allows communcation with the real world through the TunOutScheduler. More...

#include <TunOutDevice.h>

Inheritance diagram for TunOutDevice:
RealworldDevice RealworldConnector

List of all members.

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.

Detailed Description

TunOutDevice is a pseudo interface that allows communcation with the real world through the TunOutScheduler.

WARNING: This does ONLY work with the combination IPv4|UDP|OverlayMessage

Definition at line 36 of file TunOutDevice.h.


Member Function Documentation

cPacket * TunOutDevice::decapsulate ( char *  buf,
uint32_t  length,
sockaddr *  addr,
socklen_t  addrlen 
) [protected, virtual]

Parses data received from the (realworld) network and converts it into a cMessage.

Parameters:
buf A pointer to the data to be parsed
length The lenght of the buffer in bytes
addr Ignored (deleted)
addrlen Ignored
Returns:
The parsed message

Implements RealworldConnector.

Definition at line 258 of file TunOutDevice.cc.

00262 {
00263     throw cRuntimeError("TunOutDevice::decapsulate(): Not supported on Windows/Mac OS yet");
00264 }

char * TunOutDevice::encapsulate ( cPacket *  msg,
unsigned int *  length,
sockaddr **  addr,
socklen_t *  addrlen 
) [protected, virtual]

Converts an IP datagram to a data block for sending it to the (realworld) network.

Parameters:
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)
Returns:
A pointer to the converted data

Implements RealworldConnector.

Definition at line 266 of file TunOutDevice.cc.

00270 {
00271     throw cRuntimeError("TunOutDevice::encapsulate(): Not supported on Windows/Mac OS yet");
00272 }


The documentation for this class was generated from the following files:
Generated on Wed May 26 16:21:19 2010 for OverSim by  doxygen 1.6.3