ric_rc.h
Go to the documentation of this file.
00001 #ifndef _ROS_ric_robot_ric_rc_h
00002 #define _ROS_ric_robot_ric_rc_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 
00009 namespace ric_robot
00010 {
00011 
00012   class ric_rc : public ros::Msg
00013   {
00014     public:
00015       uint16_t RX1;
00016       uint16_t RX2;
00017       uint16_t RX3;
00018       uint16_t RX4;
00019       uint16_t RX5;
00020       uint16_t RX6;
00021 
00022     virtual int serialize(unsigned char *outbuffer) const
00023     {
00024       int offset = 0;
00025       *(outbuffer + offset + 0) = (this->RX1 >> (8 * 0)) & 0xFF;
00026       *(outbuffer + offset + 1) = (this->RX1 >> (8 * 1)) & 0xFF;
00027       offset += sizeof(this->RX1);
00028       *(outbuffer + offset + 0) = (this->RX2 >> (8 * 0)) & 0xFF;
00029       *(outbuffer + offset + 1) = (this->RX2 >> (8 * 1)) & 0xFF;
00030       offset += sizeof(this->RX2);
00031       *(outbuffer + offset + 0) = (this->RX3 >> (8 * 0)) & 0xFF;
00032       *(outbuffer + offset + 1) = (this->RX3 >> (8 * 1)) & 0xFF;
00033       offset += sizeof(this->RX3);
00034       *(outbuffer + offset + 0) = (this->RX4 >> (8 * 0)) & 0xFF;
00035       *(outbuffer + offset + 1) = (this->RX4 >> (8 * 1)) & 0xFF;
00036       offset += sizeof(this->RX4);
00037       *(outbuffer + offset + 0) = (this->RX5 >> (8 * 0)) & 0xFF;
00038       *(outbuffer + offset + 1) = (this->RX5 >> (8 * 1)) & 0xFF;
00039       offset += sizeof(this->RX5);
00040       *(outbuffer + offset + 0) = (this->RX6 >> (8 * 0)) & 0xFF;
00041       *(outbuffer + offset + 1) = (this->RX6 >> (8 * 1)) & 0xFF;
00042       offset += sizeof(this->RX6);
00043       return offset;
00044     }
00045 
00046     virtual int deserialize(unsigned char *inbuffer)
00047     {
00048       int offset = 0;
00049       this->RX1 =  ((uint16_t) (*(inbuffer + offset)));
00050       this->RX1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00051       offset += sizeof(this->RX1);
00052       this->RX2 =  ((uint16_t) (*(inbuffer + offset)));
00053       this->RX2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00054       offset += sizeof(this->RX2);
00055       this->RX3 =  ((uint16_t) (*(inbuffer + offset)));
00056       this->RX3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00057       offset += sizeof(this->RX3);
00058       this->RX4 =  ((uint16_t) (*(inbuffer + offset)));
00059       this->RX4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00060       offset += sizeof(this->RX4);
00061       this->RX5 =  ((uint16_t) (*(inbuffer + offset)));
00062       this->RX5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00063       offset += sizeof(this->RX5);
00064       this->RX6 =  ((uint16_t) (*(inbuffer + offset)));
00065       this->RX6 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00066       offset += sizeof(this->RX6);
00067      return offset;
00068     }
00069 
00070     const char * getType(){ return "ric_robot/ric_rc"; };
00071     const char * getMD5(){ return "141c3eb3d7391c30d945399a5b34b7d1"; };
00072 
00073   };
00074 
00075 }
00076 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Fri May 20 2016 03:48:56