Porting mros2 as an Mbed library.
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/char.hpp
- Revision:
- 0:580aba13d1a1
- Child:
- 2:159877d749c2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mros2_msgs/std_msgs/msg/char.hpp Thu Dec 30 21:06:29 2021 +0900 @@ -0,0 +1,45 @@ +#include <string> + +namespace std_msgs +{ +namespace msg +{ +class Char +{ +public: + std::string getTypeName(); + char data; + void copyToBuf(uint8_t *addrPtr) + { + memcpy(addrPtr, &data, 1); + addrPtr += 1; + } + + void copyFromBuf(const uint8_t *addrPtr) + { + memcpy(&data, addrPtr, 1); + addrPtr += 1; + } + + uint8_t getTotalSize() + { + return 1; + } +private: + std::string type_name = "std_msgs::msg::dds_::Char"; +}; +}//namspace msg +}//namespace std_msgs + +namespace message_traits +{ + +template<> +struct TypeName<std_msgs::msg::Char*> { + static const char* value() + { + return "std_msgs::msg::dds_::Char_"; + } +}; + +}