#include <image_pair.hpp>
Static Public Member Functions | |
static mm_vision_msgs::ImagePairPtr | decode (const unsigned char *buffer, const unsigned int &size) |
static void | encode (const mm_vision_msgs::ImagePairPtr &pair, ByteArray &buffer) |
Definition at line 69 of file image_pair.hpp.
mm_vision_msgs::ImagePairPtr mm_messages::Message< mm_vision_msgs::ImagePairPtr >::decode | ( | const unsigned char * | buffer, |
const unsigned int & | size | ||
) | [static] |
This deserialises everything into image pair, filling in all fields except the semantic id (which would be applied externally)
buffer | : the buffer directly from socket land. |
size | : size of the allocated buffer |
Definition at line 82 of file image_pair.cpp.
void mm_messages::Message< mm_vision_msgs::ImagePairPtr >::encode | ( | const mm_vision_msgs::ImagePairPtr & | pair, |
ByteArray & | buffer | ||
) | [static] |
Serialise it onto a buffer.
We're doing more copies than we need to here. Be good to be able to pass the image's buffer directly to the underlying send command. However that probably isn't possible as it requires a prefixed header and contiguous memory across header and data.
image | |
buffer |
Definition at line 68 of file image_pair.cpp.