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

# DDPHandler Class Reference

`#include <DDPHandler.h>`

Inheritance diagram for DDPHandler:

[legend]
Collaboration diagram for DDPHandler:

[legend]
List of all members.

## Public Member Functions
| DDPHandler ()
| ~DDPHandler ()
void | initDDPHandler ()
void | updateDDPList ()
IPAddress | getIPAddress (int number)
void | sendDDPPackage ()
bool | activeTeamMembers ()
virtual void | onReceive (void *data, int size)
| Called when new data arrives.
## Public Attributes
DDPListEntry | list [Player::numOfPlayerNumbers-1]
char | teamIdentifier [16]
## Private Attributes
DDPPackage | thePackage
unsigned long | timeLastPackage

## Constructor & Destructor Documentation

DDPHandler::DDPHandler | ( |  | ) |

| Definition at line 20 of file DDPHandler.cpp. References DDPListEntry::ip, list, DDPListEntry::port, timeLastPackage, and DDPListEntry::timeLastSeen.

DDPHandler::~DDPHandler | ( |  | ) | `[inline]`

| Definition at line 40 of file DDPHandler.h.

## Member Function Documentation

void DDPHandler::initDDPHandler | ( |  | ) |

| Definition at line 38 of file DDPHandler.cpp. References UDPEndpoint::bind(), and DDPPORT. Referenced by UDPHandler::start().

Here is the call graph for this function:

void DDPHandler::updateDDPList | ( |  | ) |

| Definition at line 33 of file DDPHandler.cpp.

IPAddress DDPHandler::getIPAddress | ( | int | number | ) |

| Definition at line 43 of file DDPHandler.cpp.

void DDPHandler::sendDDPPackage | ( |  | ) |

| Definition at line 98 of file DDPHandler.cpp. References DDPPORT, endl(), SystemCall::getCurrentSystemTime(), getPlayer(), Player::getPlayerNumber(), SystemCall::getRemainingPower(), Player::getTeamColor(), SystemCall::getTimeSince(), DDPPackage::playerNumber, UDPEndpoint::send(), DDPPackage::teamColor, DDPPackage::teamIdentifier, and timeLastPackage. Referenced by UDPHandler::doRegularStuff().

Here is the call graph for this function:

bool DDPHandler::activeTeamMembers | ( |  | ) |

| Definition at line 118 of file DDPHandler.cpp. References SystemCall::getTimeSince(), and list. Referenced by UDPHandlerEndpoint::sendPackage().

Here is the call graph for this function:

void DDPHandler::onReceive | ( | void * | data,
|  | int | size
| ) | `[virtual]`

| Called when new data arrives. Reimplemented from UDPEndpoint. Definition at line 51 of file DDPHandler.cpp. References ASSERT, Watchdog::enter(), SystemCall::getCurrentSystemTime(), getPlayer(), Player::getPlayerNumber(), Player::getTeamColor(), idText, INFO, Watchdog::leave(), and watchdog.

Here is the call graph for this function:

## Member Data Documentation

DDPListEntry DDPHandler::list[Player::numOfPlayerNumbers-1]

| Definition at line 52 of file DDPHandler.h. Referenced by activeTeamMembers(), DDPHandler(), and UDPHandlerEndpoint::onReceive().

char DDPHandler::teamIdentifier[16]

| Definition at line 53 of file DDPHandler.h.

DDPPackage DDPHandler::thePackage`[private]`

| Definition at line 56 of file DDPHandler.h.

unsigned long DDPHandler::timeLastPackage`[private]`

| Definition at line 57 of file DDPHandler.h. Referenced by DDPHandler(), and sendDDPPackage().

The documentation for this class was generated from the following files:

- Platform/Aperios1.3.2/DDPHandler.h
- Platform/Aperios1.3.2/DDPHandler.cpp