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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "ipcmsg.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>
// @@protoc_insertion_point(includes)

namespace pb {

namespace {

const ::google::protobuf::Descriptor* Message_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Message_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* MessageType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* JogType_descriptor_ = NULL;

}  // namespace


void protobuf_AssignDesc_ipcmsg_2eproto() {
  protobuf_AddDesc_ipcmsg_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "ipcmsg.proto");
  GOOGLE_CHECK(file != NULL);
  Message_descriptor_ = file->message_type(0);
  static const int Message_offsets_[8] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, velocity_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, distance_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, jog_type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, x_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, y_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, connected_),
  };
  Message_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      Message_descriptor_,
      Message::default_instance_,
      Message_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Message, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(Message));
  MessageType_descriptor_ = file->enum_type(0);
  JogType_descriptor_ = file->enum_type(1);
}

namespace {

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

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

}  // namespace

void protobuf_ShutdownFile_ipcmsg_2eproto() {
  delete Message::default_instance_;
  delete Message_reflection_;
}

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

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\014ipcmsg.proto\022\002pb\"\242\001\n\007Message\022\035\n\004type\030\001"
    " \002(\0162\017.pb.MessageType\022\014\n\004axis\030\002 \001(\005\022\020\n\010v"
    "elocity\030\003 \001(\001\022\020\n\010distance\030\004 \001(\001\022\035\n\010jog_t"
    "ype\030\005 \001(\0162\013.pb.JogType\022\t\n\001x\030\006 \001(\001\022\t\n\001y\030\007"
    " \001(\001\022\021\n\tconnected\030\010 \001(\010*\?\n\013MessageType\022\013"
    "\n\007IPC_JOG\020\001\022\020\n\014IPC_POSITION\020\002\022\021\n\rIPC_CON"
    "NECTED\020\003*@\n\007JogType\022\014\n\010JOG_STOP\020\000\022\022\n\016JOG"
    "_CONTINUOUS\020\001\022\023\n\017JOG_INCREMENTAL\020\002", 314);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "ipcmsg.proto", &protobuf_RegisterTypes);
  Message::default_instance_ = new Message();
  Message::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_ipcmsg_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_ipcmsg_2eproto {
  StaticDescriptorInitializer_ipcmsg_2eproto() {
    protobuf_AddDesc_ipcmsg_2eproto();
  }
} static_descriptor_initializer_ipcmsg_2eproto_;
const ::google::protobuf::EnumDescriptor* MessageType_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MessageType_descriptor_;
}
bool MessageType_IsValid(int value) {
  switch(value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

const ::google::protobuf::EnumDescriptor* JogType_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return JogType_descriptor_;
}
bool JogType_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}


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

#ifndef _MSC_VER
const int Message::kTypeFieldNumber;
const int Message::kAxisFieldNumber;
const int Message::kVelocityFieldNumber;
const int Message::kDistanceFieldNumber;
const int Message::kJogTypeFieldNumber;
const int Message::kXFieldNumber;
const int Message::kYFieldNumber;
const int Message::kConnectedFieldNumber;
#endif  // !_MSC_VER

Message::Message()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:pb.Message)
}

void Message::InitAsDefaultInstance() {
}

Message::Message(const Message& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:pb.Message)
}

void Message::SharedCtor() {
  _cached_size_ = 0;
  type_ = 1;
  axis_ = 0;
  velocity_ = 0;
  distance_ = 0;
  jog_type_ = 0;
  x_ = 0;
  y_ = 0;
  connected_ = false;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Message::~Message() {
  // @@protoc_insertion_point(destructor:pb.Message)
  SharedDtor();
}

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

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

const Message& Message::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_ipcmsg_2eproto();
  return *default_instance_;
}

Message* Message::default_instance_ = NULL;

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

void Message::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<Message*>(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] & 255) {
    ZR_(axis_, y_);
    type_ = 1;
  }

#undef OFFSET_OF_FIELD_
#undef ZR_

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

