#ifndef ARSERVERROBOTINFO_H #define ARSERVERROBOTINFO_H #include "Aria.h" #include "ArServerBase.h" class ArServerClient; /** Server component providing basic robot status information to clients. * This service accepts the following data requests: *
update
physicalInfo
batteryInfo
activityTimeInfo
updateNumbers
* and updateStrings
instead of update
.
*
* The update
request returns data regarding the current
* state of the robot.
* It replies with the following data packet:
* updateNumbers
request returns data regarding the current
* state of the robot.
* It replies with the following data packet:
* updateStrings
request broadcasts data regarding
* the current state of the robot. Request this at -1 to get the
* broadcasts and an initial packet with the inital data.
* It replies with the following data packet:
* physicalInfo
request returns data regarding the physical characteristics of
* the robot. This information does not change during the robot execution. It replies with the
* following data packet:
* batteryInfo
request replies with the following data packet:
* activityTimeInfo
request replies with the following data packet:
* RobotInfo
command group.
*/
class ArServerInfoRobot
{
public:
/// Constructor
AREXPORT ArServerInfoRobot(ArServerBase *server, ArRobot *robot);
/// Destructor
AREXPORT virtual ~ArServerInfoRobot();
/// The function that sends updates about the robot off to the client
AREXPORT void update(ArServerClient *client, ArNetPacket *packet);
/// The function that sends updates about the robot off to the client
AREXPORT void updateNumbers(ArServerClient *client, ArNetPacket *packet);
/// The function that sends updates about the robot off to the client
AREXPORT void updateStrings(ArServerClient *client, ArNetPacket *packet);
/// The function that sends battery info about the robot off to the client
AREXPORT void batteryInfo(ArServerClient *client, ArNetPacket *packet);
/// The function that sends information about the physical robot
AREXPORT void physicalInfo(ArServerClient *client, ArNetPacket *packet);
/// The function that sends information about the time that the server mode was last active
AREXPORT void activityTimeInfo(ArServerClient *client, ArNetPacket *packet);
protected:
ArServerBase *myServer;
ArRobot *myRobot;
void userTask(void);
std::string myStatus;
std::string myExtendedStatus;
std::string myMode;
std::string myOldStatus;
std::string myOldExtendedStatus;
std::string myOldMode;
ArFunctor2C