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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "hxRobot.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* hxRobot_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  hxRobot_reflection_ = NULL;
const ::google::protobuf::Descriptor* hxRobot_hxLimit_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  hxRobot_hxLimit_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_hxRobot_2eproto() {
  protobuf_AddDesc_hxRobot_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "hxRobot.proto");
  GOOGLE_CHECK(file != NULL);
  hxRobot_descriptor_ = file->message_type(0);
  static const int hxRobot_offsets_[7] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, motor_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, joint_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, contact_sensor_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, imu_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, joint_limit_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, motor_limit_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, update_rate_),
  };
  hxRobot_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      hxRobot_descriptor_,
      hxRobot::default_instance_,
      hxRobot_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(hxRobot));
  hxRobot_hxLimit_descriptor_ = hxRobot_descriptor_->nested_type(0);
  static const int hxRobot_hxLimit_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot_hxLimit, minimum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot_hxLimit, maximum_),
  };
  hxRobot_hxLimit_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      hxRobot_hxLimit_descriptor_,
      hxRobot_hxLimit::default_instance_,
      hxRobot_hxLimit_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot_hxLimit, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxRobot_hxLimit, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(hxRobot_hxLimit));
}

namespace {

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

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    hxRobot_descriptor_, &hxRobot::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    hxRobot_hxLimit_descriptor_, &hxRobot_hxLimit::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_hxRobot_2eproto() {
  delete hxRobot::default_instance_;
  delete hxRobot_reflection_;
  delete hxRobot_hxLimit::default_instance_;
  delete hxRobot_hxLimit_reflection_;
}

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

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\rhxRobot.proto\022\020haptix.comm.msgs\"\226\002\n\007hx"
    "Robot\022\023\n\013motor_count\030\001 \002(\005\022\023\n\013joint_coun"
    "t\030\002 \002(\005\022\034\n\024contact_sensor_count\030\003 \002(\005\022\021\n"
    "\timu_count\030\004 \002(\005\0226\n\013joint_limit\030\005 \003(\0132!."
    "haptix.comm.msgs.hxRobot.hxLimit\0226\n\013moto"
    "r_limit\030\006 \003(\0132!.haptix.comm.msgs.hxRobot"
    ".hxLimit\022\023\n\013update_rate\030\007 \002(\002\032+\n\007hxLimit"
    "\022\017\n\007minimum\030\001 \002(\002\022\017\n\007maximum\030\002 \002(\002", 314);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "hxRobot.proto", &protobuf_RegisterTypes);
  hxRobot::default_instance_ = new hxRobot();
  hxRobot_hxLimit::default_instance_ = new hxRobot_hxLimit();
  hxRobot::default_instance_->InitAsDefaultInstance();
  hxRobot_hxLimit::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_hxRobot_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_hxRobot_2eproto {
  StaticDescriptorInitializer_hxRobot_2eproto() {
    protobuf_AddDesc_hxRobot_2eproto();
  }
} static_descriptor_initializer_hxRobot_2eproto_;

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

#ifndef _MSC_VER
const int hxRobot_hxLimit::kMinimumFieldNumber;
const int hxRobot_hxLimit::kMaximumFieldNumber;
#endif  // !_MSC_VER

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

void hxRobot_hxLimit::InitAsDefaultInstance() {
}

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

void hxRobot_hxLimit::SharedCtor() {
  _cached_size_ = 0;
  minimum_ = 0;
  maximum_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

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

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

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

const hxRobot_hxLimit& hxRobot_hxLimit::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_hxRobot_2eproto();
  return *default_instance_;
}

hxRobot_hxLimit* hxRobot_hxLimit::default_instance_ = NULL;

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

void hxRobot_hxLimit::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<hxRobot_hxLimit*>(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_(minimum_, maximum_);

#undef OFFSET_OF_FIELD_
#undef ZR_

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

bool hxRobot_hxLimit::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.hxRobot.hxLimit)
  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 minimum = 1;
      case 1: {
        if (tag == 13) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &minimum_)));
          set_has_minimum();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_maximum;
        break;
      }

      // required float maximum = 2;
      case 2: {
        if (tag == 21) {
         parse_maximum:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &maximum_)));
          set_has_maximum();
        } 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.hxRobot.hxLimit)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:haptix.comm.msgs.hxRobot.hxLimit)
  return false;
