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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "hxCommand.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* hxCommand_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  hxCommand_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_hxCommand_2eproto() {
  protobuf_AddDesc_hxCommand_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "hxCommand.proto");
  GOOGLE_CHECK(file != NULL);
  hxCommand_descriptor_ = file->message_type(0);
  static const int hxCommand_offsets_[8] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, ref_pos_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, ref_vel_max_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, gain_pos_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, gain_vel_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, ref_pos_enabled_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, ref_vel_max_enabled_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, gain_pos_enabled_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, gain_vel_enabled_),
  };
  hxCommand_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      hxCommand_descriptor_,
      hxCommand::default_instance_,
      hxCommand_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(hxCommand, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(hxCommand));
}

namespace {

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

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    hxCommand_descriptor_, &hxCommand::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_hxCommand_2eproto() {
  delete hxCommand::default_instance_;
  delete hxCommand_reflection_;
}

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

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\017hxCommand.proto\022\020haptix.comm.msgs\"\317\001\n\t"
    "hxCommand\022\023\n\007ref_pos\030\001 \003(\002B\002\020\001\022\027\n\013ref_ve"
    "l_max\030\002 \003(\002B\002\020\001\022\024\n\010gain_pos\030\003 \003(\002B\002\020\001\022\024\n"
    "\010gain_vel\030\004 \003(\002B\002\020\001\022\027\n\017ref_pos_enabled\030\005"
    " \002(\010\022\033\n\023ref_vel_max_enabled\030\006 \002(\010\022\030\n\020gai"
    "n_pos_enabled\030\007 \002(\010\022\030\n\020gain_vel_enabled\030"
    "\010 \002(\010", 245);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "hxCommand.proto", &protobuf_RegisterTypes);
  hxCommand::default_instance_ = new hxCommand();
  hxCommand::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_hxCommand_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_hxCommand_2eproto {
  StaticDescriptorInitializer_hxCommand_2eproto() {
    protobuf_AddDesc_hxCommand_2eproto();
  }
} static_descriptor_initializer_hxCommand_2eproto_;

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

#ifndef _MSC_VER
const int hxCommand::kRefPosFieldNumber;
const int hxCommand::kRefVelMaxFieldNumber;
const int hxCommand::kGainPosFieldNumber;
const int hxCommand::kGainVelFieldNumber;
const int hxCommand::kRefPosEnabledFieldNumber;
const int hxCommand::kRefVelMaxEnabledFieldNumber;
const int hxCommand::kGainPosEnabledFieldNumber;
const int hxCommand::kGainVelEnabledFieldNumber;
#endif  // !_MSC_VER

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

void hxCommand::InitAsDefaultInstance() {
}

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

void hxCommand::SharedCtor() {
  _cached_size_ = 0;
  ref_pos_enabled_ = false;
  ref_vel_max_enabled_ = false;
  gain_pos_enabled_ = false;
  gain_vel_enabled_ = false;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

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

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

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

const hxCommand& hxCommand::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_hxCommand_2eproto();
  return *default_instance_;
}

hxCommand* hxCommand::default_instance_ = NULL;

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

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

#undef OFFSET_OF_FIELD_
#undef ZR_

  ref_pos_.Clear();
  ref_vel_max_.Clear();
  gain_pos_.Clear();
  gain_vel_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool hxCommand::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.hxCommand)
  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 ref_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_ref_pos())));
        } else if (tag == 13) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 10, input, this->mutable_ref_pos())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_ref_vel_max;
        break;
      }

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

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

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

      // required bool ref_pos_enabled = 5;
      case 5: {
        if (tag == 40) {
         parse_ref_pos_enabled:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &ref_pos_enabled_)));
          set_has_ref_pos_enabled();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_ref_vel_max_enabled;
        break;
      }

      // required bool ref_vel_max_enabled = 6;
      case 6: {
        if (tag == 48) {
         parse_ref_vel_max_enabled:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &ref_vel_max_enabled_)));
          set_has_ref_vel_max_enabled();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_gain_pos_enabled;
        break;
      }

      // required bool gain_pos_enabled = 7;
      case 7: {
        if (tag == 56) {
         parse_gain_pos_enabled:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &gain_pos_enabled_)));
          set_has_gain_pos_enabled();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_gain_vel_enabled;
        break;
      }

      // required bool gain_vel_enabled = 8;
      case 8: {
        if (tag == 64) {
         parse_gain_vel_enabled:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &gain_vel_enabled_)));
          set_has_gain_vel_enabled();
        } 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.hxCommand)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:haptix.comm.msgs.hxCommand)
  return false;
