Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
ros_lib/ros_lib/jsk_topic_tools/PassthroughDuration.h
- Committer:
- shimizuta
- Date:
- 2022-09-26
- Revision:
- 0:803105042c95
File content as of revision 0:803105042c95:
#ifndef _ROS_SERVICE_PassthroughDuration_h
#define _ROS_SERVICE_PassthroughDuration_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "ros/duration.h"
namespace jsk_topic_tools
{
static const char PASSTHROUGHDURATION[] = "jsk_topic_tools/PassthroughDuration";
class PassthroughDurationRequest : public ros::Msg
{
public:
typedef ros::Duration _duration_type;
_duration_type duration;
PassthroughDurationRequest():
duration()
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
*(outbuffer + offset + 0) = (this->duration.sec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->duration.sec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->duration.sec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->duration.sec >> (8 * 3)) & 0xFF;
offset += sizeof(this->duration.sec);
*(outbuffer + offset + 0) = (this->duration.nsec >> (8 * 0)) & 0xFF;
*(outbuffer + offset + 1) = (this->duration.nsec >> (8 * 1)) & 0xFF;
*(outbuffer + offset + 2) = (this->duration.nsec >> (8 * 2)) & 0xFF;
*(outbuffer + offset + 3) = (this->duration.nsec >> (8 * 3)) & 0xFF;
offset += sizeof(this->duration.nsec);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
this->duration.sec = ((uint32_t) (*(inbuffer + offset)));
this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->duration.sec);
this->duration.nsec = ((uint32_t) (*(inbuffer + offset)));
this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
this->duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
offset += sizeof(this->duration.nsec);
return offset;
}
virtual const char * getType(){ return PASSTHROUGHDURATION; };
virtual const char * getMD5(){ return "2aa5b5d494c682527e9e9161e1fa58ac"; };
};
class PassthroughDurationResponse : public ros::Msg
{
public:
PassthroughDurationResponse()
{
}
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
return offset;
}
virtual const char * getType(){ return PASSTHROUGHDURATION; };
virtual const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
};
class PassthroughDuration {
public:
typedef PassthroughDurationRequest Request;
typedef PassthroughDurationResponse Response;
};
}
#endif