Skip to content
Snippets Groups Projects
Commit f74976de authored by Compiler bot's avatar Compiler bot
Browse files

autogen lib 2021-03-31T19:54:13+00:00

parent cb6fc934
No related branches found
No related tags found
No related merge requests found
#ifndef _ROS_SERVICE_SetMotorSpeedCmd_h
#define _ROS_SERVICE_SetMotorSpeedCmd_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
namespace mccd_srvs
{
static const char SETMOTORSPEEDCMD[] = "mccd_srvs/SetMotorSpeedCmd";
class SetMotorSpeedCmdRequest : public ros::Msg
{
public:
typedef double _linearSpeed_type;
_linearSpeed_type linearSpeed;
SetMotorSpeedCmdRequest():
linearSpeed(0)
{
}
virtual int serialize(unsigned char *outbuffer) const override
{
int offset = 0;
union {
double real;
uint64_t base;
} u_linearSpeed;
u_linearSpeed.real = this->linearSpeed;
*(outbuffer + offset + 0) = (u_linearSpeed.base >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (u_linearSpeed.base >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (u_linearSpeed.base >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (u_linearSpeed.base >> (8 * 3)) & 0xFF;
*(outbuffer + offset + 4) = (u_linearSpeed.base >> (8 * 4)) & 0xFF;
*(outbuffer + offset + 5) = (u_linearSpeed.base >> (8 * 5)) & 0xFF;
*(outbuffer + offset + 6) = (u_linearSpeed.base >> (8 * 6)) & 0xFF;
*(outbuffer + offset + 7) = (u_linearSpeed.base >> (8 * 7)) & 0xFF;
offset += sizeof(this->linearSpeed);
return offset;
}
virtual int deserialize(unsigned char *inbuffer) override
{
int offset = 0;
union {
double real;
uint64_t base;
} u_linearSpeed;
u_linearSpeed.base = 0;
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
u_linearSpeed.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
this->linearSpeed = u_linearSpeed.real;
offset += sizeof(this->linearSpeed);
return offset;
}
virtual const char * getType() override { return SETMOTORSPEEDCMD; };
virtual const char * getMD5() override { return "799be07c76bb66a91eb07fdc34057709"; };
};
class SetMotorSpeedCmdResponse : public ros::Msg
{
public:
typedef bool _success_type;
_success_type success;
SetMotorSpeedCmdResponse():
success(0)
{
}
virtual int serialize(unsigned char *outbuffer) const override
{
int offset = 0;
union {
bool real;
uint8_t base;
} u_success;
u_success.real = this->success;
*(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
offset += sizeof(this->success);
return offset;
}
virtual int deserialize(unsigned char *inbuffer) override
{
int offset = 0;
union {
bool real;
uint8_t base;
} u_success;
u_success.base = 0;
u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
this->success = u_success.real;
offset += sizeof(this->success);
return offset;
}
virtual const char * getType() override { return SETMOTORSPEEDCMD; };
virtual const char * getMD5() override { return "358e233cde0c8a8bcfea4ce193f8fc15"; };
};
class SetMotorSpeedCmd {
public:
typedef SetMotorSpeedCmdRequest Request;
typedef SetMotorSpeedCmdResponse Response;
};
}
#endif
......@@ -4,8 +4,8 @@
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "nav_msgs/OccupancyGrid.h"
#include "geometry_msgs/PoseWithCovarianceStamped.h"
#include "nav_msgs/OccupancyGrid.h"
namespace nav_msgs
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment