ArCentralManager Class Reference

#include <ArCentralManager.h>

Inheritance diagram for ArCentralManager:

ArASyncTask ArThread List of all members.

Public Member Functions

void addForwarderAddedCallback (ArFunctor1< ArCentralForwarder * > *functor, int priority=0)
 Adds a callback for when a new forwarder is added.
void addForwarderRemovedCallback (ArFunctor1< ArCentralForwarder * > *functor, int priority=0)
 Adds a callback for when a new forwarder is destroyed.
 ArCentralManager (ArServerBase *robotServer, ArServerBase *clientServer)
 Constructor.
void forwarderServerClientRemovedCallback (ArCentralForwarder *forwarder, ArServerClient *client)
 A callback so we can tell the main connection happened when a client is removed.
void logConnections (void)
 Logs all the connection information.
void mainServerClientRemovedCallback (ArServerClient *client)
 A callback so we can close down other connetions when a main client loses connection.
void netClientList (ArServerClient *client, ArNetPacket *packet)
 Networking command to get the list of clients.
void netServerSwitch (ArServerClient *client, ArNetPacket *packet)
 Networking command to switch the direction of a connection.
void remForwarderAddedCallback (ArFunctor1< ArCentralForwarder * > *functor)
 Removes a callback for when a new forwarder is added.
void remForwarderRemovedCallback (ArFunctor1< ArCentralForwarder * > *functor)
 Removes a callback for when a new forwarder is destroyed.
virtual void * runThread (void *arg)
 This should be its own thread here.
virtual ~ArCentralManager ()
 Destructor.

Protected Member Functions

void close (void)
bool processFile (void)

Protected Attributes

ArFunctorC< ArCentralManagermyAriaExitCB
ArMutex myCallbackMutex
double myClientBackupTimeout
std::list< std::string > myClientNames
ArServerBasemyClientServer
std::list< ArSocket * > myClientSockets
ArTypes::UByte4 myClosingConnectionID
ArMutex myDataMutex
std::multimap< int, ArFunctor1<
ArCentralForwarder * > * > 
myForwarderAddedCBList
std::multimap< int, ArFunctor1<
ArCentralForwarder * > * > 
myForwarderRemovedCBList
std::list< ArCentralForwarder * > myForwarders
ArFunctor2C< ArCentralManager,
ArCentralForwarder *, ArServerClient * > 
myForwarderServerClientRemovedCB
double myHeartbeatTimeout
ArFunctor1C< ArCentralManager,
ArServerClient * > 
myMainServerClientRemovedCB
int myMostClients
int myMostForwarders
ArFunctor2C< ArCentralManager,
ArServerClient *, ArNetPacket * > 
myNetClientListCB
ArFunctor2C< ArCentralManager,
ArServerClient *, ArNetPacket * > 
myNetSwitchCB
int myOnSocket
ArRetFunctorC< bool, ArCentralManagermyProcessFileCB
double myRobotBackupTimeout
ArServerBasemyRobotServer
double myUdpHeartbeatTimeout
std::set< int > myUsedPorts

Constructor & Destructor Documentation

ArCentralManager::ArCentralManager ( ArServerBase robotServer,
ArServerBase clientServer 
)

Constructor.

ArCentralManager::~ArCentralManager (  )  [virtual]

Destructor.


Member Function Documentation

void ArCentralManager::addForwarderAddedCallback ( ArFunctor1< ArCentralForwarder * > *  functor,
int  priority = 0 
)

Adds a callback for when a new forwarder is added.

void ArCentralManager::addForwarderRemovedCallback ( ArFunctor1< ArCentralForwarder * > *  functor,
int  priority = 0 
)

Adds a callback for when a new forwarder is destroyed.

void ArCentralManager::close ( void   )  [protected]

void ArCentralManager::forwarderServerClientRemovedCallback ( ArCentralForwarder forwarder,
ArServerClient client 
)

A callback so we can tell the main connection happened when a client is removed.

void ArCentralManager::logConnections ( void   ) 

Logs all the connection information.

void ArCentralManager::mainServerClientRemovedCallback ( ArServerClient client  ) 

A callback so we can close down other connetions when a main client loses connection.

void ArCentralManager::netClientList ( ArServerClient client,
ArNetPacket packet 
)

Networking command to get the list of clients.

void ArCentralManager::netServerSwitch ( ArServerClient client,
ArNetPacket packet 
)

Networking command to switch the direction of a connection.

acknowledge the switch

bool ArCentralManager::processFile ( void   )  [protected]

void ArCentralManager::remForwarderAddedCallback ( ArFunctor1< ArCentralForwarder * > *  functor  ) 

Removes a callback for when a new forwarder is added.

void ArCentralManager::remForwarderRemovedCallback ( ArFunctor1< ArCentralForwarder * > *  functor  ) 

Removes a callback for when a new forwarder is destroyed.

void * ArCentralManager::runThread ( void *  arg  )  [virtual]

This should be its own thread here.

Implements ArASyncTask.


Member Data Documentation

ArFunctorC<ArCentralManager> ArCentralManager::myAriaExitCB [protected]

ArMutex ArCentralManager::myCallbackMutex [protected]

double ArCentralManager::myClientBackupTimeout [protected]

std::list<std::string> ArCentralManager::myClientNames [protected]

ArServerBase* ArCentralManager::myClientServer [protected]

std::list<ArSocket *> ArCentralManager::myClientSockets [protected]

ArTypes::UByte4 ArCentralManager::myClosingConnectionID [protected]

ArMutex ArCentralManager::myDataMutex [protected]

std::multimap<int, ArFunctor1<ArCentralForwarder *> *> ArCentralManager::myForwarderAddedCBList [protected]

std::multimap<int, ArFunctor1<ArCentralForwarder *> *> ArCentralManager::myForwarderRemovedCBList [protected]

std::list<ArCentralForwarder *> ArCentralManager::myForwarders [protected]

ArFunctor2C<ArCentralManager, ArCentralForwarder *, ArServerClient *> ArCentralManager::myForwarderServerClientRemovedCB [protected]

double ArCentralManager::myHeartbeatTimeout [protected]

ArFunctor1C<ArCentralManager, ArServerClient *> ArCentralManager::myMainServerClientRemovedCB [protected]

int ArCentralManager::myMostClients [protected]

int ArCentralManager::myMostForwarders [protected]

ArFunctor2C<ArCentralManager, ArServerClient *, ArNetPacket *> ArCentralManager::myNetClientListCB [protected]

ArFunctor2C<ArCentralManager, ArServerClient *, ArNetPacket *> ArCentralManager::myNetSwitchCB [protected]

int ArCentralManager::myOnSocket [protected]

ArRetFunctorC<bool, ArCentralManager> ArCentralManager::myProcessFileCB [protected]

double ArCentralManager::myRobotBackupTimeout [protected]

ArServerBase* ArCentralManager::myRobotServer [protected]

double ArCentralManager::myUdpHeartbeatTimeout [protected]

std::set<int> ArCentralManager::myUsedPorts [protected]


The documentation for this class was generated from the following files:
Generated on Fri Jul 31 12:37:28 2009 for ArNetworking by  doxygen 1.4.7