#undef DO_
}

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

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

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

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

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

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

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

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

    // required float maximum = 2;
    if (has_maximum()) {
      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 hxRobot_hxLimit::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const hxRobot_hxLimit* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const hxRobot_hxLimit*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void hxRobot_hxLimit::MergeFrom(const hxRobot_hxLimit& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_minimum()) {
      set_minimum(from.minimum());
    }
    if (from.has_maximum()) {
      set_maximum(from.maximum());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

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

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

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

  return true;
}

void hxRobot_hxLimit::Swap(hxRobot_hxLimit* other) {
  if (other != this) {
    std::swap(minimum_, other->minimum_);
    std::swap(maximum_, other->maximum_);
    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 hxRobot_hxLimit::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = hxRobot_hxLimit_descriptor_;
  metadata.reflection = hxRobot_hxLimit_reflection_;
  return metadata;
}


// -------------------------------------------------------------------

#ifndef _MSC_VER
const int hxRobot::kMotorCountFieldNumber;
const int hxRobot::kJointCountFieldNumber;
const int hxRobot::kContactSensorCountFieldNumber;
const int hxRobot::kImuCountFieldNumber;
const int hxRobot::kJointLimitFieldNumber;
const int hxRobot::kMotorLimitFieldNumber;
const int hxRobot::kUpdateRateFieldNumber;
#endif  // !_MSC_VER

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

void hxRobot::InitAsDefaultInstance() {
}

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

void hxRobot::SharedCtor() {
  _cached_size_ = 0;
  motor_count_ = 0;
  joint_count_ = 0;
  contact_sensor_count_ = 0;
  imu_count_ = 0;
  update_rate_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

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

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

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

const hxRobot& hxRobot::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_hxRobot_2eproto();
  return *default_instance_;
}

hxRobot* hxRobot::default_instance_ = NULL;

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

void hxRobot::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<hxRobot*>(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)

  if (_has_bits_[0 / 32] & 79) {
    ZR_(motor_count_, imu_count_);
    update_rate_ = 0;
  }

#undef OFFSET_OF_FIELD_
#undef ZR_

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

bool hxRobot::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.hxRobot)
  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 int32 motor_count = 1;
      case 1: {
        if (tag == 8) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &motor_count_)));
          set_has_motor_count();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_joint_count;
        break;
      }

      // required int32 joint_count = 2;
      case 2: {
        if (tag == 16) {
         parse_joint_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &joint_count_)));
          set_has_joint_count();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_contact_sensor_count;
        break;
      }

      // required int32 contact_sensor_count = 3;
      case 3: {
        if (tag == 24) {
         parse_contact_sensor_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &contact_sensor_count_)));
          set_has_contact_sensor_count();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_imu_count;
        break;
      }

      // required int32 imu_count = 4;
      case 4: {
        if (tag == 32) {
         parse_imu_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &imu_count_)));
          set_has_imu_count();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_joint_limit;
        break;
      }

      // repeated .haptix.comm.msgs.hxRobot.hxLimit joint_limit = 5;
      case 5: {
        if (tag == 42) {
         parse_joint_limit:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_joint_limit()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_joint_limit;
        if (input->ExpectTag(50)) goto parse_motor_limit;
        break;
      }

      // repeated .haptix.comm.msgs.hxRobot.hxLimit motor_limit = 6;
      case 6: {
        if (tag == 50) {
         parse_motor_limit:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_motor_limit()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_motor_limit;
        if (input->ExpectTag(61)) goto parse_update_rate;
        break;
      }

      // required float update_rate = 7;
      case 7: {
        if (tag == 61) {
         parse_update_rate:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &update_rate_)));
          set_has_update_rate();
        } 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.hxRobot)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:haptix.comm.msgs.hxRobot)
  return false;
#undef DO_
}

