// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: hxSensor.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "hxSensor.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
#pragma GCC diagnostic ignored "-Wshadow"
// @@protoc_insertion_point(includes)

namespace haptix {
namespace comm {
namespace msgs {

namespace {

const ::google::protobuf::Descriptor* imu_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  imu_reflection_ = NULL;
const ::google::protobuf::Descriptor* quaternion_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  quaternion_reflection_ = NULL;
const ::google::protobuf::Descriptor* time_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  time_reflection_ = NULL;
const ::google::protobuf::Descriptor* hxSensor_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  hxSensor_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_hxSensor_2eproto() {
  protobuf_AddDesc_hxSensor_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "hxSensor.proto");
  GOOGLE_CHECK(file != NULL);
  imu_descriptor_ = file->message_type(0);
  static const int imu_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(imu, x_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(imu, y_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(imu, z_),
  };
  imu_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      imu_descriptor_,
      imu::default_instance_,
      imu_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(imu, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(imu, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(imu));
  quaternion_descriptor_ = file->message_type(1);
  static const int quaternion_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(quaternion, w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(quaternion, x_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(quaternion, y_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(quaternion, z_),
  };
  quaternion_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      quaternion_descriptor_,
      quaternion::default_instance_,
      quaternion_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(quaternion, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(quaternion, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(quaternion));
  time_descriptor_ = file->message_type(2);
  static const int time_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(time, sec_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(time, nsec_),
  };
  time_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      time_descriptor_,
      time::default_instance_,
      time_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(time, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(time, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(time));
  hxSensor_descriptor_ = file->message_type(3);
  static const int hxSensor_offsets_[10] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, motor_pos_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, motor_vel_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, motor_torque_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, joint_pos_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, joint_vel_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, contact_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, imu_linear_acc_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, imu_angular_vel_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, imu_orientation_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, time_stamp_),
  };
  hxSensor_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      hxSensor_descriptor_,
      hxSensor::default_instance_,
      hxSensor_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxSensor, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(hxSensor));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_hxSensor_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    imu_descriptor_, &imu::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    quaternion_descriptor_, &quaternion::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    time_descriptor_, &time::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    hxSensor_descriptor_, &hxSensor::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_hxSensor_2eproto() {
  delete imu::default_instance_;
  delete imu_reflection_;
  delete quaternion::default_instance_;
  delete quaternion_reflection_;
  delete time::default_instance_;
  delete time_reflection_;
  delete hxSensor::default_instance_;
  delete hxSensor_reflection_;
}

void protobuf_AddDesc_hxSensor_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\016hxSensor.proto\022\020haptix.comm.msgs\"&\n\003im"
    "u\022\t\n\001x\030\001 \002(\002\022\t\n\001y\030\002 \002(\002\022\t\n\001z\030\003 \002(\002\"8\n\nqu"
    "aternion\022\t\n\001w\030\001 \002(\002\022\t\n\001x\030\002 \002(\002\022\t\n\001y\030\003 \002("
    "\002\022\t\n\001z\030\004 \002(\002\"!\n\004time\022\013\n\003sec\030\001 \002(\004\022\014\n\004nse"
    "c\030\002 \002(\004\"\327\002\n\010hxSensor\022\025\n\tmotor_pos\030\001 \003(\002B"
    "\002\020\001\022\025\n\tmotor_vel\030\002 \003(\002B\002\020\001\022\030\n\014motor_torq"
    "ue\030\003 \003(\002B\002\020\001\022\025\n\tjoint_pos\030\004 \003(\002B\002\020\001\022\025\n\tj"
    "oint_vel\030\005 \003(\002B\002\020\001\022\023\n\007contact\030\006 \003(\002B\002\020\001\022"
    "-\n\016imu_linear_acc\030\007 \003(\0132\025.haptix.comm.ms"
    "gs.imu\022.\n\017imu_angular_vel\030\010 \003(\0132\025.haptix"
    ".comm.msgs.imu\0225\n\017imu_orientation\030\t \003(\0132"
    "\034.haptix.comm.msgs.quaternion\022*\n\ntime_st"
    "amp\030\n \002(\0132\026.haptix.comm.msgs.time", 513);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "hxSensor.proto", &protobuf_RegisterTypes);
  imu::default_instance_ = new imu();
  quaternion::default_instance_ = new quaternion();
  time::default_instance_ = new time();
  hxSensor::default_instance_ = new hxSensor();
  imu::default_instance_->InitAsDefaultInstance();
  quaternion::default_instance_->InitAsDefaultInstance();
  time::default_instance_->InitAsDefaultInstance();
  hxSensor::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_hxSensor_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_hxSensor_2eproto {
  StaticDescriptorInitializer_hxSensor_2eproto() {
    protobuf_AddDesc_hxSensor_2eproto();
  }
} static_descriptor_initializer_hxSensor_2eproto_;

// ===================================================================

#ifndef _MSC_VER
const int imu::kXFieldNumber;
const int imu::kYFieldNumber;
const int imu::kZFieldNumber;
#endif  // !_MSC_VER

imu::imu()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:haptix.comm.msgs.imu)
}

void imu::InitAsDefaultInstance() {
}

imu::imu(const imu& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:haptix.comm.msgs.imu)
}

void imu::SharedCtor() {
  _cached_size_ = 0;
  x_ = 0;
  y_ = 0;
  z_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

imu::~imu() {
  // @@protoc_insertion_point(destructor:haptix.comm.msgs.imu)
  SharedDtor();
}

void imu::SharedDtor() {
  if (this != default_instance_) {
  }
}

void imu::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* imu::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return imu_descriptor_;
}

const imu& imu::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_hxSensor_2eproto();
  return *default_instance_;
}

imu* imu::default_instance_ = NULL;

imu* imu::New() const {
  return new imu;
}

void imu::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<imu*>(16)->f) - \
   reinterpret_cast<char*>(16))

