rosserial library for mbed Inspired by nucho's rosserial library This library is still under development
Dependents: mbed_roshydro_test
Library still under development!
control_msgs/JointControllerState.h@0:30537dec6e0b, 2015-02-15 (annotated)
- Committer:
- akashvibhute
- Date:
- Sun Feb 15 10:53:43 2015 +0000
- Revision:
- 0:30537dec6e0b
First commit; Library still need to be debugged, compilation issues with new mbed and modserial updates.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akashvibhute | 0:30537dec6e0b | 1 | #ifndef _ROS_control_msgs_JointControllerState_h |
akashvibhute | 0:30537dec6e0b | 2 | #define _ROS_control_msgs_JointControllerState_h |
akashvibhute | 0:30537dec6e0b | 3 | |
akashvibhute | 0:30537dec6e0b | 4 | #include <stdint.h> |
akashvibhute | 0:30537dec6e0b | 5 | #include <string.h> |
akashvibhute | 0:30537dec6e0b | 6 | #include <stdlib.h> |
akashvibhute | 0:30537dec6e0b | 7 | #include "ros/msg.h" |
akashvibhute | 0:30537dec6e0b | 8 | #include "std_msgs/Header.h" |
akashvibhute | 0:30537dec6e0b | 9 | |
akashvibhute | 0:30537dec6e0b | 10 | namespace control_msgs |
akashvibhute | 0:30537dec6e0b | 11 | { |
akashvibhute | 0:30537dec6e0b | 12 | |
akashvibhute | 0:30537dec6e0b | 13 | class JointControllerState : public ros::Msg |
akashvibhute | 0:30537dec6e0b | 14 | { |
akashvibhute | 0:30537dec6e0b | 15 | public: |
akashvibhute | 0:30537dec6e0b | 16 | std_msgs::Header header; |
akashvibhute | 0:30537dec6e0b | 17 | float set_point; |
akashvibhute | 0:30537dec6e0b | 18 | float process_value; |
akashvibhute | 0:30537dec6e0b | 19 | float process_value_dot; |
akashvibhute | 0:30537dec6e0b | 20 | float error; |
akashvibhute | 0:30537dec6e0b | 21 | float time_step; |
akashvibhute | 0:30537dec6e0b | 22 | float command; |
akashvibhute | 0:30537dec6e0b | 23 | float p; |
akashvibhute | 0:30537dec6e0b | 24 | float i; |
akashvibhute | 0:30537dec6e0b | 25 | float d; |
akashvibhute | 0:30537dec6e0b | 26 | float i_clamp; |
akashvibhute | 0:30537dec6e0b | 27 | |
akashvibhute | 0:30537dec6e0b | 28 | JointControllerState(): |
akashvibhute | 0:30537dec6e0b | 29 | header(), |
akashvibhute | 0:30537dec6e0b | 30 | set_point(0), |
akashvibhute | 0:30537dec6e0b | 31 | process_value(0), |
akashvibhute | 0:30537dec6e0b | 32 | process_value_dot(0), |
akashvibhute | 0:30537dec6e0b | 33 | error(0), |
akashvibhute | 0:30537dec6e0b | 34 | time_step(0), |
akashvibhute | 0:30537dec6e0b | 35 | command(0), |
akashvibhute | 0:30537dec6e0b | 36 | p(0), |
akashvibhute | 0:30537dec6e0b | 37 | i(0), |
akashvibhute | 0:30537dec6e0b | 38 | d(0), |
akashvibhute | 0:30537dec6e0b | 39 | i_clamp(0) |
akashvibhute | 0:30537dec6e0b | 40 | { |
akashvibhute | 0:30537dec6e0b | 41 | } |
akashvibhute | 0:30537dec6e0b | 42 | |
akashvibhute | 0:30537dec6e0b | 43 | virtual int serialize(unsigned char *outbuffer) const |
akashvibhute | 0:30537dec6e0b | 44 | { |
akashvibhute | 0:30537dec6e0b | 45 | int offset = 0; |
akashvibhute | 0:30537dec6e0b | 46 | offset += this->header.serialize(outbuffer + offset); |
akashvibhute | 0:30537dec6e0b | 47 | offset += serializeAvrFloat64(outbuffer + offset, this->set_point); |
akashvibhute | 0:30537dec6e0b | 48 | offset += serializeAvrFloat64(outbuffer + offset, this->process_value); |
akashvibhute | 0:30537dec6e0b | 49 | offset += serializeAvrFloat64(outbuffer + offset, this->process_value_dot); |
akashvibhute | 0:30537dec6e0b | 50 | offset += serializeAvrFloat64(outbuffer + offset, this->error); |
akashvibhute | 0:30537dec6e0b | 51 | offset += serializeAvrFloat64(outbuffer + offset, this->time_step); |
akashvibhute | 0:30537dec6e0b | 52 | offset += serializeAvrFloat64(outbuffer + offset, this->command); |
akashvibhute | 0:30537dec6e0b | 53 | offset += serializeAvrFloat64(outbuffer + offset, this->p); |
akashvibhute | 0:30537dec6e0b | 54 | offset += serializeAvrFloat64(outbuffer + offset, this->i); |
akashvibhute | 0:30537dec6e0b | 55 | offset += serializeAvrFloat64(outbuffer + offset, this->d); |
akashvibhute | 0:30537dec6e0b | 56 | offset += serializeAvrFloat64(outbuffer + offset, this->i_clamp); |
akashvibhute | 0:30537dec6e0b | 57 | return offset; |
akashvibhute | 0:30537dec6e0b | 58 | } |
akashvibhute | 0:30537dec6e0b | 59 | |
akashvibhute | 0:30537dec6e0b | 60 | virtual int deserialize(unsigned char *inbuffer) |
akashvibhute | 0:30537dec6e0b | 61 | { |
akashvibhute | 0:30537dec6e0b | 62 | int offset = 0; |
akashvibhute | 0:30537dec6e0b | 63 | offset += this->header.deserialize(inbuffer + offset); |
akashvibhute | 0:30537dec6e0b | 64 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->set_point)); |
akashvibhute | 0:30537dec6e0b | 65 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->process_value)); |
akashvibhute | 0:30537dec6e0b | 66 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->process_value_dot)); |
akashvibhute | 0:30537dec6e0b | 67 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->error)); |
akashvibhute | 0:30537dec6e0b | 68 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->time_step)); |
akashvibhute | 0:30537dec6e0b | 69 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->command)); |
akashvibhute | 0:30537dec6e0b | 70 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->p)); |
akashvibhute | 0:30537dec6e0b | 71 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->i)); |
akashvibhute | 0:30537dec6e0b | 72 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->d)); |
akashvibhute | 0:30537dec6e0b | 73 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->i_clamp)); |
akashvibhute | 0:30537dec6e0b | 74 | return offset; |
akashvibhute | 0:30537dec6e0b | 75 | } |
akashvibhute | 0:30537dec6e0b | 76 | |
akashvibhute | 0:30537dec6e0b | 77 | const char * getType(){ return "control_msgs/JointControllerState"; }; |
akashvibhute | 0:30537dec6e0b | 78 | const char * getMD5(){ return "c0d034a7bf20aeb1c37f3eccb7992b69"; }; |
akashvibhute | 0:30537dec6e0b | 79 | |
akashvibhute | 0:30537dec6e0b | 80 | }; |
akashvibhute | 0:30537dec6e0b | 81 | |
akashvibhute | 0:30537dec6e0b | 82 | } |
akashvibhute | 0:30537dec6e0b | 83 | #endif |