Gary Servin / ros_lib_indigo

Dependencies:   BufferedSerial

Dependents:   rosserial_mbed_hello_world_publisher rtos_base_control rosserial_mbed_F64MA ROS-RTOS ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers QueryCalibrationState.h Source File

QueryCalibrationState.h

00001 #ifndef _ROS_SERVICE_QueryCalibrationState_h
00002 #define _ROS_SERVICE_QueryCalibrationState_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace control_msgs
00009 {
00010 
00011 static const char QUERYCALIBRATIONSTATE[] = "control_msgs/QueryCalibrationState";
00012 
00013   class QueryCalibrationStateRequest : public ros::Msg
00014   {
00015     public:
00016 
00017     QueryCalibrationStateRequest()
00018     {
00019     }
00020 
00021     virtual int serialize(unsigned char *outbuffer) const
00022     {
00023       int offset = 0;
00024       return offset;
00025     }
00026 
00027     virtual int deserialize(unsigned char *inbuffer)
00028     {
00029       int offset = 0;
00030      return offset;
00031     }
00032 
00033     const char * getType(){ return QUERYCALIBRATIONSTATE; };
00034     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00035 
00036   };
00037 
00038   class QueryCalibrationStateResponse : public ros::Msg
00039   {
00040     public:
00041       bool is_calibrated;
00042 
00043     QueryCalibrationStateResponse():
00044       is_calibrated(0)
00045     {
00046     }
00047 
00048     virtual int serialize(unsigned char *outbuffer) const
00049     {
00050       int offset = 0;
00051       union {
00052         bool real;
00053         uint8_t base;
00054       } u_is_calibrated;
00055       u_is_calibrated.real = this->is_calibrated;
00056       *(outbuffer + offset + 0) = (u_is_calibrated.base >> (8 * 0)) & 0xFF;
00057       offset += sizeof(this->is_calibrated);
00058       return offset;
00059     }
00060 
00061     virtual int deserialize(unsigned char *inbuffer)
00062     {
00063       int offset = 0;
00064       union {
00065         bool real;
00066         uint8_t base;
00067       } u_is_calibrated;
00068       u_is_calibrated.base = 0;
00069       u_is_calibrated.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00070       this->is_calibrated = u_is_calibrated.real;
00071       offset += sizeof(this->is_calibrated);
00072      return offset;
00073     }
00074 
00075     const char * getType(){ return QUERYCALIBRATIONSTATE; };
00076     const char * getMD5(){ return "28af3beedcb84986b8e470dc5470507d"; };
00077 
00078   };
00079 
00080   class QueryCalibrationState {
00081     public:
00082     typedef QueryCalibrationStateRequest Request;
00083     typedef QueryCalibrationStateResponse Response;
00084   };
00085 
00086 }
00087 #endif