#define ZR_(first, last) do {                              \
    size_t f = OFFSET_OF_FIELD_(first);                    \
    size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
    ::memset(&first, 0, n);                                \
  } while (0)

  ZR_(x_, z_);

#undef OFFSET_OF_FIELD_
#undef ZR_

  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool imu::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:haptix.comm.msgs.imu)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required float x = 1;
      case 1: {
        if (tag == 13) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &x_)));
          set_has_x();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_y;
        break;
      }

      // required float y = 2;
      case 2: {
        if (tag == 21) {
         parse_y:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &y_)));
          set_has_y();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_z;
        break;
      }

      // required float z = 3;
      case 3: {
        if (tag == 29) {
         parse_z:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &z_)));
          set_has_z();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:haptix.comm.msgs.imu)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:haptix.comm.msgs.imu)
  return false;
#undef DO_
}

void imu::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:haptix.comm.msgs.imu)
  // required float x = 1;
  if (has_x()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->x(), output);
  }

  // required float y = 2;
  if (has_y()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->y(), output);
  }

  // required float z = 3;
  if (has_z()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->z(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:haptix.comm.msgs.imu)
}

::google::protobuf::uint8* imu::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:haptix.comm.msgs.imu)
  // required float x = 1;
  if (has_x()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->x(), target);
  }

  // required float y = 2;
  if (has_y()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->y(), target);
  }

  // required float z = 3;
  if (has_z()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->z(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:haptix.comm.msgs.imu)
  return target;
}