#undef DO_
}

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

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

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

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

  // required bool ref_pos_enabled = 5;
  if (has_ref_pos_enabled()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->ref_pos_enabled(), output);
  }

  // required bool ref_vel_max_enabled = 6;
  if (has_ref_vel_max_enabled()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->ref_vel_max_enabled(), output);
  }

  // required bool gain_pos_enabled = 7;
  if (has_gain_pos_enabled()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->gain_pos_enabled(), output);
  }

  // required bool gain_vel_enabled = 8;
  if (has_gain_vel_enabled()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->gain_vel_enabled(), output);
  }

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

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

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

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

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

  // required bool ref_pos_enabled = 5;
  if (has_ref_pos_enabled()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->ref_pos_enabled(), target);
  }

  // required bool ref_vel_max_enabled = 6;
  if (has_ref_vel_max_enabled()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->ref_vel_max_enabled(), target);
  }

  // required bool gain_pos_enabled = 7;
  if (has_gain_pos_enabled()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->gain_pos_enabled(), target);
  }

  // required bool gain_vel_enabled = 8;
  if (has_gain_vel_enabled()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->gain_vel_enabled(), target);
  }

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

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

  if (_has_bits_[4 / 32] & (0xffu << (4 % 32))) {
    // required bool ref_pos_enabled = 5;
    if (has_ref_pos_enabled()) {
      total_size += 1 + 1;
    }

    // required bool ref_vel_max_enabled = 6;
    if (has_ref_vel_max_enabled()) {
      total_size += 1 + 1;
    }

    // required bool gain_pos_enabled = 7;
    if (has_gain_pos_enabled()) {
      total_size += 1 + 1;
    }

    // required bool gain_vel_enabled = 8;
    if (has_gain_vel_enabled()) {
      total_size += 1 + 1;
    }

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

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

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

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

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

void hxCommand::MergeFrom(const hxCommand& from) {
  GOOGLE_CHECK_NE(&from, this);
  ref_pos_.MergeFrom(from.ref_pos_);
  ref_vel_max_.MergeFrom(from.ref_vel_max_);
  gain_pos_.MergeFrom(from.gain_pos_);
  gain_vel_.MergeFrom(from.gain_vel_);
  if (from._has_bits_[4 / 32] & (0xffu << (4 % 32))) {
    if (from.has_ref_pos_enabled()) {
      set_ref_pos_enabled(from.ref_pos_enabled());
    }
    if (from.has_ref_vel_max_enabled()) {
      set_ref_vel_max_enabled(from.ref_vel_max_enabled());
    }
    if (from.has_gain_pos_enabled()) {
      set_gain_pos_enabled(from.gain_pos_enabled());
    }
    if (from.has_gain_vel_enabled()) {
      set_gain_vel_enabled(from.gain_vel_enabled());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

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

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

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

  return true;
}

void hxCommand::Swap(hxCommand* other) {
  if (other != this) {
    ref_pos_.Swap(&other->ref_pos_);
    ref_vel_max_.Swap(&other->ref_vel_max_);
    gain_pos_.Swap(&other->gain_pos_);
    gain_vel_.Swap(&other->gain_vel_);
    std::swap(ref_pos_enabled_, other->ref_pos_enabled_);
    std::swap(ref_vel_max_enabled_, other->ref_vel_max_enabled_);
    std::swap(gain_pos_enabled_, other->gain_pos_enabled_);
    std::swap(gain_vel_enabled_, other->gain_vel_enabled_);
    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 hxCommand::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = hxCommand_descriptor_;
  metadata.reflection = hxCommand_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

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

// @@protoc_insertion_point(global_scope)
