1 #ifndef _ROS_sensor_msgs_JointState_h
2 #define _ROS_sensor_msgs_JointState_h
39 virtual int serialize(
unsigned char *outbuffer)
const
44 *(outbuffer + offset++) = 0;
45 *(outbuffer + offset++) = 0;
46 *(outbuffer + offset++) = 0;
48 uint32_t length_namei = strlen(this->
name[i]);
49 memcpy(outbuffer + offset, &length_namei,
sizeof(uint32_t));
51 memcpy(outbuffer + offset, this->
name[i], length_namei);
52 offset += length_namei;
55 *(outbuffer + offset++) = 0;
56 *(outbuffer + offset++) = 0;
57 *(outbuffer + offset++) = 0;
62 *(outbuffer + offset++) = 0;
63 *(outbuffer + offset++) = 0;
64 *(outbuffer + offset++) = 0;
69 *(outbuffer + offset++) = 0;
70 *(outbuffer + offset++) = 0;
71 *(outbuffer + offset++) = 0;
82 uint8_t name_lengthT = *(inbuffer + offset++);
84 this->
name = (
char**)realloc(this->
name, name_lengthT *
sizeof(
char*));
88 uint32_t length_st_name;
89 memcpy(&length_st_name, (inbuffer + offset),
sizeof(uint32_t));
91 for(
unsigned int k= offset; k< offset+length_st_name; ++k){
92 inbuffer[k-1]=inbuffer[k];
94 inbuffer[offset+length_st_name-1]=0;
95 this->
st_name = (
char *)(inbuffer + offset-1);
96 offset += length_st_name;
97 memcpy( &(this->
name[i]), &(this->
st_name),
sizeof(
char*));
99 uint8_t position_lengthT = *(inbuffer + offset++);
101 this->
position = (
float*)realloc(this->
position, position_lengthT *
sizeof(
float));
108 uint8_t velocity_lengthT = *(inbuffer + offset++);
110 this->
velocity = (
float*)realloc(this->
velocity, velocity_lengthT *
sizeof(
float));
117 uint8_t effort_lengthT = *(inbuffer + offset++);
119 this->
effort = (
float*)realloc(this->
effort, effort_lengthT *
sizeof(
float));
129 const char *
getType(){
return "sensor_msgs/JointState"; };
130 const char *
getMD5(){
return "3066dcd76a6cfaef579bd0f34173e9fd"; };
float st_effort
Definition: JointState.h:27
static int serializeAvrFloat64(unsigned char *outbuffer, const float f)
This tricky function handles promoting a 32bit float to a 64bit double, so that AVR can publish messa...
Definition: msg.h:62
uint8_t position_length
Definition: JointState.h:20
const char * getMD5()
Definition: JointState.h:130
float * velocity
Definition: JointState.h:25
uint8_t name_length
Definition: JointState.h:17
std_msgs::Header header
Definition: JointState.h:16
virtual int serialize(unsigned char *outbuffer) const
Definition: JointState.h:39
virtual int deserialize(unsigned char *inbuffer)
Definition: JointState.h:78
float st_position
Definition: JointState.h:21
char ** name
Definition: JointState.h:19
float * position
Definition: JointState.h:22
Definition: JointState.h:13
uint8_t effort_length
Definition: JointState.h:26
const char * getType()
Definition: JointState.h:129
JointState()
Definition: JointState.h:30
uint8_t velocity_length
Definition: JointState.h:23
float st_velocity
Definition: JointState.h:24
static int deserializeAvrFloat64(const unsigned char *inbuffer, float *f)
This tricky function handles demoting a 64bit double to a 32bit float, so that AVR can understand mes...
Definition: msg.h:100
char * st_name
Definition: JointState.h:18
float * effort
Definition: JointState.h:28