From b76c0b6be62e91ca8d1ce5e727511576587cea86 Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Thu, 16 Sep 2021 19:09:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A6=96=E6=AC=A1=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: a1012112796 <1012112796@qq.com> --- .gitignore | 3 +- devel/include/test_topic/Bytes.h | 239 +++++++++++++++++++++++++++++++ 2 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 devel/include/test_topic/Bytes.h diff --git a/.gitignore b/.gitignore index b2b3844..4d3f98a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vscode/ build/ -devel/ +devel/* +!/devel/include *.o diff --git a/devel/include/test_topic/Bytes.h b/devel/include/test_topic/Bytes.h new file mode 100644 index 0000000..07eed90 --- /dev/null +++ b/devel/include/test_topic/Bytes.h @@ -0,0 +1,239 @@ +// Generated by gencpp from file test_topic/Bytes.msg +// DO NOT EDIT! + + +#ifndef TEST_TOPIC_MESSAGE_BYTES_H +#define TEST_TOPIC_MESSAGE_BYTES_H + + +#include +#include +#include + +#include +#include +#include +#include + + +namespace test_topic +{ +template +struct Bytes_ +{ + typedef Bytes_ Type; + + Bytes_() + : data() + , tick() + , length(0) + , id(0) + , type() { + } + Bytes_(const ContainerAllocator& _alloc) + : data(_alloc) + , tick() + , length(0) + , id(0) + , type(_alloc) { + (void)_alloc; + } + + + + typedef std::vector::other > _data_type; + _data_type data; + + typedef ros::Time _tick_type; + _tick_type tick; + + typedef int64_t _length_type; + _length_type length; + + typedef int64_t _id_type; + _id_type id; + + typedef std::basic_string, typename ContainerAllocator::template rebind::other > _type_type; + _type_type type; + + + + + + typedef boost::shared_ptr< ::test_topic::Bytes_ > Ptr; + typedef boost::shared_ptr< ::test_topic::Bytes_ const> ConstPtr; + +}; // struct Bytes_ + +typedef ::test_topic::Bytes_ > Bytes; + +typedef boost::shared_ptr< ::test_topic::Bytes > BytesPtr; +typedef boost::shared_ptr< ::test_topic::Bytes const> BytesConstPtr; + +// constants requiring out of line definition + + + +template +std::ostream& operator<<(std::ostream& s, const ::test_topic::Bytes_ & v) +{ +ros::message_operations::Printer< ::test_topic::Bytes_ >::stream(s, "", v); +return s; +} + + +template +bool operator==(const ::test_topic::Bytes_ & lhs, const ::test_topic::Bytes_ & rhs) +{ + return lhs.data == rhs.data && + lhs.tick == rhs.tick && + lhs.length == rhs.length && + lhs.id == rhs.id && + lhs.type == rhs.type; +} + +template +bool operator!=(const ::test_topic::Bytes_ & lhs, const ::test_topic::Bytes_ & rhs) +{ + return !(lhs == rhs); +} + + +} // namespace test_topic + +namespace ros +{ +namespace message_traits +{ + + + + + +template +struct IsMessage< ::test_topic::Bytes_ > + : TrueType + { }; + +template +struct IsMessage< ::test_topic::Bytes_ const> + : TrueType + { }; + +template +struct IsFixedSize< ::test_topic::Bytes_ > + : FalseType + { }; + +template +struct IsFixedSize< ::test_topic::Bytes_ const> + : FalseType + { }; + +template +struct HasHeader< ::test_topic::Bytes_ > + : FalseType + { }; + +template +struct HasHeader< ::test_topic::Bytes_ const> + : FalseType + { }; + + +template +struct MD5Sum< ::test_topic::Bytes_ > +{ + static const char* value() + { + return "fd8110ce2e0bad5f5f8d1acd96e889d9"; + } + + static const char* value(const ::test_topic::Bytes_&) { return value(); } + static const uint64_t static_value1 = 0xfd8110ce2e0bad5fULL; + static const uint64_t static_value2 = 0x5f8d1acd96e889d9ULL; +}; + +template +struct DataType< ::test_topic::Bytes_ > +{ + static const char* value() + { + return "test_topic/Bytes"; + } + + static const char* value(const ::test_topic::Bytes_&) { return value(); } +}; + +template +struct Definition< ::test_topic::Bytes_ > +{ + static const char* value() + { + return "uint8[] data\n" +"time tick\n" +"int64 length\n" +"int64 id\n" +"string type\n" +; + } + + static const char* value(const ::test_topic::Bytes_&) { return value(); } +}; + +} // namespace message_traits +} // namespace ros + +namespace ros +{ +namespace serialization +{ + + template struct Serializer< ::test_topic::Bytes_ > + { + template inline static void allInOne(Stream& stream, T m) + { + stream.next(m.data); + stream.next(m.tick); + stream.next(m.length); + stream.next(m.id); + stream.next(m.type); + } + + ROS_DECLARE_ALLINONE_SERIALIZER + }; // struct Bytes_ + +} // namespace serialization +} // namespace ros + +namespace ros +{ +namespace message_operations +{ + +template +struct Printer< ::test_topic::Bytes_ > +{ + template static void stream(Stream& s, const std::string& indent, const ::test_topic::Bytes_& v) + { + s << indent << "data[]" << std::endl; + for (size_t i = 0; i < v.data.size(); ++i) + { + s << indent << " data[" << i << "]: "; + Printer::stream(s, indent + " ", v.data[i]); + } + s << indent << "tick: "; + Printer::stream(s, indent + " ", v.tick); + s << indent << "length: "; + Printer::stream(s, indent + " ", v.length); + s << indent << "id: "; + Printer::stream(s, indent + " ", v.id); + s << indent << "type: "; + Printer, typename ContainerAllocator::template rebind::other > >::stream(s, indent + " ", v.type); + } +}; + +} // namespace message_operations +} // namespace ros + +#endif // TEST_TOPIC_MESSAGE_BYTES_H