#include <UDPHandler.h>
Inheritance diagram for UDPHandlerEndpoint:
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 | |
NetSenderBase * | sender |
the associated sender | |
NetReceiverBase * | receiver |
the associated reciver | |
DDPHandler * | ddpHandler |
the ddpHandler providing the IPs of the teammates | |
UDPHandler * | udpHandler |
the UDP-Handler which is handling this UDPHandlerEndpoint | |
int | lastReceivedSerial |
serial of the last received package | |
int | sendSerial |
serial of the last send package |
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.
|
Definition at line 15 of file UDPHandler.cpp. References lastReceivedSerial, and sendSerial. |
|
Definition at line 21 of file UDPHandler.cpp. |
|
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:
|
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:
|
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:
|
the associated sender
Definition at line 43 of file UDPHandler.h. Referenced by UDPHandler::addSenderAndReceiver(). |
|
the associated reciver
Definition at line 44 of file UDPHandler.h. Referenced by UDPHandler::addSenderAndReceiver(). |
|
the ddpHandler providing the IPs of the teammates
Definition at line 45 of file UDPHandler.h. Referenced by UDPHandler::addSenderAndReceiver(), onReceive(), and sendPackage(). |
|
the UDP-Handler which is handling this UDPHandlerEndpoint
Definition at line 46 of file UDPHandler.h. Referenced by UDPHandler::addSenderAndReceiver(), and sendPackage(). |
|
serial of the last received package
Definition at line 47 of file UDPHandler.h. Referenced by onReceive(), and UDPHandlerEndpoint(). |
|
serial of the last send package
Definition at line 48 of file UDPHandler.h. Referenced by sendPackage(), and UDPHandlerEndpoint(). |