int imu::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required float x = 1;
    if (has_x()) {
      total_size += 1 + 4;
    }

    // required float y = 2;
    if (has_y()) {
      total_size += 1 + 4;
    }

    // required float z = 3;
    if (has_z()) {
      total_size += 1 + 4;
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void imu::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const imu* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const imu*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void imu::MergeFrom(const imu& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_x()) {
      set_x(from.x());
    }
    if (from.has_y()) {
      set_y(from.y());
    }
    if (from.has_z()) {
      set_z(from.z());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void imu::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void imu::CopyFrom(const imu& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool imu::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;

  return true;
}

void imu::Swap(imu* other) {
  if (other != this) {
    std::swap(x_, other->x_);
    std::swap(y_, other->y_);
    std::swap(z_, other->z_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata imu::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = imu_descriptor_;
  metadata.reflection = imu_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int quaternion::kWFieldNumber;
const int quaternion::kXFieldNumber;
const int quaternion::kYFieldNumber;
const int quaternion::kZFieldNumber;
#endif  // !_MSC_VER

quaternion::quaternion()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:haptix.comm.msgs.quaternion)
}

void quaternion::InitAsDefaultInstance() {
}

quaternion::quaternion(const quaternion& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:haptix.comm.msgs.quaternion)
}

void quaternion::SharedCtor() {
  _cached_size_ = 0;
  w_ = 0;
  x_ = 0;
  y_ = 0;
  z_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

quaternion::~quaternion() {
  // @@protoc_insertion_point(destructor:haptix.comm.msgs.quaternion)
  SharedDtor();
}

void quaternion::SharedDtor() {
  if (this != default_instance_) {
  }
}

void quaternion::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* quaternion::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return quaternion_descriptor_;
}

const quaternion& quaternion::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_hxSensor_2eproto();
  return *default_instance_;
}

quaternion* quaternion::default_instance_ = NULL;

quaternion* quaternion::New() const {
  return new quaternion;
}

void quaternion::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<quaternion*>(16)->f) - \
   reinterpret_cast<char*>(16))

#define ZR_(first, last) do {                              \
    size_t f = OFFSET_OF_FIELD_(first);                    \
    size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
    ::memset(&first, 0, n);                                \
  } while (0)

  ZR_(w_, z_);

#undef OFFSET_OF_FIELD_
#undef ZR_

  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool quaternion::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:haptix.comm.msgs.quaternion)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required float w = 1;
      case 1: {
        if (tag == 13) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &w_)));
          set_has_w();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_x;
        break;
      }

      // required float x = 2;
      case 2: {
        if (tag == 21) {
         parse_x:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &x_)));
          set_has_x();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_y;
        break;
      }

      // required float y = 3;
      case 3: {
        if (tag == 29) {
         parse_y:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &y_)));
          set_has_y();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(37)) goto parse_z;
        break;
      }

      // required float z = 4;
      case 4: {
        if (tag == 37) {
         parse_z:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &z_)));
          set_has_z();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:haptix.comm.msgs.quaternion)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:haptix.comm.msgs.quaternion)
  return false;
#undef DO_
}

void quaternion::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:haptix.comm.msgs.quaternion)
  // required float w = 1;
  if (has_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->w(), output);
  }

  // required float x = 2;
  if (has_x()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->x(), output);
  }

  // required float y = 3;
  if (has_y()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->y(), output);
  }

  // required float z = 4;
  if (has_z()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->z(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:haptix.comm.msgs.quaternion)
}

::google::protobuf::uint8* quaternion::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:haptix.comm.msgs.quaternion)
  // required float w = 1;
  if (has_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->w(), target);
  }

  // required float x = 2;
  if (has_x()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->x(), target);
  }

  // required float y = 3;
  if (has_y()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->y(), target);
  }

  // required float z = 4;
  if (has_z()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->z(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:haptix.comm.msgs.quaternion)
  return target;
}

