relays.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_relays_h
00002 #define _ROS_SERVICE_relays_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace ric_robot
00009 {
00010 
00011 static const char RELAYS[] = "ric_robot/relays";
00012 
00013   class relaysRequest : public ros::Msg
00014   {
00015     public:
00016       bool ch1;
00017       bool ch2;
00018 
00019     virtual int serialize(unsigned char *outbuffer) const
00020     {
00021       int offset = 0;
00022       union {
00023         bool real;
00024         uint8_t base;
00025       } u_ch1;
00026       u_ch1.real = this->ch1;
00027       *(outbuffer + offset + 0) = (u_ch1.base >> (8 * 0)) & 0xFF;
00028       offset += sizeof(this->ch1);
00029       union {
00030         bool real;
00031         uint8_t base;
00032       } u_ch2;
00033       u_ch2.real = this->ch2;
00034       *(outbuffer + offset + 0) = (u_ch2.base >> (8 * 0)) & 0xFF;
00035       offset += sizeof(this->ch2);
00036       return offset;
00037     }
00038 
00039     virtual int deserialize(unsigned char *inbuffer)
00040     {
00041       int offset = 0;
00042       union {
00043         bool real;
00044         uint8_t base;
00045       } u_ch1;
00046       u_ch1.base = 0;
00047       u_ch1.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00048       this->ch1 = u_ch1.real;
00049       offset += sizeof(this->ch1);
00050       union {
00051         bool real;
00052         uint8_t base;
00053       } u_ch2;
00054       u_ch2.base = 0;
00055       u_ch2.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00056       this->ch2 = u_ch2.real;
00057       offset += sizeof(this->ch2);
00058      return offset;
00059     }
00060 
00061     const char * getType(){ return RELAYS; };
00062     const char * getMD5(){ return "1f11a3ed137a90a6662107bc18da38b6"; };
00063 
00064   };
00065 
00066   class relaysResponse : public ros::Msg
00067   {
00068     public:
00069       bool ack;
00070 
00071     virtual int serialize(unsigned char *outbuffer) const
00072     {
00073       int offset = 0;
00074       union {
00075         bool real;
00076         uint8_t base;
00077       } u_ack;
00078       u_ack.real = this->ack;
00079       *(outbuffer + offset + 0) = (u_ack.base >> (8 * 0)) & 0xFF;
00080       offset += sizeof(this->ack);
00081       return offset;
00082     }
00083 
00084     virtual int deserialize(unsigned char *inbuffer)
00085     {
00086       int offset = 0;
00087       union {
00088         bool real;
00089         uint8_t base;
00090       } u_ack;
00091       u_ack.base = 0;
00092       u_ack.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00093       this->ack = u_ack.real;
00094       offset += sizeof(this->ack);
00095      return offset;
00096     }
00097 
00098     const char * getType(){ return RELAYS; };
00099     const char * getMD5(){ return "8f5729177853f34b146e2e57766d4dc2"; };
00100 
00101   };
00102 
00103   class relays {
00104     public:
00105     typedef relaysRequest Request;
00106     typedef relaysResponse Response;
00107   };
00108 
00109 }
00110 #endif


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