#include <ArServerInfoRobot.h>
Public Member Functions | |
void | activityTimeInfo (ArServerClient *client, ArNetPacket *packet) |
The function that sends information about the time that the server mode was last active. | |
ArServerInfoRobot (ArServerBase *server, ArRobot *robot) | |
Constructor. | |
void | batteryInfo (ArServerClient *client, ArNetPacket *packet) |
The function that sends battery info about the robot off to the client. | |
void | physicalInfo (ArServerClient *client, ArNetPacket *packet) |
The function that sends information about the physical robot. | |
void | update (ArServerClient *client, ArNetPacket *packet) |
The function that sends updates about the robot off to the client. | |
virtual | ~ArServerInfoRobot () |
Destructor. | |
Protected Attributes | |
ArFunctor2C< ArServerInfoRobot, ArServerClient *, ArNetPacket * > | myActivityTimeInfoCB |
ArFunctor2C< ArServerInfoRobot, ArServerClient *, ArNetPacket * > | myBatteryInfoCB |
ArFunctor2C< ArServerInfoRobot, ArServerClient *, ArNetPacket * > | myPhysicalInfoCB |
ArRobot * | myRobot |
ArServerBase * | myServer |
ArFunctor2C< ArServerInfoRobot, ArServerClient *, ArNetPacket * > | myUpdateCB |
This service accepts the following data requests:
update
physicalInfo
batteryInfo
activityTimeInfo
The update
request returns data regarding the current state of the robot. It replies with the following data packet:
The 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:
The batteryInfo
request replies with the following data packet:
The activityTimeInfo
request replies with the following data packet:
These requests are in the RobotInfo
command group.
drawingsExampleWithRobot.cpp, popupExample.cpp, serverDemo.cpp, and simpleServerExample.cpp.
Definition at line 81 of file ArServerInfoRobot.h.
|
Constructor.
Definition at line 32 of file ArServerInfoRobot.cpp. References ArServerBase::addData(), myActivityTimeInfoCB, myBatteryInfoCB, myPhysicalInfoCB, myRobot, myServer, and myUpdateCB. |
|
Destructor.
Definition at line 67 of file ArServerInfoRobot.cpp. |
|
The function that sends information about the time that the server mode was last active.
Definition at line 153 of file ArServerInfoRobot.cpp. References ArBasePacket::byte4ToBuf(), client, ArRobot::lock(), myRobot, ArClientBase::sendPacketTcp(), and ArRobot::unlock(). |
|
The function that sends battery info about the robot off to the client.
Definition at line 107 of file ArServerInfoRobot.cpp. References client, ArNetPacket::doubleToBuf(), ArRobotConfigPacketReader::getLowBattery(), ArRobot::getOrigRobotConfig(), ArRobotConfigPacketReader::getShutdownVoltage(), ArRobotConfigPacketReader::hasPacketArrived(), ArRobot::lock(), myRobot, ArClientBase::sendPacketTcp(), and ArRobot::unlock(). |
|
The function that sends information about the physical robot.
Definition at line 136 of file ArServerInfoRobot.cpp. References ArBasePacket::byte2ToBuf(), client, ArRobot::getRobotLengthFront(), ArRobot::getRobotLengthRear(), ArRobot::getRobotSubType(), ArRobot::getRobotType(), ArRobot::getRobotWidth(), ArRobot::lock(), myRobot, ArClientBase::sendPacketTcp(), ArBasePacket::strToBuf(), and ArRobot::unlock(). |
|
The function that sends updates about the robot off to the client.
Definition at line 71 of file ArServerInfoRobot.cpp. References ArBasePacket::byte2ToBuf(), ArBasePacket::byte4ToBuf(), client, ArRobot::getBatteryVoltage(), ArServerMode::getMode(), ArRobot::getRealBatteryVoltage(), ArRobot::getRotVel(), ArServerMode::getStatus(), ArRobot::getTh(), ArRobot::getVel(), ArRobot::getX(), ArRobot::getY(), ArRobot::lock(), myRobot, ArClientBase::sendPacketUdp(), ArBasePacket::strToBuf(), and ArRobot::unlock(). |
|
Definition at line 103 of file ArServerInfoRobot.h. Referenced by ArServerInfoRobot(). |
|
Definition at line 101 of file ArServerInfoRobot.h. Referenced by ArServerInfoRobot(). |
|
Definition at line 102 of file ArServerInfoRobot.h. Referenced by ArServerInfoRobot(). |
|
Definition at line 98 of file ArServerInfoRobot.h. Referenced by activityTimeInfo(), ArServerInfoRobot(), batteryInfo(), physicalInfo(), and update(). |
|
Definition at line 97 of file ArServerInfoRobot.h. Referenced by ArServerInfoRobot(). |
|
Definition at line 100 of file ArServerInfoRobot.h. Referenced by ArServerInfoRobot(). |