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

#include "ESMData.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.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)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace messages {
namespace track {
PROTOBUF_CONSTEXPR ESMData::ESMData(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.frequency_)*/0
  , /*decltype(_impl_.pulserepetitionfrequency_)*/0
  , /*decltype(_impl_.pulsewidth_)*/0
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct ESMDataDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ESMDataDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ESMDataDefaultTypeInternal() {}
  union {
    ESMData _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ESMDataDefaultTypeInternal _ESMData_default_instance_;
}  // namespace track
}  // namespace messages
static ::_pb::Metadata file_level_metadata_ESMData_2eproto[1];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_ESMData_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_ESMData_2eproto = nullptr;

const uint32_t TableStruct_ESMData_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::messages::track::ESMData, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::messages::track::ESMData, _impl_.frequency_),
  PROTOBUF_FIELD_OFFSET(::messages::track::ESMData, _impl_.pulserepetitionfrequency_),
  PROTOBUF_FIELD_OFFSET(::messages::track::ESMData, _impl_.pulsewidth_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::messages::track::ESMData)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::messages::track::_ESMData_default_instance_._instance,
};

const char descriptor_table_protodef_ESMData_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\rESMData.proto\022\016messages.track\"R\n\007ESMDa"
  "ta\022\021\n\tFrequency\030\001 \001(\001\022 \n\030PulseRepetition"
  "Frequency\030\002 \001(\001\022\022\n\nPulseWidth\030\003 \001(\001b\006pro"
  "to3"
  ;
static ::_pbi::once_flag descriptor_table_ESMData_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_ESMData_2eproto = {
    false, false, 123, descriptor_table_protodef_ESMData_2eproto,
    "ESMData.proto",
    &descriptor_table_ESMData_2eproto_once, nullptr, 0, 1,
    schemas, file_default_instances, TableStruct_ESMData_2eproto::offsets,
    file_level_metadata_ESMData_2eproto, file_level_enum_descriptors_ESMData_2eproto,
    file_level_service_descriptors_ESMData_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ESMData_2eproto_getter() {
  return &descriptor_table_ESMData_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_ESMData_2eproto(&descriptor_table_ESMData_2eproto);
namespace messages {
namespace track {

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

class ESMData::_Internal {
 public:
};

ESMData::ESMData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:messages.track.ESMData)
}
ESMData::ESMData(const ESMData& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ESMData* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.frequency_){}
    , decltype(_impl_.pulserepetitionfrequency_){}
    , decltype(_impl_.pulsewidth_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.frequency_, &from._impl_.frequency_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.pulsewidth_) -
    reinterpret_cast<char*>(&_impl_.frequency_)) + sizeof(_impl_.pulsewidth_));
  // @@protoc_insertion_point(copy_constructor:messages.track.ESMData)
}

inline void ESMData::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.frequency_){0}
    , decltype(_impl_.pulserepetitionfrequency_){0}
    , decltype(_impl_.pulsewidth_){0}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

ESMData::~ESMData() {
  // @@protoc_insertion_point(destructor:messages.track.ESMData)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ESMData::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void ESMData::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ESMData::Clear() {
// @@protoc_insertion_point(message_clear_start:messages.track.ESMData)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&_impl_.frequency_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.pulsewidth_) -
      reinterpret_cast<char*>(&_impl_.frequency_)) + sizeof(_impl_.pulsewidth_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ESMData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // double Frequency = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
          _impl_.frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // double PulseRepetitionFrequency = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
          _impl_.pulserepetitionfrequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // double PulseWidth = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25)) {
          _impl_.pulsewidth_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ESMData::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:messages.track.ESMData)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // double Frequency = 1;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_frequency = this->_internal_frequency();
  uint64_t raw_frequency;
  memcpy(&raw_frequency, &tmp_frequency, sizeof(tmp_frequency));
  if (raw_frequency != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(1, this->_internal_frequency(), target);
  }

  // double PulseRepetitionFrequency = 2;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_pulserepetitionfrequency = this->_internal_pulserepetitionfrequency();
  uint64_t raw_pulserepetitionfrequency;
  memcpy(&raw_pulserepetitionfrequency, &tmp_pulserepetitionfrequency, sizeof(tmp_pulserepetitionfrequency));
  if (raw_pulserepetitionfrequency != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_pulserepetitionfrequency(), target);
  }

  // double PulseWidth = 3;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_pulsewidth = this->_internal_pulsewidth();
  uint64_t raw_pulsewidth;
  memcpy(&raw_pulsewidth, &tmp_pulsewidth, sizeof(tmp_pulsewidth));
  if (raw_pulsewidth != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_pulsewidth(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:messages.track.ESMData)
  return target;
}