int quaternion::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required float w = 1;
    if (has_w()) {
      total_size += 1 + 4;
    }

    // required float x = 2;
    if (has_x()) {
      total_size += 1 + 4;
    }

    // required float y = 3;
    if (has_y()) {
      total_size += 1 + 4;
    }

    // required float z = 4;
    if (has_z()) {
      total_size += 1 + 4;
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void quaternion::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const quaternion* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const quaternion*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void quaternion::MergeFrom(const quaternion& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_w()) {
      set_w(from.w());
    }
    if (from.has_x()) {
      set_x(from.x());
    }
    if (from.has_y()) {
      set_y(from.y());
    }
    if (from.has_z()) {
      set_z(from.z());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void quaternion::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void quaternion::CopyFrom(const quaternion& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool quaternion::IsInitialized() const {
  if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;

  return true;
}

void quaternion::Swap(quaternion* other) {
  if (other != this) {
    std::swap(w_, other->w_);
    std::swap(x_, other->x_);
    std::swap(y_, other->y_);
    std::swap(z_, other->z_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata quaternion::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = quaternion_descriptor_;
  metadata.reflection = quaternion_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int time::kSecFieldNumber;
const int time::kNsecFieldNumber;
#endif  // !_MSC_VER

time::time()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:haptix.comm.msgs.time)
}

void time::InitAsDefaultInstance() {
}

time::time(const time& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:haptix.comm.msgs.time)
}

void time::SharedCtor() {
  _cached_size_ = 0;
  sec_ = GOOGLE_ULONGLONG(0);
  nsec_ = GOOGLE_ULONGLONG(0);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

time::~time() {
  // @@protoc_insertion_point(destructor:haptix.comm.msgs.time)
  SharedDtor();
}

void time::SharedDtor() {
  if (this != default_instance_) {
  }
}

void time::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* time::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return time_descriptor_;
}

const time& time::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_hxSensor_2eproto();
  return *default_instance_;
}

time* time::default_instance_ = NULL;

time* time::New() const {
  return new time;
}

void time::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<time*>(16)->f) - \
   reinterpret_cast<char*>(16))

#define ZR_(first, last) do {                              \
    size_t f = OFFSET_OF_FIELD_(first);                    \
    size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
    ::memset(&first, 0, n);                                \
  } while (0)

  ZR_(sec_, nsec_);

#undef OFFSET_OF_FIELD_
#undef ZR_

  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool time::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:haptix.comm.msgs.time)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required uint64 sec = 1;
      case 1: {
        if (tag == 8) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &sec_)));
          set_has_sec();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_nsec;
        break;
      }

      // required uint64 nsec = 2;
      case 2: {
        if (tag == 16) {
         parse_nsec:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &nsec_)));
          set_has_nsec();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:haptix.comm.msgs.time)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:haptix.comm.msgs.time)
  return false;
#undef DO_
}

void time::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:haptix.comm.msgs.time)
  // required uint64 sec = 1;
  if (has_sec()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sec(), output);
  }

  // required uint64 nsec = 2;
  if (has_nsec()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->nsec(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:haptix.comm.msgs.time)
}

::google::protobuf::uint8* time::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:haptix.comm.msgs.time)
  // required uint64 sec = 1;
  if (has_sec()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sec(), target);
  }

  // required uint64 nsec = 2;
  if (has_nsec()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->nsec(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:haptix.comm.msgs.time)
  return target;
}

int time::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required uint64 sec = 1;
    if (has_sec()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->sec());
    }

    // required uint64 nsec = 2;
    if (has_nsec()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->nsec());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void time::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const time* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const time*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void time::MergeFrom(const time& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_sec()) {
      set_sec(from.sec());
    }
    if (from.has_nsec()) {
      set_nsec(from.nsec());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void time::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void time::CopyFrom(const time& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool time::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;

  return true;
}

void time::Swap(time* other) {
  if (other != this) {
    std::swap(sec_, other->sec_);
    std::swap(nsec_, other->nsec_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata time::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = time_descriptor_;
  metadata.reflection = time_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int hxSensor::kMotorPosFieldNumber;
const int hxSensor::kMotorVelFieldNumber;
const int hxSensor::kMotorTorqueFieldNumber;
const int hxSensor::kJointPosFieldNumber;
const int hxSensor::kJointVelFieldNumber;
const int hxSensor::kContactFieldNumber;
const int hxSensor::kImuLinearAccFieldNumber;
const int hxSensor::kImuAngularVelFieldNumber;
const int hxSensor::kImuOrientationFieldNumber;
const int hxSensor::kTimeStampFieldNumber;
#endif  // !_MSC_VER

hxSensor::hxSensor()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:haptix.comm.msgs.hxSensor)
}

void hxSensor::InitAsDefaultInstance() {
  time_stamp_ = const_cast< ::haptix::comm::msgs::time*>(&::haptix::comm::msgs::time::default_instance());
}

hxSensor::hxSensor(const hxSensor& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:haptix.comm.msgs.hxSensor)
}

void hxSensor::SharedCtor() {
  _cached_size_ = 0;
  time_stamp_ = NULL;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

hxSensor::~hxSensor() {
  // @@protoc_insertion_point(destructor:haptix.comm.msgs.hxSensor)
  SharedDtor();
}

void hxSensor::SharedDtor() {
  if (this != default_instance_) {
    delete time_stamp_;
  }
}

void hxSensor::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* hxSensor::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return hxSensor_descriptor_;
}

const hxSensor& hxSensor::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_hxSensor_2eproto();
  return *default_instance_;
}

