integers.cpp
Go to the documentation of this file.
1 
4 /*****************************************************************************
5 ** Includes
6 *****************************************************************************/
7 
9 #include "../../include/mm_core_msgs/integers.hpp"
10 
11 /*****************************************************************************
12 ** Namespaces
13 *****************************************************************************/
14 
15 namespace mm_messages {
16 
17 /*****************************************************************************
18 ** Implementation
19 *****************************************************************************/
20 
22  // publishers always send empty buffers, but in case others use this
23  if(!buffer.empty()) {
24  buffer.clear();
25  }
26  buffer.push_back(s);
27 }
28 
29 mm_core_msgs::uint8 Message<mm_core_msgs::uint8>::decode(const unsigned char* buffer, const unsigned int& size) {
30  return *buffer;
31 }
32 } // namespace mm_messages
33 
unsigned char uint8
Definition: integers.hpp:25
static void encode(const T &msg, ByteArray &buffer)
std::vector< unsigned char > ByteArray
static T decode(const unsigned char *buffer, const unsigned int &size)


mm_core_msgs
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:52:12