Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

UDPHandlerEndpoint Class Reference

The UDP-Handler and UDPHandlerEndpoint are used sends team communication data via an UDP-based protocol. More...

#include <UDPHandler.h>

Inheritance diagram for UDPHandlerEndpoint:

Inheritance graph
[legend]
Collaboration diagram for UDPHandlerEndpoint:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UDPHandlerEndpoint ()
 ~UDPHandlerEndpoint ()
virtual void onSendingDone ()
 sets the sender active again

virtual void onReceive (void *data, int size)
 receives data and hands it over to the reciever

virtual void sendPackage (int SenderNumber, void *package, int size)
 called by the sender to send the package


Public Attributes

NetSenderBasesender
 the associated sender

NetReceiverBasereceiver
 the associated reciver

DDPHandlerddpHandler
 the ddpHandler providing the IPs of the teammates

UDPHandlerudpHandler
 the UDP-Handler which is handling this UDPHandlerEndpoint

int lastReceivedSerial
 serial of the last received package

int sendSerial
 serial of the last send package


Detailed Description

The UDP-Handler and UDPHandlerEndpoint are used sends team communication data via an UDP-based protocol.

There are three UDPHandlerEndpoints which are doing the work of sending and receiving the data. To distinguish between the different teammates the outgoing packages are send to the port number TEAMPORTBASE + own player number. So the receiving robot knows where the package comes from.

Definition at line 35 of file UDPHandler.h.


Constructor & Destructor Documentation

UDPHandlerEndpoint::UDPHandlerEndpoint  ) 
 

Definition at line 15 of file UDPHandler.cpp.

References lastReceivedSerial, and sendSerial.

UDPHandlerEndpoint::~UDPHandlerEndpoint  ) 
 

Definition at line 21 of file UDPHandler.cpp.


Member Function Documentation

void UDPHandlerEndpoint::onSendingDone  )  [virtual]
 

sets the sender active again

Reimplemented from UDPEndpoint.

Definition at line 54 of file UDPHandler.cpp.

References NetSenderBase::sendDone().

Here is the call graph for this function:

void UDPHandlerEndpoint::onReceive void *  data,
int  size
[virtual]
 

receives data and hands it over to the reciever

Reimplemented from UDPEndpoint.

Definition at line 59 of file UDPHandler.cpp.

References ddpHandler, NetReceiverBase::getPackage(), idText, DDPListEntry::ip, lastReceivedSerial, DDPHandler::list, NetReceiverBase::onReceive(), OUTPUT, NetReceiverBase::package, and NetSenderBase::senderNumber.

Here is the call graph for this function:

void UDPHandlerEndpoint::sendPackage int  SenderNumber,
void *  package,
int  size
[virtual]
 

called by the sender to send the package

Reimplemented from NetHandler.

Definition at line 26 of file UDPHandler.cpp.

References ddpHandler, UDPHandler::doRegularStuff(), getPlayer(), SystemCall::getTimeSince(), DDPListEntry::ip, DDPHandler::list, UDPEndpoint::send(), NetSenderBase::sendDone(), NetSenderBase::senderNumber, sendSerial, TEAMPORTBASE, and udpHandler.

Here is the call graph for this function:


Member Data Documentation

NetSenderBase* UDPHandlerEndpoint::sender
 

the associated sender

Definition at line 43 of file UDPHandler.h.

Referenced by UDPHandler::addSenderAndReceiver().

NetReceiverBase* UDPHandlerEndpoint::receiver
 

the associated reciver

Definition at line 44 of file UDPHandler.h.

Referenced by UDPHandler::addSenderAndReceiver().

DDPHandler* UDPHandlerEndpoint::ddpHandler
 

the ddpHandler providing the IPs of the teammates

Definition at line 45 of file UDPHandler.h.

Referenced by UDPHandler::addSenderAndReceiver(), onReceive(), and sendPackage().

UDPHandler* UDPHandlerEndpoint::udpHandler
 

the UDP-Handler which is handling this UDPHandlerEndpoint

Definition at line 46 of file UDPHandler.h.

Referenced by UDPHandler::addSenderAndReceiver(), and sendPackage().

int UDPHandlerEndpoint::lastReceivedSerial
 

serial of the last received package

Definition at line 47 of file UDPHandler.h.

Referenced by onReceive(), and UDPHandlerEndpoint().

int UDPHandlerEndpoint::sendSerial
 

serial of the last send package

Definition at line 48 of file UDPHandler.h.

Referenced by sendPackage(), and UDPHandlerEndpoint().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:12:09 2004 for GT2004 by doxygen 1.3.6