28 #ifndef ROSCPP_MESSAGE_H 29 #define ROSCPP_MESSAGE_H 37 #include <boost/shared_ptr.hpp> 38 #include <boost/array.hpp> 42 #define ROSCPP_MESSAGE_HAS_DEFINITION 47 typedef std::map<std::string, std::string>
M_string;
64 virtual const std::string __getDataType()
const = 0;
65 virtual const std::string __getMD5Sum()
const = 0;
66 virtual const std::string __getMessageDefinition()
const = 0;
67 inline static std::string __s_getDataType() {
ROS_BREAK();
return std::string(
""); }
68 inline static std::string __s_getMD5Sum() {
ROS_BREAK();
return std::string(
""); }
69 inline static std::string __s_getMessageDefinition() {
ROS_BREAK();
return std::string(
""); }
71 virtual uint8_t *
serialize(uint8_t *write_ptr, uint32_t seq)
const = 0;
72 virtual uint8_t *
deserialize(uint8_t *read_ptr) = 0;
73 uint32_t __serialized_length;
80 #define SROS_SERIALIZE_PRIMITIVE(ptr, data) { memcpy(ptr, &data, sizeof(data)); ptr += sizeof(data); } 81 #define SROS_SERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(ptr, data, data_size); ptr += data_size; } } 82 #define SROS_DESERIALIZE_PRIMITIVE(ptr, data) { memcpy(&data, ptr, sizeof(data)); ptr += sizeof(data); } 83 #define SROS_DESERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(data, ptr, data_size); ptr += data_size; } }
std::map< std::string, std::string > M_string
void serialize(Stream &stream, const T &t)
uint32_t serializationLength(const T &t)
void deserialize(Stream &stream, T &t)