/* Auto-generated by genmsg_cpp for file /work/a/ports/devel/ros/work/ros/test/performance/perf_roscpp/msg/LatencyMessage.msg */
#ifndef PERF_ROSCPP_MESSAGE_LATENCYMESSAGE_H
#define PERF_ROSCPP_MESSAGE_LATENCYMESSAGE_H
#include <string>
#include <vector>
#include <ostream>
#include "ros/serialization.h"
#include "ros/builtin_message_traits.h"
#include "ros/message_operations.h"
#include "ros/message.h"
#include "ros/time.h"


namespace perf_roscpp
{
template <class ContainerAllocator>
struct LatencyMessage_ : public ros::Message
{
  typedef LatencyMessage_<ContainerAllocator> Type;

  LatencyMessage_()
  : publish_time(0.0)
  , receipt_time(0.0)
  , count(0)
  , thread_index(0)
  , array()
  {
  }

  LatencyMessage_(const ContainerAllocator& _alloc)
  : publish_time(0.0)
  , receipt_time(0.0)
  , count(0)
  , thread_index(0)
  , array(_alloc)
  {
  }

  typedef double _publish_time_type;
  double publish_time;

  typedef double _receipt_time_type;
  double receipt_time;

  typedef uint64_t _count_type;
  uint64_t count;

  typedef uint32_t _thread_index_type;
  uint32_t thread_index;

  typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other >  _array_type;
  std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other >  array;


  ROSCPP_DEPRECATED uint32_t get_array_size() const { return (uint32_t)array.size(); }
  ROSCPP_DEPRECATED void set_array_size(uint32_t size) { array.resize((size_t)size); }
  ROSCPP_DEPRECATED void get_array_vec(std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->array; }
  ROSCPP_DEPRECATED void set_array_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->array = vec; }
private:
  static const char* __s_getDataType_() { return "perf_roscpp/LatencyMessage"; }
public:
  ROSCPP_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }

  ROSCPP_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }

private:
  static const char* __s_getMD5Sum_() { return "be90d117303321f392404ed7edeb7c8c"; }
public:
  ROSCPP_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }

  ROSCPP_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }

private:
  static const char* __s_getMessageDefinition_() { return "float64 publish_time\n\
float64 receipt_time\n\
uint64 count\n\
uint32 thread_index\n\
uint8[] array\n\
\n\
\n\
"; }
public:
  ROSCPP_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }

  ROSCPP_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }

  ROSCPP_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
  {
    ros::serialization::OStream stream(write_ptr, 1000000000);
    ros::serialization::serialize(stream, publish_time);
    ros::serialization::serialize(stream, receipt_time);
    ros::serialization::serialize(stream, count);
    ros::serialization::serialize(stream, thread_index);
    ros::serialization::serialize(stream, array);
    return stream.getData();
  }

  ROSCPP_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
  {
    ros::serialization::IStream stream(read_ptr, 1000000000);
    ros::serialization::deserialize(stream, publish_time);
    ros::serialization::deserialize(stream, receipt_time);
    ros::serialization::deserialize(stream, count);
    ros::serialization::deserialize(stream, thread_index);
    ros::serialization::deserialize(stream, array);
    return stream.getData();
  }

  ROSCPP_DEPRECATED virtual uint32_t serializationLength() const
  {
    uint32_t size = 0;
    size += ros::serialization::serializationLength(publish_time);
    size += ros::serialization::serializationLength(receipt_time);
    size += ros::serialization::serializationLength(count);
    size += ros::serialization::serializationLength(thread_index);
    size += ros::serialization::serializationLength(array);
    return size;
  }

  typedef boost::shared_ptr< ::perf_roscpp::LatencyMessage_<ContainerAllocator> > Ptr;
  typedef boost::shared_ptr< ::perf_roscpp::LatencyMessage_<ContainerAllocator>  const> ConstPtr;
}; // struct LatencyMessage
typedef  ::perf_roscpp::LatencyMessage_<std::allocator<void> > LatencyMessage;

typedef boost::shared_ptr< ::perf_roscpp::LatencyMessage> LatencyMessagePtr;
typedef boost::shared_ptr< ::perf_roscpp::LatencyMessage const> LatencyMessageConstPtr;


template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const  ::perf_roscpp::LatencyMessage_<ContainerAllocator> & v)
{
  ros::message_operations::Printer< ::perf_roscpp::LatencyMessage_<ContainerAllocator> >::stream(s, "", v);
  return s;}

} // namespace perf_roscpp

namespace ros
{
namespace message_traits
{
template<class ContainerAllocator>
struct MD5Sum< ::perf_roscpp::LatencyMessage_<ContainerAllocator> > {
  static const char* value() 
  {
    return "be90d117303321f392404ed7edeb7c8c";
  }

  static const char* value(const  ::perf_roscpp::LatencyMessage_<ContainerAllocator> &) { return value(); } 
  static const uint64_t static_value1 = 0xbe90d117303321f3ULL;
  static const uint64_t static_value2 = 0x92404ed7edeb7c8cULL;
};

template<class ContainerAllocator>
struct DataType< ::perf_roscpp::LatencyMessage_<ContainerAllocator> > {
  static const char* value() 
  {
    return "perf_roscpp/LatencyMessage";
  }

  static const char* value(const  ::perf_roscpp::LatencyMessage_<ContainerAllocator> &) { return value(); } 
};

template<class ContainerAllocator>
struct Definition< ::perf_roscpp::LatencyMessage_<ContainerAllocator> > {
  static const char* value() 
  {
    return "float64 publish_time\n\
float64 receipt_time\n\
uint64 count\n\
uint32 thread_index\n\
uint8[] array\n\
\n\
\n\
";
  }

  static const char* value(const  ::perf_roscpp::LatencyMessage_<ContainerAllocator> &) { return value(); } 
};

} // namespace message_traits
} // namespace ros

namespace ros
{
namespace serialization
{

template<class ContainerAllocator> struct Serializer< ::perf_roscpp::LatencyMessage_<ContainerAllocator> >
{
  template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
  {
    stream.next(m.publish_time);
    stream.next(m.receipt_time);
    stream.next(m.count);
    stream.next(m.thread_index);
    stream.next(m.array);
  }

  ROS_DECLARE_ALLINONE_SERIALIZER;
}; // struct LatencyMessage_
} // namespace serialization
} // namespace ros

namespace ros
{
namespace message_operations
{

template<class ContainerAllocator>
struct Printer< ::perf_roscpp::LatencyMessage_<ContainerAllocator> >
{
  template<typename Stream> static void stream(Stream& s, const std::string& indent, const  ::perf_roscpp::LatencyMessage_<ContainerAllocator> & v) 
  {
    s << indent << "publish_time: ";
    Printer<double>::stream(s, indent + "  ", v.publish_time);
    s << indent << "receipt_time: ";
    Printer<double>::stream(s, indent + "  ", v.receipt_time);
    s << indent << "count: ";
    Printer<uint64_t>::stream(s, indent + "  ", v.count);
    s << indent << "thread_index: ";
    Printer<uint32_t>::stream(s, indent + "  ", v.thread_index);
    s << indent << "array[]" << std::endl;
    for (size_t i = 0; i < v.array.size(); ++i)
    {
      s << indent << "  array[" << i << "]: ";
      Printer<uint8_t>::stream(s, indent + "  ", v.array[i]);
    }
  }
};


} // namespace message_operations
} // namespace ros

#endif // PERF_ROSCPP_MESSAGE_LATENCYMESSAGE_H

