#include <ArServerHandlerMapping.h>
Public Member Functions | |
void | addMappingEndCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
Adds a callback for the end of mapping. | |
void | addMappingStartCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
Adds a callback for the start of mapping. | |
void | addPostMoveCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
Adds a callback to be called after moving from temp dir to base dir. | |
void | addPreMoveCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
Adds a callback to be called before moving from temp dir to base dir. | |
void | addSimpleCommands (ArServerHandlerCommands *handlerCommands) |
Adds the simple commands to the simple command handler passed in. | |
void | addStringForStartOfLogs (const char *str, ArListPos::Pos position=ArListPos::LAST) |
Adds a string for adding to the log when we start. | |
ArServerHandlerMapping (ArServerBase *server, ArRobot *robot, ArSick *sick, const char *baseDirectory="", const char *tempDirectory="", bool useReflectorValues=false) | |
Constructor. | |
bool | packetHandler (ArRobotPacket *packet) |
The packet handler for starting/stopping scans from the lcd. | |
void | remMappingEndCallback (ArFunctor *functor) |
Removes a callback for the end of mapping. | |
void | remMappingStartCallback (ArFunctor *functor) |
Removes a callback for the start of mapping. | |
void | remPostMoveCallback (ArFunctor *functor) |
Removes a callback to be called after moving from temp dir to base dir. | |
void | remPreMoveCallback (ArFunctor *functor) |
Removes a callback to be called before moving from temp dir to base dir. | |
void | remStringForStartOfLogs (char *str) |
Removes a string for adding to the log when we start. | |
void | serverMappingEnd (ArServerClient *client, ArNetPacket *packet) |
Ends a map. | |
void | serverMappingStart (ArServerClient *client, ArNetPacket *packet) |
Starts a new map unless ones already made. | |
void | serverMappingStatus (ArServerClient *client, ArNetPacket *packet) |
Gets the mapping status. | |
void | simpleLoopEnd (ArArgumentBuilder *arg) |
Adds a loop end to the log. | |
void | simpleLoopStart (ArArgumentBuilder *arg) |
Adds a loop start to the log. | |
virtual | ~ArServerHandlerMapping () |
Deconstructor. | |
Protected Attributes | |
std::string | myBaseDirectory |
std::string | myFileName |
ArServerHandlerCommands * | myHandlerCommands |
ArFunctor1C< ArServerHandlerMapping, ArArgumentBuilder * > | myLoopEndCB |
ArFunctor1C< ArServerHandlerMapping, ArArgumentBuilder * > | myLoopStartCB |
std::string | myMapName |
std::list< ArFunctor * > | myMappingEndCallbacks |
ArFunctor2C< ArServerHandlerMapping, ArServerClient *, ArNetPacket * > | myMappingEndCB |
std::list< ArFunctor * > | myMappingStartCallbacks |
ArFunctor2C< ArServerHandlerMapping, ArServerClient *, ArNetPacket * > | myMappingStartCB |
ArFunctor2C< ArServerHandlerMapping, ArServerClient *, ArNetPacket * > | myMappingStatusCB |
ArRetFunctor1C< bool, ArServerHandlerMapping, ArRobotPacket * > | myPacketHandlerCB |
std::list< ArFunctor * > | myPostMoveCallbacks |
std::list< ArFunctor * > | myPreMoveCallbacks |
ArRobot * | myRobot |
ArServerBase * | myServer |
ArSick * | mySick |
ArSickLogger * | mySickLogger |
std::list< std::string > | myStringsForStartOfLog |
std::string | myTempDirectory |
bool | myUseReflectorValues |
Definition at line 34 of file ArServerHandlerMapping.h.
|
Constructor.
Definition at line 43 of file ArServerHandlerMapping.cpp. References ArServerBase::addData(), ArRobot::addPacketHandler(), myBaseDirectory, myFileName, myHandlerCommands, myMapName, myMappingEndCB, myMappingStartCB, myMappingStatusCB, myPacketHandlerCB, myRobot, myServer, mySick, mySickLogger, myTempDirectory, myUseReflectorValues, and ArFunctor::setName(). |
|
Deconstructor.
Definition at line 96 of file ArServerHandlerMapping.cpp. References mySickLogger. |
|
Adds a callback for the end of mapping.
Definition at line 338 of file ArServerHandlerMapping.cpp. References ArLog::log(), and myMappingEndCallbacks. |
|
Adds a callback for the start of mapping.
Definition at line 320 of file ArServerHandlerMapping.cpp. References ArLog::log(), and myMappingStartCallbacks. |
|
Adds a callback to be called after moving from temp dir to base dir.
Definition at line 374 of file ArServerHandlerMapping.cpp. References ArLog::log(), and myPostMoveCallbacks. |
|
Adds a callback to be called before moving from temp dir to base dir.
Definition at line 356 of file ArServerHandlerMapping.cpp. References ArLog::log(), and myPreMoveCallbacks. |
|
Adds the simple commands to the simple command handler passed in.
Definition at line 392 of file ArServerHandlerMapping.cpp. References ArServerHandlerCommands::addStringCommand(), myHandlerCommands, myLoopEndCB, and myLoopStartCB. |
|
Adds a string for adding to the log when we start.
Definition at line 303 of file ArServerHandlerMapping.cpp. References ArLog::log(), and myStringsForStartOfLog. |
|
The packet handler for starting/stopping scans from the lcd.
Definition at line 420 of file ArServerHandlerMapping.cpp. References ArNetPacket::finalizePacket(), ArRobot::lock(), ArLog::log(), myRobot, mySickLogger, serverMappingEnd(), serverMappingStart(), ArBasePacket::strToBuf(), and ArRobot::unlock(). |
|
Removes a callback for the end of mapping.
Definition at line 350 of file ArServerHandlerMapping.cpp. References myMappingEndCallbacks. |
|
Removes a callback for the start of mapping.
Definition at line 332 of file ArServerHandlerMapping.cpp. References myMappingStartCallbacks. |
|
Removes a callback to be called after moving from temp dir to base dir.
Definition at line 386 of file ArServerHandlerMapping.cpp. References myPostMoveCallbacks. |
|
Removes a callback to be called before moving from temp dir to base dir.
Definition at line 368 of file ArServerHandlerMapping.cpp. References myPreMoveCallbacks. |
|
Removes a string for adding to the log when we start.
Definition at line 314 of file ArServerHandlerMapping.cpp. References myStringsForStartOfLog. |
|
Ends a map.
Definition at line 188 of file ArServerHandlerMapping.cpp. References ArServerBase::broadcastPacketTcp(), ArBasePacket::byteToBuf(), client, ArUtil::fixSlashes(), ArRobot::lock(), ArLog::log(), myBaseDirectory, myFileName, myMapName, myMappingEndCallbacks, myPostMoveCallbacks, myPreMoveCallbacks, myRobot, myServer, mySickLogger, myTempDirectory, ArClientBase::sendPacketTcp(), ArBasePacket::strToBuf(), ArBasePacket::uByte2ToBuf(), and ArRobot::unlock(). Referenced by packetHandler(). |
|
Starts a new map unless ones already made.
Definition at line 102 of file ArServerHandlerMapping.cpp. References ArSickLogger::addInfoToLogPlain(), ArServerBase::broadcastPacketTcp(), ArBasePacket::byteToBuf(), client, Aria::getJoyHandler(), Aria::getRobotJoyHandler(), ArRobot::lock(), ArLog::log(), ArUtil::lower(), myFileName, myMapName, myMappingStartCallbacks, myRobot, myServer, mySick, mySickLogger, myStringsForStartOfLog, myTempDirectory, myUseReflectorValues, ArClientBase::sendPacketTcp(), ArBasePacket::strToBuf(), ArRobot::unlock(), and ArSickLogger::wasFileOpenedSuccessfully(). Referenced by packetHandler(). |
|
Gets the mapping status.
Definition at line 295 of file ArServerHandlerMapping.cpp. References client, myMapName, ArClientBase::sendPacketTcp(), and ArBasePacket::strToBuf(). |
|
Adds a loop end to the log.
Definition at line 413 of file ArServerHandlerMapping.cpp. References ArSickLogger::addTagToLog(), and mySickLogger. |
|
Adds a loop start to the log.
Definition at line 407 of file ArServerHandlerMapping.cpp. References ArSickLogger::addTagToLog(), and mySickLogger. |
|
Definition at line 102 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), and serverMappingEnd(). |
|
Definition at line 101 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), serverMappingEnd(), and serverMappingStart(). |
|
Definition at line 107 of file ArServerHandlerMapping.h. Referenced by addSimpleCommands(), and ArServerHandlerMapping(). |
|
Definition at line 110 of file ArServerHandlerMapping.h. Referenced by addSimpleCommands(). |
|
Definition at line 109 of file ArServerHandlerMapping.h. Referenced by addSimpleCommands(). |
|
Definition at line 100 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), serverMappingEnd(), serverMappingStart(), and serverMappingStatus(). |
|
Definition at line 95 of file ArServerHandlerMapping.h. Referenced by addMappingEndCallback(), remMappingEndCallback(), and serverMappingEnd(). |
|
Definition at line 105 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(). |
|
Definition at line 94 of file ArServerHandlerMapping.h. Referenced by addMappingStartCallback(), remMappingStartCallback(), and serverMappingStart(). |
|
Definition at line 104 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(). |
|
Definition at line 106 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(). |
|
Definition at line 108 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(). |
|
Definition at line 97 of file ArServerHandlerMapping.h. Referenced by addPostMoveCallback(), remPostMoveCallback(), and serverMappingEnd(). |
|
Definition at line 96 of file ArServerHandlerMapping.h. Referenced by addPreMoveCallback(), remPreMoveCallback(), and serverMappingEnd(). |
|
Definition at line 89 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), packetHandler(), serverMappingEnd(), and serverMappingStart(). |
|
Definition at line 88 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), serverMappingEnd(), and serverMappingStart(). |
|
Definition at line 90 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), and serverMappingStart(). |
|
Definition at line 99 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), packetHandler(), serverMappingEnd(), serverMappingStart(), simpleLoopEnd(), simpleLoopStart(), and ~ArServerHandlerMapping(). |
|
Definition at line 98 of file ArServerHandlerMapping.h. Referenced by addStringForStartOfLogs(), remStringForStartOfLogs(), and serverMappingStart(). |
|
Definition at line 103 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), serverMappingEnd(), and serverMappingStart(). |
|
Definition at line 91 of file ArServerHandlerMapping.h. Referenced by ArServerHandlerMapping(), and serverMappingStart(). |