rosserial library for mbed Inspired by nucho's rosserial library This library is still under development
Dependents: mbed_roshydro_test
Library still under development!
Diff: industrial_msgs/RobotMode.h
- Revision:
- 0:30537dec6e0b
diff -r 000000000000 -r 30537dec6e0b industrial_msgs/RobotMode.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/industrial_msgs/RobotMode.h Sun Feb 15 10:53:43 2015 +0000 @@ -0,0 +1,58 @@ +#ifndef _ROS_industrial_msgs_RobotMode_h +#define _ROS_industrial_msgs_RobotMode_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" + +namespace industrial_msgs +{ + + class RobotMode : public ros::Msg + { + public: + int8_t val; + enum { UNKNOWN = -1 }; + enum { MANUAL = 1 }; + enum { AUTO = 2 }; + + RobotMode(): + val(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_val; + u_val.real = this->val; + *(outbuffer + offset + 0) = (u_val.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->val); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + int8_t real; + uint8_t base; + } u_val; + u_val.base = 0; + u_val.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->val = u_val.real; + offset += sizeof(this->val); + return offset; + } + + const char * getType(){ return "industrial_msgs/RobotMode"; }; + const char * getMD5(){ return "24ac279e988b6b3db836e437e6ed1ba0"; }; + + }; + +} +#endif