hxSensor* hxSensor::default_instance_ = NULL;

hxSensor* hxSensor::New() const {
  return new hxSensor;
}

void hxSensor::Clear() {
  if (has_time_stamp()) {
    if (time_stamp_ != NULL) time_stamp_->::haptix::comm::msgs::time::Clear();
  }
  motor_pos_.Clear();
  motor_vel_.Clear();
  motor_torque_.Clear();
  joint_pos_.Clear();
  joint_vel_.Clear();
  contact_.Clear();
  imu_linear_acc_.Clear();
  imu_angular_vel_.Clear();
  imu_orientation_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool hxSensor::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:haptix.comm.msgs.hxSensor)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated float motor_pos = 1 [packed = true];
      case 1: {
        if (tag == 10) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_motor_pos())));
        } else if (tag == 13) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 10, input, this->mutable_motor_pos())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_motor_vel;
        break;
      }

      // repeated float motor_vel = 2 [packed = true];
      case 2: {
        if (tag == 18) {
         parse_motor_vel:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_motor_vel())));
        } else if (tag == 21) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 18, input, this->mutable_motor_vel())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_motor_torque;
        break;
      }

      // repeated float motor_torque = 3 [packed = true];
      case 3: {
        if (tag == 26) {
         parse_motor_torque:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_motor_torque())));
        } else if (tag == 29) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 26, input, this->mutable_motor_torque())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_joint_pos;
        break;
      }

      // repeated float joint_pos = 4 [packed = true];
      case 4: {
        if (tag == 34) {
         parse_joint_pos:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_joint_pos())));
        } else if (tag == 37) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 34, input, this->mutable_joint_pos())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_joint_vel;
        break;
      }

      // repeated float joint_vel = 5 [packed = true];
      case 5: {
        if (tag == 42) {
         parse_joint_vel:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_joint_vel())));
        } else if (tag == 45) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 42, input, this->mutable_joint_vel())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_contact;
        break;
      }

      // repeated float contact = 6 [packed = true];
      case 6: {
        if (tag == 50) {
         parse_contact:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_contact())));
        } else if (tag == 53) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 50, input, this->mutable_contact())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(58)) goto parse_imu_linear_acc;
        break;
      }

      // repeated .haptix.comm.msgs.imu imu_linear_acc = 7;
      case 7: {
        if (tag == 58) {
         parse_imu_linear_acc:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_imu_linear_acc()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(58)) goto parse_imu_linear_acc;
        if (input->ExpectTag(66)) goto parse_imu_angular_vel;
        break;
      }

      // repeated .haptix.comm.msgs.imu imu_angular_vel = 8;
      case 8: {
        if (tag == 66) {
         parse_imu_angular_vel:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_imu_angular_vel()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(66)) goto parse_imu_angular_vel;
        if (input->ExpectTag(74)) goto parse_imu_orientation;
        break;
      }

      // repeated .haptix.comm.msgs.quaternion imu_orientation = 9;
      case 9: {
        if (tag == 74) {
         parse_imu_orientation:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_imu_orientation()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(74)) goto parse_imu_orientation;
        if (input->ExpectTag(82)) goto parse_time_stamp;
        break;
      }

      // required .haptix.comm.msgs.time time_stamp = 10;
      case 10: {
        if (tag == 82) {
         parse_time_stamp:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_time_stamp()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:haptix.comm.msgs.hxSensor)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:haptix.comm.msgs.hxSensor)
  return false;