size_t ESMData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:messages.track.ESMData)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // double Frequency = 1;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_frequency = this->_internal_frequency();
  uint64_t raw_frequency;
  memcpy(&raw_frequency, &tmp_frequency, sizeof(tmp_frequency));
  if (raw_frequency != 0) {
    total_size += 1 + 8;
  }

  // double PulseRepetitionFrequency = 2;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_pulserepetitionfrequency = this->_internal_pulserepetitionfrequency();
  uint64_t raw_pulserepetitionfrequency;
  memcpy(&raw_pulserepetitionfrequency, &tmp_pulserepetitionfrequency, sizeof(tmp_pulserepetitionfrequency));
  if (raw_pulserepetitionfrequency != 0) {
    total_size += 1 + 8;
  }

  // double PulseWidth = 3;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_pulsewidth = this->_internal_pulsewidth();
  uint64_t raw_pulsewidth;
  memcpy(&raw_pulsewidth, &tmp_pulsewidth, sizeof(tmp_pulsewidth));
  if (raw_pulsewidth != 0) {
    total_size += 1 + 8;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ESMData::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ESMData::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ESMData::GetClassData() const { return &_class_data_; }


void ESMData::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ESMData*>(&to_msg);
  auto& from = static_cast<const ESMData&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:messages.track.ESMData)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_frequency = from._internal_frequency();
  uint64_t raw_frequency;
  memcpy(&raw_frequency, &tmp_frequency, sizeof(tmp_frequency));
  if (raw_frequency != 0) {
    _this->_internal_set_frequency(from._internal_frequency());
  }
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_pulserepetitionfrequency = from._internal_pulserepetitionfrequency();
  uint64_t raw_pulserepetitionfrequency;
  memcpy(&raw_pulserepetitionfrequency, &tmp_pulserepetitionfrequency, sizeof(tmp_pulserepetitionfrequency));
  if (raw_pulserepetitionfrequency != 0) {
    _this->_internal_set_pulserepetitionfrequency(from._internal_pulserepetitionfrequency());
  }
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_pulsewidth = from._internal_pulsewidth();
  uint64_t raw_pulsewidth;
  memcpy(&raw_pulsewidth, &tmp_pulsewidth, sizeof(tmp_pulsewidth));
  if (raw_pulsewidth != 0) {
    _this->_internal_set_pulsewidth(from._internal_pulsewidth());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ESMData::CopyFrom(const ESMData& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:messages.track.ESMData)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ESMData::IsInitialized() const {
  return true;
}

void ESMData::InternalSwap(ESMData* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ESMData, _impl_.pulsewidth_)
      + sizeof(ESMData::_impl_.pulsewidth_)
      - PROTOBUF_FIELD_OFFSET(ESMData, _impl_.frequency_)>(
          reinterpret_cast<char*>(&_impl_.frequency_),
          reinterpret_cast<char*>(&other->_impl_.frequency_));
}

::PROTOBUF_NAMESPACE_ID::Metadata ESMData::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_ESMData_2eproto_getter, &descriptor_table_ESMData_2eproto_once,
      file_level_metadata_ESMData_2eproto[0]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace track
}  // namespace messages
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::messages::track::ESMData*
Arena::CreateMaybeMessage< ::messages::track::ESMData >(Arena* arena) {
  return Arena::CreateMessageInternal< ::messages::track::ESMData >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