void hxRobot::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:haptix.comm.msgs.hxRobot)
  // required int32 motor_count = 1;
  if (has_motor_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->motor_count(), output);
  }

  // required int32 joint_count = 2;
  if (has_joint_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->joint_count(), output);
  }

  // required int32 contact_sensor_count = 3;
  if (has_contact_sensor_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->contact_sensor_count(), output);
  }

  // required int32 imu_count = 4;
  if (has_imu_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->imu_count(), output);
  }

  // repeated .haptix.comm.msgs.hxRobot.hxLimit joint_limit = 5;
  for (int i = 0; i < this->joint_limit_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->joint_limit(i), output);
  }

  // repeated .haptix.comm.msgs.hxRobot.hxLimit motor_limit = 6;
  for (int i = 0; i < this->motor_limit_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->motor_limit(i), output);
  }

  // required float update_rate = 7;
  if (has_update_rate()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->update_rate(), output);
  }

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

::google::protobuf::uint8* hxRobot::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:haptix.comm.msgs.hxRobot)
  // required int32 motor_count = 1;
  if (has_motor_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->motor_count(), target);
  }

  // required int32 joint_count = 2;
  if (has_joint_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->joint_count(), target);
  }

  // required int32 contact_sensor_count = 3;
  if (has_contact_sensor_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->contact_sensor_count(), target);
  }

  // required int32 imu_count = 4;
  if (has_imu_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->imu_count(), target);
  }

  // repeated .haptix.comm.msgs.hxRobot.hxLimit joint_limit = 5;
  for (int i = 0; i < this->joint_limit_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        5, this->joint_limit(i), target);
  }

  // repeated .haptix.comm.msgs.hxRobot.hxLimit motor_limit = 6;
  for (int i = 0; i < this->motor_limit_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        6, this->motor_limit(i), target);
  }

  // required float update_rate = 7;
  if (has_update_rate()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->update_rate(), target);
  }

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

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

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int32 motor_count = 1;
    if (has_motor_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->motor_count());
    }

    // required int32 joint_count = 2;
    if (has_joint_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->joint_count());
    }

    // required int32 contact_sensor_count = 3;
    if (has_contact_sensor_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->contact_sensor_count());
    }

    // required int32 imu_count = 4;
    if (has_imu_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->imu_count());
    }

    // required float update_rate = 7;
    if (has_update_rate()) {
      total_size += 1 + 4;
    }

  }
  // repeated .haptix.comm.msgs.hxRobot.hxLimit joint_limit = 5;
  total_size += 1 * this->joint_limit_size();
  for (int i = 0; i < this->joint_limit_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->joint_limit(i));
  }

  // repeated .haptix.comm.msgs.hxRobot.hxLimit motor_limit = 6;
  total_size += 1 * this->motor_limit_size();
  for (int i = 0; i < this->motor_limit_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->motor_limit(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 hxRobot::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const hxRobot* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const hxRobot*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void hxRobot::MergeFrom(const hxRobot& from) {
  GOOGLE_CHECK_NE(&from, this);
  joint_limit_.MergeFrom(from.joint_limit_);
  motor_limit_.MergeFrom(from.motor_limit_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_motor_count()) {
      set_motor_count(from.motor_count());
    }
    if (from.has_joint_count()) {
      set_joint_count(from.joint_count());
    }
    if (from.has_contact_sensor_count()) {
      set_contact_sensor_count(from.contact_sensor_count());
    }
    if (from.has_imu_count()) {
      set_imu_count(from.imu_count());
    }
    if (from.has_update_rate()) {
      set_update_rate(from.update_rate());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

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

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

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

  if (!::google::protobuf::internal::AllAreInitialized(this->joint_limit())) return false;
  if (!::google::protobuf::internal::AllAreInitialized(this->motor_limit())) return false;
  return true;
}

void hxRobot::Swap(hxRobot* other) {
  if (other != this) {
    std::swap(motor_count_, other->motor_count_);
    std::swap(joint_count_, other->joint_count_);
    std::swap(contact_sensor_count_, other->contact_sensor_count_);
    std::swap(imu_count_, other->imu_count_);
    joint_limit_.Swap(&other->joint_limit_);
    motor_limit_.Swap(&other->motor_limit_);
    std::swap(update_rate_, other->update_rate_);
    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 hxRobot::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = hxRobot_descriptor_;
  metadata.reflection = hxRobot_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

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

// @@protoc_insertion_point(global_scope)
