Dependents: mbed-os-example-mros2 example-mbed-mros2-sub-pose example-mbed-mros2-pub-twist example-mbed-mros2-mturtle-teleop
Diff: mros2_msgs/std_msgs/msg/float32.hpp
- Revision:
- 0:580aba13d1a1
- Child:
- 2:159877d749c2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mros2_msgs/std_msgs/msg/float32.hpp Thu Dec 30 21:06:29 2021 +0900 @@ -0,0 +1,44 @@ +#include <string> + +namespace std_msgs +{ +namespace msg +{ +class Float32 +{ +public: + std::string getTypeName(); + float data; + void copyToBuf(uint8_t *addrPtr) + { + memcpy(addrPtr, &data, 4); + addrPtr += 4; + } + + void copyFromBuf(const uint8_t *addrPtr) + { + memcpy(&data, addrPtr, 4); + addrPtr += 4; + } + uint8_t getTotalSize() + { + return 4; + } +private: + std::string type_name = "std_msgs::msg::dds_::Float32"; +}; +}//namspace msg +}//namespace std_msgs + +namespace message_traits +{ + +template<> +struct TypeName<std_msgs::msg::Float32*> { + static const char* value() + { + return "std_msgs::msg::dds_::Float32_"; + } +}; + +} \ No newline at end of file