catchrobo2022 mbed LPC1768 メインプログラム

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TrackerStatus.h Source File

TrackerStatus.h

00001 #ifndef _ROS_jsk_recognition_msgs_TrackerStatus_h
00002 #define _ROS_jsk_recognition_msgs_TrackerStatus_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 #include "std_msgs/Header.h"
00009 
00010 namespace jsk_recognition_msgs
00011 {
00012 
00013   class TrackerStatus : public ros::Msg
00014   {
00015     public:
00016       typedef std_msgs::Header _header_type;
00017       _header_type header;
00018       typedef bool _is_tracking_type;
00019       _is_tracking_type is_tracking;
00020 
00021     TrackerStatus():
00022       header(),
00023       is_tracking(0)
00024     {
00025     }
00026 
00027     virtual int serialize(unsigned char *outbuffer) const
00028     {
00029       int offset = 0;
00030       offset += this->header.serialize(outbuffer + offset);
00031       union {
00032         bool real;
00033         uint8_t base;
00034       } u_is_tracking;
00035       u_is_tracking.real = this->is_tracking;
00036       *(outbuffer + offset + 0) = (u_is_tracking.base >> (8 * 0)) & 0xFF;
00037       offset += sizeof(this->is_tracking);
00038       return offset;
00039     }
00040 
00041     virtual int deserialize(unsigned char *inbuffer)
00042     {
00043       int offset = 0;
00044       offset += this->header.deserialize(inbuffer + offset);
00045       union {
00046         bool real;
00047         uint8_t base;
00048       } u_is_tracking;
00049       u_is_tracking.base = 0;
00050       u_is_tracking.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00051       this->is_tracking = u_is_tracking.real;
00052       offset += sizeof(this->is_tracking);
00053      return offset;
00054     }
00055 
00056     virtual const char * getType(){ return "jsk_recognition_msgs/TrackerStatus"; };
00057     virtual const char * getMD5(){ return "78e8f06a6b728df052dd181bfcf6c26e"; };
00058 
00059   };
00060 
00061 }
00062 #endif