integers.cpp
Go to the documentation of this file.
00001 
00004 /*****************************************************************************
00005 ** Includes
00006 *****************************************************************************/
00007 
00008 #include <mm_messages/registry.hpp>
00009 #include "../../include/mm_core_msgs/integers.hpp"
00010 
00011 /*****************************************************************************
00012 ** Namespaces
00013 *****************************************************************************/
00014 
00015 namespace mm_messages {
00016 
00017 /*****************************************************************************
00018 ** Implementation
00019 *****************************************************************************/
00020 
00021 void Message<mm_core_msgs::uint8>::encode(const mm_core_msgs::uint8& s, ByteArray& buffer) {
00022   // publishers always send empty buffers, but in case others use this
00023   if(!buffer.empty()) {
00024     buffer.clear();
00025   }
00026   buffer.push_back(s);
00027 }
00028 
00029 mm_core_msgs::uint8 Message<mm_core_msgs::uint8>::decode(const unsigned char* buffer, const unsigned int& size) {
00030   return *buffer;
00031 }
00032 } // namespace mm_messages
00033 


mm_core_msgs
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 21:13:21