bool Message::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:pb.Message)
  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 .pb.MessageType type = 1;
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::pb::MessageType_IsValid(value)) {
            set_type(static_cast< ::pb::MessageType >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_axis;
        break;
      }

      // optional int32 axis = 2;
      case 2: {
        if (tag == 16) {
         parse_axis:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
          set_has_axis();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(25)) goto parse_velocity;
        break;
      }

      // optional double velocity = 3;
      case 3: {
        if (tag == 25) {
         parse_velocity:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &velocity_)));
          set_has_velocity();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(33)) goto parse_distance;
        break;
      }

      // optional double distance = 4;
      case 4: {
        if (tag == 33) {
         parse_distance:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &distance_)));
          set_has_distance();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_jog_type;
        break;
      }

      // optional .pb.JogType jog_type = 5;
      case 5: {
        if (tag == 40) {
         parse_jog_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::pb::JogType_IsValid(value)) {
            set_jog_type(static_cast< ::pb::JogType >(value));
          } else {
            mutable_unknown_fields()->AddVarint(5, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(49)) goto parse_x;
        break;
      }

      // optional double x = 6;
      case 6: {
        if (tag == 49) {
         parse_x:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &x_)));
          set_has_x();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(57)) goto parse_y;
        break;
      }

      // optional double y = 7;
      case 7: {
        if (tag == 57) {
         parse_y:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &y_)));
          set_has_y();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_connected;
        break;
      }

      // optional bool connected = 8;
      case 8: {
        if (tag == 64) {
         parse_connected:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &connected_)));
          set_has_connected();
        } 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:pb.Message)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:pb.Message)
  return false;
#undef DO_
}

void Message::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:pb.Message)
  // required .pb.MessageType type = 1;
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->type(), output);
  }

  // optional int32 axis = 2;
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->axis(), output);
  }

  // optional double velocity = 3;
  if (has_velocity()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->velocity(), output);
  }

  // optional double distance = 4;
  if (has_distance()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->distance(), output);
  }

  // optional .pb.JogType jog_type = 5;
  if (has_jog_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      5, this->jog_type(), output);
  }

  // optional double x = 6;
  if (has_x()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->x(), output);
  }

  // optional double y = 7;
  if (has_y()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->y(), output);
  }

  // optional bool connected = 8;
  if (has_connected()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->connected(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:pb.Message)
}

::google::protobuf::uint8* Message::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:pb.Message)
  // required .pb.MessageType type = 1;
  if (has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->type(), target);
  }

  // optional int32 axis = 2;
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->axis(), target);
  }

  // optional double velocity = 3;
  if (has_velocity()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->velocity(), target);
  }

  // optional double distance = 4;
  if (has_distance()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->distance(), target);
  }

  // optional .pb.JogType jog_type = 5;
  if (has_jog_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      5, this->jog_type(), target);
  }

  // optional double x = 6;
  if (has_x()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->x(), target);
  }

  // optional double y = 7;
  if (has_y()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->y(), target);
  }

  // optional bool connected = 8;
  if (has_connected()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->connected(), target);
  }

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

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

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required .pb.MessageType type = 1;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

    // optional int32 axis = 2;
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

    // optional double velocity = 3;
    if (has_velocity()) {
      total_size += 1 + 8;
    }

    // optional double distance = 4;
    if (has_distance()) {
      total_size += 1 + 8;
    }

    // optional .pb.JogType jog_type = 5;
    if (has_jog_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->jog_type());
    }

    // optional double x = 6;
    if (has_x()) {
      total_size += 1 + 8;
    }

    // optional double y = 7;
    if (has_y()) {
      total_size += 1 + 8;
    }

    // optional bool connected = 8;
    if (has_connected()) {
      total_size += 1 + 1;
    }

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

void Message::MergeFrom(const Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_type()) {
      set_type(from.type());
    }
    if (from.has_axis()) {
      set_axis(from.axis());
    }
    if (from.has_velocity()) {
      set_velocity(from.velocity());
    }
    if (from.has_distance()) {
      set_distance(from.distance());
    }
    if (from.has_jog_type()) {
      set_jog_type(from.jog_type());
    }
    if (from.has_x()) {
      set_x(from.x());
    }
    if (from.has_y()) {
      set_y(from.y());
    }
    if (from.has_connected()) {
      set_connected(from.connected());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

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

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

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

  return true;
}

void Message::Swap(Message* other) {
  if (other != this) {
    std::swap(type_, other->type_);
    std::swap(axis_, other->axis_);
    std::swap(velocity_, other->velocity_);
    std::swap(distance_, other->distance_);
    std::swap(jog_type_, other->jog_type_);
    std::swap(x_, other->x_);
    std::swap(y_, other->y_);
    std::swap(connected_, other->connected_);
    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 Message::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Message_descriptor_;
  metadata.reflection = Message_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace pb

// @@protoc_insertion_point(global_scope)
