image_pair.hpp
Go to the documentation of this file.
00001 
00006 /*****************************************************************************
00007 ** Ifdefs
00008 *****************************************************************************/
00009 
00010 #ifndef mm_vision_msgs_IMAGE_PAIR_HPP_
00011 #define mm_vision_msgs_IMAGE_PAIR_HPP_
00012 
00013 /*****************************************************************************
00014 ** Includes
00015 *****************************************************************************/
00016 
00017 #include <ecl/time/timestamp.hpp>
00018 #include <mm_messages/message.hpp>
00019 #include <memory>
00020 #include <vector>
00021 
00022 /*****************************************************************************
00023 ** Namespaces
00024 *****************************************************************************/
00025 
00026 namespace mm_vision_msgs {
00027 
00028 /*****************************************************************************
00029 ** Image Definitions
00030 *****************************************************************************/
00037 struct ImagePair {
00038   ImagePair() {};
00045   ImagePair(const unsigned char* left_buffer,
00046             const unsigned char *right_buffer,
00047             const unsigned int& size);
00048   std::vector<unsigned char> left, right;
00049   bool colour;
00050   unsigned int width, height, size; // calculate from incoming buffer sizes
00051   ecl::TimeStamp timestamp;
00052 };
00053 
00054 typedef std::shared_ptr<ImagePair> ImagePairPtr;
00055 
00056 } // namespace mm_vision_msgs
00057 
00058 /*****************************************************************************
00059 ** Namespaces
00060 *****************************************************************************/
00061 
00062 namespace mm_messages {
00063 
00064 /*****************************************************************************
00065 ** Serialisation
00066 *****************************************************************************/
00067 
00068 template<>
00069 struct Message<mm_vision_msgs::ImagePairPtr> {
00070   static void encode(const mm_vision_msgs::ImagePairPtr& pair, ByteArray& buffer);
00071   static mm_vision_msgs::ImagePairPtr decode(const unsigned char* buffer, const unsigned int& size);
00072 };
00073 
00074 } // namespace mm_messages
00075 
00076 #endif /* mm_vision_msgs_IMAGE_PAIR_HPP_ */


mm_vision_msgs
Author(s): Daniel Stonier
autogenerated on Sun Jun 7 2015 12:58:20