#undef DO_
}

void hxSensor::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:haptix.comm.msgs.hxSensor)
  // repeated float motor_pos = 1 [packed = true];
  if (this->motor_pos_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_motor_pos_cached_byte_size_);
  }
  for (int i = 0; i < this->motor_pos_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->motor_pos(i), output);
  }

  // repeated float motor_vel = 2 [packed = true];
  if (this->motor_vel_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_motor_vel_cached_byte_size_);
  }
  for (int i = 0; i < this->motor_vel_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->motor_vel(i), output);
  }

  // repeated float motor_torque = 3 [packed = true];
  if (this->motor_torque_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_motor_torque_cached_byte_size_);
  }
  for (int i = 0; i < this->motor_torque_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->motor_torque(i), output);
  }

  // repeated float joint_pos = 4 [packed = true];
  if (this->joint_pos_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_joint_pos_cached_byte_size_);
  }
  for (int i = 0; i < this->joint_pos_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->joint_pos(i), output);
  }

  // repeated float joint_vel = 5 [packed = true];
  if (this->joint_vel_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_joint_vel_cached_byte_size_);
  }
  for (int i = 0; i < this->joint_vel_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->joint_vel(i), output);
  }

  // repeated float contact = 6 [packed = true];
  if (this->contact_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_contact_cached_byte_size_);
  }
  for (int i = 0; i < this->contact_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->contact(i), output);
  }

  // repeated .haptix.comm.msgs.imu imu_linear_acc = 7;
  for (int i = 0; i < this->imu_linear_acc_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, this->imu_linear_acc(i), output);
  }

  // repeated .haptix.comm.msgs.imu imu_angular_vel = 8;
  for (int i = 0; i < this->imu_angular_vel_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, this->imu_angular_vel(i), output);
  }

  // repeated .haptix.comm.msgs.quaternion imu_orientation = 9;
  for (int i = 0; i < this->imu_orientation_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9, this->imu_orientation(i), output);
  }

  // required .haptix.comm.msgs.time time_stamp = 10;
  if (has_time_stamp()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10, this->time_stamp(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:haptix.comm.msgs.hxSensor)
}

::google::protobuf::uint8* hxSensor::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:haptix.comm.msgs.hxSensor)
  // repeated float motor_pos = 1 [packed = true];
  if (this->motor_pos_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      1,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _motor_pos_cached_byte_size_, target);
  }
  for (int i = 0; i < this->motor_pos_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->motor_pos(i), target);
  }

  // repeated float motor_vel = 2 [packed = true];
  if (this->motor_vel_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      2,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _motor_vel_cached_byte_size_, target);
  }
  for (int i = 0; i < this->motor_vel_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->motor_vel(i), target);
  }

  // repeated float motor_torque = 3 [packed = true];
  if (this->motor_torque_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      3,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _motor_torque_cached_byte_size_, target);
  }
  for (int i = 0; i < this->motor_torque_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->motor_torque(i), target);
  }

  // repeated float joint_pos = 4 [packed = true];
  if (this->joint_pos_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      4,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _joint_pos_cached_byte_size_, target);
  }
  for (int i = 0; i < this->joint_pos_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->joint_pos(i), target);
  }

  // repeated float joint_vel = 5 [packed = true];
  if (this->joint_vel_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      5,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _joint_vel_cached_byte_size_, target);
  }
  for (int i = 0; i < this->joint_vel_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->joint_vel(i), target);
  }

  // repeated float contact = 6 [packed = true];
  if (this->contact_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      6,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _contact_cached_byte_size_, target);
  }
  for (int i = 0; i < this->contact_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->contact(i), target);
  }

  // repeated .haptix.comm.msgs.imu imu_linear_acc = 7;
  for (int i = 0; i < this->imu_linear_acc_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        7, this->imu_linear_acc(i), target);
  }

  // repeated .haptix.comm.msgs.imu imu_angular_vel = 8;
  for (int i = 0; i < this->imu_angular_vel_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        8, this->imu_angular_vel(i), target);
  }

  // repeated .haptix.comm.msgs.quaternion imu_orientation = 9;
  for (int i = 0; i < this->imu_orientation_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        9, this->imu_orientation(i), target);
  }

  // required .haptix.comm.msgs.time time_stamp = 10;
  if (has_time_stamp()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        10, this->time_stamp(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:haptix.comm.msgs.hxSensor)
  return target;
}

