#ifndef ARSERVERSENSORINFO_H #define ARSERVERSENSORINFO_H #include "Aria.h" #include "ArServerBase.h" class ArServerClient; /** Service providing clients with data from range sensors. * This service accepts the following data requests: * * * The getSensorList request replies with the following data packet: *
    *
  1. Number of sensors (2-byte integer) *
  2. For each sensor: *
    1. sensor name (Null-terminated string)
    *
  3. *
* * The getSensorCurrent and getSensorCumulative * requests must include the following data: *
    *
  1. Sensor name (Null-terminated string)
  2. *
* * The getSensorCurrent and getSensorCumulative * requests reply with the following data packets: *
    *
  1. Number of readings, or -1 for invalid sensor name error (2-byte integer)
  2. *
  3. Sensor name (null-terminated string)
  4. *
  5. For each reading: *
      *
    1. X coordinate of reading (4-byte integer)
    2. *
    3. Y coordinate of reading (4-byte integer)
    4. *
    *
  6. *
* * This service's requests are all in the SensorInfo group. */ class ArServerInfoSensor { public: AREXPORT ArServerInfoSensor(ArServerBase *server, ArRobot *robot); AREXPORT virtual ~ArServerInfoSensor(); AREXPORT void getSensorList(ArServerClient *client, ArNetPacket *packet); AREXPORT void getSensorCurrent(ArServerClient *client, ArNetPacket *packet); AREXPORT void getSensorCumulative(ArServerClient *client, ArNetPacket *packet); protected: ArRobot *myRobot; ArServerBase *myServer; ArFunctor2C myGetSensorListCB; ArFunctor2C myGetSensorCurrentCB; ArFunctor2C myGetSensorCumulativeCB; }; #endif