int hxSensor::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[9 / 32] & (0xffu << (9 % 32))) {
    // required .haptix.comm.msgs.time time_stamp = 10;
    if (has_time_stamp()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->time_stamp());
    }

  }
  // repeated float motor_pos = 1 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->motor_pos_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _motor_pos_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated float motor_vel = 2 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->motor_vel_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _motor_vel_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated float motor_torque = 3 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->motor_torque_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _motor_torque_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated float joint_pos = 4 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->joint_pos_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _joint_pos_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated float joint_vel = 5 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->joint_vel_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _joint_vel_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated float contact = 6 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->contact_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _contact_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated .haptix.comm.msgs.imu imu_linear_acc = 7;
  total_size += 1 * this->imu_linear_acc_size();
  for (int i = 0; i < this->imu_linear_acc_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->imu_linear_acc(i));
  }

  // repeated .haptix.comm.msgs.imu imu_angular_vel = 8;
  total_size += 1 * this->imu_angular_vel_size();
  for (int i = 0; i < this->imu_angular_vel_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->imu_angular_vel(i));
  }

  // repeated .haptix.comm.msgs.quaternion imu_orientation = 9;
  total_size += 1 * this->imu_orientation_size();
  for (int i = 0; i < this->imu_orientation_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->imu_orientation(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void hxSensor::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const hxSensor* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const hxSensor*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void hxSensor::MergeFrom(const hxSensor& from) {
  GOOGLE_CHECK_NE(&from, this);
  motor_pos_.MergeFrom(from.motor_pos_);
  motor_vel_.MergeFrom(from.motor_vel_);
  motor_torque_.MergeFrom(from.motor_torque_);
  joint_pos_.MergeFrom(from.joint_pos_);
  joint_vel_.MergeFrom(from.joint_vel_);
  contact_.MergeFrom(from.contact_);
  imu_linear_acc_.MergeFrom(from.imu_linear_acc_);
  imu_angular_vel_.MergeFrom(from.imu_angular_vel_);
  imu_orientation_.MergeFrom(from.imu_orientation_);
  if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
    if (from.has_time_stamp()) {
      mutable_time_stamp()->::haptix::comm::msgs::time::MergeFrom(from.time_stamp());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void hxSensor::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void hxSensor::CopyFrom(const hxSensor& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool hxSensor::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000200) != 0x00000200) return false;

  if (!::google::protobuf::internal::AllAreInitialized(this->imu_linear_acc())) return false;
  if (!::google::protobuf::internal::AllAreInitialized(this->imu_angular_vel())) return false;
  if (!::google::protobuf::internal::AllAreInitialized(this->imu_orientation())) return false;
  if (has_time_stamp()) {
    if (!this->time_stamp().IsInitialized()) return false;
  }
  return true;
}

void hxSensor::Swap(hxSensor* other) {
  if (other != this) {
    motor_pos_.Swap(&other->motor_pos_);
    motor_vel_.Swap(&other->motor_vel_);
    motor_torque_.Swap(&other->motor_torque_);
    joint_pos_.Swap(&other->joint_pos_);
    joint_vel_.Swap(&other->joint_vel_);
    contact_.Swap(&other->contact_);
    imu_linear_acc_.Swap(&other->imu_linear_acc_);
    imu_angular_vel_.Swap(&other->imu_angular_vel_);
    imu_orientation_.Swap(&other->imu_orientation_);
    std::swap(time_stamp_, other->time_stamp_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata hxSensor::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = hxSensor_descriptor_;
  metadata.reflection = hxSensor_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace msgs
}  // namespace comm
}  // namespace haptix

// @@protoc_insertion_point(global_scope)
