diff --git a/CMakeLists.txt b/CMakeLists.txt index 6342e61..17f9119 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,17 +34,6 @@ protobuf_generate_cpp(PROTO_PATH include/SimCore/Messages/Protos CPP_PATH inclu add_library(SimCore STATIC - include/SimCore/Messages/Track.hpp - src/SimCore/Messages/Track.cpp - - include/SimCore/Messages/RadarTrack.hpp - src/SimCore/Messages/RadarTrack.cpp - - include/SimCore/Messages/ESMTrack.hpp - src/SimCore/Messages/ESMTrack.cpp - - include/SimCore/Messages/SensorTrack.hpp - src/SimCore/Messages/SensorTrack.cpp include/SimCore/Messages/SimTrack.hpp src/SimCore/Messages/SimTrack.cpp @@ -55,22 +44,9 @@ add_library(SimCore STATIC - include/SimCore/Messages/Protos/Track.pb.cc include/SimCore/Messages/Protos/GeocentricPosition.pb.cc include/SimCore/Messages/Protos/Identifier.pb.cc - include/SimCore/Messages/Protos/RadarTrack.pb.cc - include/SimCore/Messages/Protos/ESMTrack.pb.cc - include/SimCore/Messages/Protos/ESMData.pb.cc - - - include/SimCore/Messages/Protos/SensorTrack.pb.cc - - include/SimCore/Messages/Protos/GroundTruthTrack.pb.cc - - include/SimCore/Messages/GroundThruthTrack.hpp - src/SimCore/Messages/GroundThruthTrack.cpp - include/SimCore/data.hpp @@ -95,12 +71,6 @@ add_library(SimCore STATIC include/SimCore/UtilFunctions.hpp src/SimCore/UtilFunctions.cpp - include/SimCore/Templates/Sensor.hpp - src/SimCore/Templates/Sensor.cpp - - include/SimCore/Templates/Entity.hpp - src/SimCore/Templates/Entity.cpp - ) @@ -120,24 +90,7 @@ target_include_directories(SimCore PUBLIC src) -# add_executable(main - -# src/main.cpp - -# ) - - -# target_link_libraries(main -# Gateway -# CLI11 -# loguru -# ) -# target_include_directories(main PUBLIC -# $ -# $ -# src) - # # Everything TEST related @@ -186,14 +139,6 @@ IF (${TEST_SIMCORE_LIBRARY}) target_link_libraries(test_UtilFunctions Catch2::Catch2 SimCore loguru) catch_discover_tests(test_UtilFunctions) - add_executable(test_SensorClass tests/test_SensorClass.cpp) - target_link_libraries(test_SensorClass Catch2::Catch2 SimCore loguru) - catch_discover_tests(test_SensorClass) - - add_executable(test_EntityClass tests/test_EntityClass.cpp) - target_link_libraries(test_EntityClass Catch2::Catch2 SimCore loguru) - catch_discover_tests(test_EntityClass) - add_executable(test_Trackstore tests/test_Trackstore.cpp) target_link_libraries(test_Trackstore Catch2::Catch2 SimCore loguru) catch_discover_tests(test_SensorClass) diff --git a/include/SimCore/Identifier.hpp b/include/SimCore/Identifier.hpp index 08537c3..01dfe53 100644 --- a/include/SimCore/Identifier.hpp +++ b/include/SimCore/Identifier.hpp @@ -1,6 +1,7 @@ #pragma once +#include "crossguid/guid.hpp" #include #include #include @@ -14,20 +15,12 @@ namespace SimCore { class Identifier{ public: - Identifier() ; - - + Identifier(bool external = false) ; /** - * @brief constructs an object - * + * @brief constructs the ID out of an string + * */ - Identifier(std::uint32_t parent,std::uint32_t number,std::string uuid,bool external = false ) ; - - /** - * @brief constructs an object - * - */ - Identifier(std::uint32_t parent,std::uint32_t number,bool external = false ) ; + Identifier(xg::Guid uuid,bool external = false); /** * @brief constructs the ID out of an string @@ -41,19 +34,6 @@ namespace SimCore { */ Identifier(messages::track::Identifier id); - - /** - * @brief returns the number of the object, this plus the number of the parent make it unique - * @return uint32_t - */ - std::uint32_t getNumber() const; - - /** - * @brief return the number of the parent, if 0 the parent is the Sim Manager - * @return uint32_t - */ - std::uint32_t getParentNumber() const; - /** * @brief returns true if the ID belongs to an external ofject * @return bool @@ -83,11 +63,7 @@ namespace SimCore { private: /// indicates if ID is from an external source bool external_ = false; - /// the number of the object related to his parent object - std::uint32_t number_ = 0; - /// the number of the parent, all ID from an external source the parent is the same - std::uint32_t parent_ = 0; - - std::string uuid_; + /// the unique uuid + std::string uuid_ = ""; }; } diff --git a/include/SimCore/Messages/ESMTrack.hpp b/include/SimCore/Messages/ESMTrack.hpp deleted file mode 100644 index d66e54d..0000000 --- a/include/SimCore/Messages/ESMTrack.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - - - -#include -#include -#include - - -namespace SimCore -{ - class ESMTrack : public Track - { - private: - - - - - public: - ESMTrack(WHISPER::SourceType src,SimCore::Identifier id); - - static ESMTrack unpack(WHISPER::Message msg); - - virtual WHISPER::Message buildMessage(SimCore::Identifier parentID) override; - - - }; - -} \ No newline at end of file diff --git a/include/SimCore/Messages/GroundThruthTrack.hpp b/include/SimCore/Messages/GroundThruthTrack.hpp deleted file mode 100644 index 4edc074..0000000 --- a/include/SimCore/Messages/GroundThruthTrack.hpp +++ /dev/null @@ -1,79 +0,0 @@ -#pragma once - - - - -#include "WHISPER/Messages/Message.hpp" -#include -namespace SimCore -{ - class GroundTruthTrack : public Track - { - public: - GroundTruthTrack(WHISPER::SourceType src,SimCore::Identifier id,SimCore::TrackKind kind); - - virtual WHISPER::Message buildMessage(SimCore::Identifier parentID) override; - - /// set course - void setEnvironment(SimCore::EntityKind); - - /// returns course - SimCore::EntityKind getEnvironment(); - - - /** - * @brief set the position of the track - * @param Position object of the position class - * - */ - void setPosition(Position pos); - - /** - * @brief set the position of the track - * @param 3x double set the x,y,z coordinates direkt which causes that an - * object of position class is created - */ - void setPosition(double x, double y, double z); - - /** - * @brief returns the position - * @return object of position class - * - */ - Position getPostion(); - - /// sets speed - void setSpeed(double speed); - - /// set speed in knots - void setSpeedinKnots(double knots); - - /// return sspeed - double getSpeed(); - - /// returns speed as knots - double getSpeedinKnots(); - - /// set course - void setCourse(double course); - - /// returns course - double getCourse(); - - static GroundTruthTrack unpack(WHISPER::Message msg); - - private: - //environment (AIR,SURFACE,SUBSURFACE,SPACE) - SimCore::EntityKind environemnt_; - /// position of the track - Position position_; - /// speed the track - double speed_ = 0; - /// course of the track - double course_ = 0; - - - - - }; -} \ No newline at end of file diff --git a/include/SimCore/Messages/Protos/ESMData.pb.cc b/include/SimCore/Messages/Protos/ESMData.pb.cc deleted file mode 100644 index 591c230..0000000 --- a/include/SimCore/Messages/Protos/ESMData.pb.cc +++ /dev/null @@ -1,371 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ESMData.proto - -#include "ESMData.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -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(reinterpret_cast(&_impl_.pulsewidth_) - - reinterpret_cast(&_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( - reinterpret_cast(&_impl_.pulsewidth_) - - reinterpret_cast(&_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(tag) == 9)) { - _impl_.frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // double PulseRepetitionFrequency = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { - _impl_.pulserepetitionfrequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // double PulseWidth = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 25)) { - _impl_.pulsewidth_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(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(&to_msg); - auto& from = static_cast(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(&_impl_.frequency_), - reinterpret_cast(&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 diff --git a/include/SimCore/Messages/Protos/ESMData.pb.h b/include/SimCore/Messages/Protos/ESMData.pb.h deleted file mode 100644 index 28b330f..0000000 --- a/include/SimCore/Messages/Protos/ESMData.pb.h +++ /dev/null @@ -1,313 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ESMData.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_ESMData_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_ESMData_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_ESMData_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_ESMData_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ESMData_2eproto; -namespace messages { -namespace track { -class ESMData; -struct ESMDataDefaultTypeInternal; -extern ESMDataDefaultTypeInternal _ESMData_default_instance_; -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::track::ESMData* Arena::CreateMaybeMessage<::messages::track::ESMData>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace track { - -// =================================================================== - -class ESMData final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.track.ESMData) */ { - public: - inline ESMData() : ESMData(nullptr) {} - ~ESMData() override; - explicit PROTOBUF_CONSTEXPR ESMData(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ESMData(const ESMData& from); - ESMData(ESMData&& from) noexcept - : ESMData() { - *this = ::std::move(from); - } - - inline ESMData& operator=(const ESMData& from) { - CopyFrom(from); - return *this; - } - inline ESMData& operator=(ESMData&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ESMData& default_instance() { - return *internal_default_instance(); - } - static inline const ESMData* internal_default_instance() { - return reinterpret_cast( - &_ESMData_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(ESMData& a, ESMData& b) { - a.Swap(&b); - } - inline void Swap(ESMData* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ESMData* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ESMData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ESMData& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ESMData& from) { - ESMData::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ESMData* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.track.ESMData"; - } - protected: - explicit ESMData(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kFrequencyFieldNumber = 1, - kPulseRepetitionFrequencyFieldNumber = 2, - kPulseWidthFieldNumber = 3, - }; - // double Frequency = 1; - void clear_frequency(); - double frequency() const; - void set_frequency(double value); - private: - double _internal_frequency() const; - void _internal_set_frequency(double value); - public: - - // double PulseRepetitionFrequency = 2; - void clear_pulserepetitionfrequency(); - double pulserepetitionfrequency() const; - void set_pulserepetitionfrequency(double value); - private: - double _internal_pulserepetitionfrequency() const; - void _internal_set_pulserepetitionfrequency(double value); - public: - - // double PulseWidth = 3; - void clear_pulsewidth(); - double pulsewidth() const; - void set_pulsewidth(double value); - private: - double _internal_pulsewidth() const; - void _internal_set_pulsewidth(double value); - public: - - // @@protoc_insertion_point(class_scope:messages.track.ESMData) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - double frequency_; - double pulserepetitionfrequency_; - double pulsewidth_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_ESMData_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ESMData - -// double Frequency = 1; -inline void ESMData::clear_frequency() { - _impl_.frequency_ = 0; -} -inline double ESMData::_internal_frequency() const { - return _impl_.frequency_; -} -inline double ESMData::frequency() const { - // @@protoc_insertion_point(field_get:messages.track.ESMData.Frequency) - return _internal_frequency(); -} -inline void ESMData::_internal_set_frequency(double value) { - - _impl_.frequency_ = value; -} -inline void ESMData::set_frequency(double value) { - _internal_set_frequency(value); - // @@protoc_insertion_point(field_set:messages.track.ESMData.Frequency) -} - -// double PulseRepetitionFrequency = 2; -inline void ESMData::clear_pulserepetitionfrequency() { - _impl_.pulserepetitionfrequency_ = 0; -} -inline double ESMData::_internal_pulserepetitionfrequency() const { - return _impl_.pulserepetitionfrequency_; -} -inline double ESMData::pulserepetitionfrequency() const { - // @@protoc_insertion_point(field_get:messages.track.ESMData.PulseRepetitionFrequency) - return _internal_pulserepetitionfrequency(); -} -inline void ESMData::_internal_set_pulserepetitionfrequency(double value) { - - _impl_.pulserepetitionfrequency_ = value; -} -inline void ESMData::set_pulserepetitionfrequency(double value) { - _internal_set_pulserepetitionfrequency(value); - // @@protoc_insertion_point(field_set:messages.track.ESMData.PulseRepetitionFrequency) -} - -// double PulseWidth = 3; -inline void ESMData::clear_pulsewidth() { - _impl_.pulsewidth_ = 0; -} -inline double ESMData::_internal_pulsewidth() const { - return _impl_.pulsewidth_; -} -inline double ESMData::pulsewidth() const { - // @@protoc_insertion_point(field_get:messages.track.ESMData.PulseWidth) - return _internal_pulsewidth(); -} -inline void ESMData::_internal_set_pulsewidth(double value) { - - _impl_.pulsewidth_ = value; -} -inline void ESMData::set_pulsewidth(double value) { - _internal_set_pulsewidth(value); - // @@protoc_insertion_point(field_set:messages.track.ESMData.PulseWidth) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace track -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_ESMData_2eproto diff --git a/include/SimCore/Messages/Protos/ESMData.proto b/include/SimCore/Messages/Protos/ESMData.proto deleted file mode 100644 index faabdc7..0000000 --- a/include/SimCore/Messages/Protos/ESMData.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package messages.track; - - - - -message ESMData { - - double Frequency = 1; - double PulseRepetitionFrequency = 2; - double PulseWidth = 3; -} \ No newline at end of file diff --git a/include/SimCore/Messages/Protos/ESMTrack.pb.cc b/include/SimCore/Messages/Protos/ESMTrack.pb.cc deleted file mode 100644 index 3a4463c..0000000 --- a/include/SimCore/Messages/Protos/ESMTrack.pb.cc +++ /dev/null @@ -1,503 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ESMTrack.proto - -#include "ESMTrack.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace track { -PROTOBUF_CONSTEXPR ESMTrack::ESMTrack( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.esmsensorid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.entityidentifier_)*/nullptr - , /*decltype(_impl_.esmdata_)*/nullptr - , /*decltype(_impl_.timestamp_)*/nullptr - , /*decltype(_impl_.contactbearing_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} -struct ESMTrackDefaultTypeInternal { - PROTOBUF_CONSTEXPR ESMTrackDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ESMTrackDefaultTypeInternal() {} - union { - ESMTrack _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ESMTrackDefaultTypeInternal _ESMTrack_default_instance_; -} // namespace track -} // namespace messages -static ::_pb::Metadata file_level_metadata_ESMTrack_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_ESMTrack_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_ESMTrack_2eproto = nullptr; - -const uint32_t TableStruct_ESMTrack_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::messages::track::ESMTrack, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::track::ESMTrack, _impl_.esmsensorid_), - PROTOBUF_FIELD_OFFSET(::messages::track::ESMTrack, _impl_.entityidentifier_), - PROTOBUF_FIELD_OFFSET(::messages::track::ESMTrack, _impl_.esmdata_), - PROTOBUF_FIELD_OFFSET(::messages::track::ESMTrack, _impl_.contactbearing_), - PROTOBUF_FIELD_OFFSET(::messages::track::ESMTrack, _impl_.timestamp_), -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::messages::track::ESMTrack)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::track::_ESMTrack_default_instance_._instance, -}; - -const char descriptor_table_protodef_ESMTrack_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\016ESMTrack.proto\022\016messages.track\032\020Identi" - "fier.proto\032\rESMData.proto\032\030GeocentricPos" - "ition.proto\032\037google/protobuf/timestamp.p" - "roto\"\306\001\n\010ESMTrack\022\023\n\013ESMSensorID\030\001 \001(\t\0224" - "\n\020EntityIdentifier\030\002 \001(\0132\032.messages.trac" - "k.Identifier\022(\n\007ESMData\030\003 \001(\0132\027.messages" - ".track.ESMData\022\026\n\016ContactBearing\030\004 \001(\001\022-" - "\n\ttimestamp\030\005 \001(\0132\032.google.protobuf.Time" - "stampb\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_ESMTrack_2eproto_deps[4] = { - &::descriptor_table_ESMData_2eproto, - &::descriptor_table_GeocentricPosition_2eproto, - &::descriptor_table_Identifier_2eproto, - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::_pbi::once_flag descriptor_table_ESMTrack_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_ESMTrack_2eproto = { - false, false, 333, descriptor_table_protodef_ESMTrack_2eproto, - "ESMTrack.proto", - &descriptor_table_ESMTrack_2eproto_once, descriptor_table_ESMTrack_2eproto_deps, 4, 1, - schemas, file_default_instances, TableStruct_ESMTrack_2eproto::offsets, - file_level_metadata_ESMTrack_2eproto, file_level_enum_descriptors_ESMTrack_2eproto, - file_level_service_descriptors_ESMTrack_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ESMTrack_2eproto_getter() { - return &descriptor_table_ESMTrack_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_ESMTrack_2eproto(&descriptor_table_ESMTrack_2eproto); -namespace messages { -namespace track { - -// =================================================================== - -class ESMTrack::_Internal { - public: - static const ::messages::track::Identifier& entityidentifier(const ESMTrack* msg); - static const ::messages::track::ESMData& esmdata(const ESMTrack* msg); - static const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp(const ESMTrack* msg); -}; - -const ::messages::track::Identifier& -ESMTrack::_Internal::entityidentifier(const ESMTrack* msg) { - return *msg->_impl_.entityidentifier_; -} -const ::messages::track::ESMData& -ESMTrack::_Internal::esmdata(const ESMTrack* msg) { - return *msg->_impl_.esmdata_; -} -const ::PROTOBUF_NAMESPACE_ID::Timestamp& -ESMTrack::_Internal::timestamp(const ESMTrack* msg) { - return *msg->_impl_.timestamp_; -} -void ESMTrack::clear_entityidentifier() { - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; -} -void ESMTrack::clear_esmdata() { - if (GetArenaForAllocation() == nullptr && _impl_.esmdata_ != nullptr) { - delete _impl_.esmdata_; - } - _impl_.esmdata_ = nullptr; -} -void ESMTrack::clear_timestamp() { - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; -} -ESMTrack::ESMTrack(::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.ESMTrack) -} -ESMTrack::ESMTrack(const ESMTrack& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ESMTrack* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.esmsensorid_){} - , decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.esmdata_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.contactbearing_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.esmsensorid_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.esmsensorid_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_esmsensorid().empty()) { - _this->_impl_.esmsensorid_.Set(from._internal_esmsensorid(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_entityidentifier()) { - _this->_impl_.entityidentifier_ = new ::messages::track::Identifier(*from._impl_.entityidentifier_); - } - if (from._internal_has_esmdata()) { - _this->_impl_.esmdata_ = new ::messages::track::ESMData(*from._impl_.esmdata_); - } - if (from._internal_has_timestamp()) { - _this->_impl_.timestamp_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.timestamp_); - } - _this->_impl_.contactbearing_ = from._impl_.contactbearing_; - // @@protoc_insertion_point(copy_constructor:messages.track.ESMTrack) -} - -inline void ESMTrack::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.esmsensorid_){} - , decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.esmdata_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.contactbearing_){0} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.esmsensorid_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.esmsensorid_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -ESMTrack::~ESMTrack() { - // @@protoc_insertion_point(destructor:messages.track.ESMTrack) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void ESMTrack::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.esmsensorid_.Destroy(); - if (this != internal_default_instance()) delete _impl_.entityidentifier_; - if (this != internal_default_instance()) delete _impl_.esmdata_; - if (this != internal_default_instance()) delete _impl_.timestamp_; -} - -void ESMTrack::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void ESMTrack::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.track.ESMTrack) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.esmsensorid_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.esmdata_ != nullptr) { - delete _impl_.esmdata_; - } - _impl_.esmdata_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; - _impl_.contactbearing_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ESMTrack::_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) { - // string ESMSensorID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_esmsensorid(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "messages.track.ESMTrack.ESMSensorID")); - } else - goto handle_unusual; - continue; - // .messages.track.Identifier EntityIdentifier = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_entityidentifier(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .messages.track.ESMData ESMData = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_esmdata(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // double ContactBearing = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 33)) { - _impl_.contactbearing_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // .google.protobuf.Timestamp timestamp = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr = ctx->ParseMessage(_internal_mutable_timestamp(), ptr); - CHK_(ptr); - } 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* ESMTrack::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.track.ESMTrack) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string ESMSensorID = 1; - if (!this->_internal_esmsensorid().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_esmsensorid().data(), static_cast(this->_internal_esmsensorid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "messages.track.ESMTrack.ESMSensorID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_esmsensorid(), target); - } - - // .messages.track.Identifier EntityIdentifier = 2; - if (this->_internal_has_entityidentifier()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::entityidentifier(this), - _Internal::entityidentifier(this).GetCachedSize(), target, stream); - } - - // .messages.track.ESMData ESMData = 3; - if (this->_internal_has_esmdata()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::esmdata(this), - _Internal::esmdata(this).GetCachedSize(), target, stream); - } - - // double ContactBearing = 4; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactbearing = this->_internal_contactbearing(); - uint64_t raw_contactbearing; - memcpy(&raw_contactbearing, &tmp_contactbearing, sizeof(tmp_contactbearing)); - if (raw_contactbearing != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_contactbearing(), target); - } - - // .google.protobuf.Timestamp timestamp = 5; - if (this->_internal_has_timestamp()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(5, _Internal::timestamp(this), - _Internal::timestamp(this).GetCachedSize(), target, stream); - } - - 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.ESMTrack) - return target; -} - -size_t ESMTrack::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.track.ESMTrack) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string ESMSensorID = 1; - if (!this->_internal_esmsensorid().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_esmsensorid()); - } - - // .messages.track.Identifier EntityIdentifier = 2; - if (this->_internal_has_entityidentifier()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.entityidentifier_); - } - - // .messages.track.ESMData ESMData = 3; - if (this->_internal_has_esmdata()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.esmdata_); - } - - // .google.protobuf.Timestamp timestamp = 5; - if (this->_internal_has_timestamp()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.timestamp_); - } - - // double ContactBearing = 4; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactbearing = this->_internal_contactbearing(); - uint64_t raw_contactbearing; - memcpy(&raw_contactbearing, &tmp_contactbearing, sizeof(tmp_contactbearing)); - if (raw_contactbearing != 0) { - total_size += 1 + 8; - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ESMTrack::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ESMTrack::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ESMTrack::GetClassData() const { return &_class_data_; } - - -void ESMTrack::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.track.ESMTrack) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_esmsensorid().empty()) { - _this->_internal_set_esmsensorid(from._internal_esmsensorid()); - } - if (from._internal_has_entityidentifier()) { - _this->_internal_mutable_entityidentifier()->::messages::track::Identifier::MergeFrom( - from._internal_entityidentifier()); - } - if (from._internal_has_esmdata()) { - _this->_internal_mutable_esmdata()->::messages::track::ESMData::MergeFrom( - from._internal_esmdata()); - } - if (from._internal_has_timestamp()) { - _this->_internal_mutable_timestamp()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom( - from._internal_timestamp()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactbearing = from._internal_contactbearing(); - uint64_t raw_contactbearing; - memcpy(&raw_contactbearing, &tmp_contactbearing, sizeof(tmp_contactbearing)); - if (raw_contactbearing != 0) { - _this->_internal_set_contactbearing(from._internal_contactbearing()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ESMTrack::CopyFrom(const ESMTrack& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.track.ESMTrack) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ESMTrack::IsInitialized() const { - return true; -} - -void ESMTrack::InternalSwap(ESMTrack* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.esmsensorid_, lhs_arena, - &other->_impl_.esmsensorid_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(ESMTrack, _impl_.contactbearing_) - + sizeof(ESMTrack::_impl_.contactbearing_) - - PROTOBUF_FIELD_OFFSET(ESMTrack, _impl_.entityidentifier_)>( - reinterpret_cast(&_impl_.entityidentifier_), - reinterpret_cast(&other->_impl_.entityidentifier_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ESMTrack::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_ESMTrack_2eproto_getter, &descriptor_table_ESMTrack_2eproto_once, - file_level_metadata_ESMTrack_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::track::ESMTrack* -Arena::CreateMaybeMessage< ::messages::track::ESMTrack >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::track::ESMTrack >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/SimCore/Messages/Protos/ESMTrack.pb.h b/include/SimCore/Messages/Protos/ESMTrack.pb.h deleted file mode 100644 index dd2637f..0000000 --- a/include/SimCore/Messages/Protos/ESMTrack.pb.h +++ /dev/null @@ -1,636 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ESMTrack.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_ESMTrack_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_ESMTrack_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include "Identifier.pb.h" -#include "ESMData.pb.h" -#include "GeocentricPosition.pb.h" -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_ESMTrack_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_ESMTrack_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ESMTrack_2eproto; -namespace messages { -namespace track { -class ESMTrack; -struct ESMTrackDefaultTypeInternal; -extern ESMTrackDefaultTypeInternal _ESMTrack_default_instance_; -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::track::ESMTrack* Arena::CreateMaybeMessage<::messages::track::ESMTrack>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace track { - -// =================================================================== - -class ESMTrack final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.track.ESMTrack) */ { - public: - inline ESMTrack() : ESMTrack(nullptr) {} - ~ESMTrack() override; - explicit PROTOBUF_CONSTEXPR ESMTrack(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ESMTrack(const ESMTrack& from); - ESMTrack(ESMTrack&& from) noexcept - : ESMTrack() { - *this = ::std::move(from); - } - - inline ESMTrack& operator=(const ESMTrack& from) { - CopyFrom(from); - return *this; - } - inline ESMTrack& operator=(ESMTrack&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ESMTrack& default_instance() { - return *internal_default_instance(); - } - static inline const ESMTrack* internal_default_instance() { - return reinterpret_cast( - &_ESMTrack_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(ESMTrack& a, ESMTrack& b) { - a.Swap(&b); - } - inline void Swap(ESMTrack* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ESMTrack* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ESMTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ESMTrack& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ESMTrack& from) { - ESMTrack::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ESMTrack* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.track.ESMTrack"; - } - protected: - explicit ESMTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kESMSensorIDFieldNumber = 1, - kEntityIdentifierFieldNumber = 2, - kESMDataFieldNumber = 3, - kTimestampFieldNumber = 5, - kContactBearingFieldNumber = 4, - }; - // string ESMSensorID = 1; - void clear_esmsensorid(); - const std::string& esmsensorid() const; - template - void set_esmsensorid(ArgT0&& arg0, ArgT... args); - std::string* mutable_esmsensorid(); - PROTOBUF_NODISCARD std::string* release_esmsensorid(); - void set_allocated_esmsensorid(std::string* esmsensorid); - private: - const std::string& _internal_esmsensorid() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_esmsensorid(const std::string& value); - std::string* _internal_mutable_esmsensorid(); - public: - - // .messages.track.Identifier EntityIdentifier = 2; - bool has_entityidentifier() const; - private: - bool _internal_has_entityidentifier() const; - public: - void clear_entityidentifier(); - const ::messages::track::Identifier& entityidentifier() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_entityidentifier(); - ::messages::track::Identifier* mutable_entityidentifier(); - void set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier); - private: - const ::messages::track::Identifier& _internal_entityidentifier() const; - ::messages::track::Identifier* _internal_mutable_entityidentifier(); - public: - void unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier); - ::messages::track::Identifier* unsafe_arena_release_entityidentifier(); - - // .messages.track.ESMData ESMData = 3; - bool has_esmdata() const; - private: - bool _internal_has_esmdata() const; - public: - void clear_esmdata(); - const ::messages::track::ESMData& esmdata() const; - PROTOBUF_NODISCARD ::messages::track::ESMData* release_esmdata(); - ::messages::track::ESMData* mutable_esmdata(); - void set_allocated_esmdata(::messages::track::ESMData* esmdata); - private: - const ::messages::track::ESMData& _internal_esmdata() const; - ::messages::track::ESMData* _internal_mutable_esmdata(); - public: - void unsafe_arena_set_allocated_esmdata( - ::messages::track::ESMData* esmdata); - ::messages::track::ESMData* unsafe_arena_release_esmdata(); - - // .google.protobuf.Timestamp timestamp = 5; - bool has_timestamp() const; - private: - bool _internal_has_timestamp() const; - public: - void clear_timestamp(); - const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Timestamp* release_timestamp(); - ::PROTOBUF_NAMESPACE_ID::Timestamp* mutable_timestamp(); - void set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - private: - const ::PROTOBUF_NAMESPACE_ID::Timestamp& _internal_timestamp() const; - ::PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_timestamp(); - public: - void unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - ::PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_timestamp(); - - // double ContactBearing = 4; - void clear_contactbearing(); - double contactbearing() const; - void set_contactbearing(double value); - private: - double _internal_contactbearing() const; - void _internal_set_contactbearing(double value); - public: - - // @@protoc_insertion_point(class_scope:messages.track.ESMTrack) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr esmsensorid_; - ::messages::track::Identifier* entityidentifier_; - ::messages::track::ESMData* esmdata_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp_; - double contactbearing_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_ESMTrack_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ESMTrack - -// string ESMSensorID = 1; -inline void ESMTrack::clear_esmsensorid() { - _impl_.esmsensorid_.ClearToEmpty(); -} -inline const std::string& ESMTrack::esmsensorid() const { - // @@protoc_insertion_point(field_get:messages.track.ESMTrack.ESMSensorID) - return _internal_esmsensorid(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ESMTrack::set_esmsensorid(ArgT0&& arg0, ArgT... args) { - - _impl_.esmsensorid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:messages.track.ESMTrack.ESMSensorID) -} -inline std::string* ESMTrack::mutable_esmsensorid() { - std::string* _s = _internal_mutable_esmsensorid(); - // @@protoc_insertion_point(field_mutable:messages.track.ESMTrack.ESMSensorID) - return _s; -} -inline const std::string& ESMTrack::_internal_esmsensorid() const { - return _impl_.esmsensorid_.Get(); -} -inline void ESMTrack::_internal_set_esmsensorid(const std::string& value) { - - _impl_.esmsensorid_.Set(value, GetArenaForAllocation()); -} -inline std::string* ESMTrack::_internal_mutable_esmsensorid() { - - return _impl_.esmsensorid_.Mutable(GetArenaForAllocation()); -} -inline std::string* ESMTrack::release_esmsensorid() { - // @@protoc_insertion_point(field_release:messages.track.ESMTrack.ESMSensorID) - return _impl_.esmsensorid_.Release(); -} -inline void ESMTrack::set_allocated_esmsensorid(std::string* esmsensorid) { - if (esmsensorid != nullptr) { - - } else { - - } - _impl_.esmsensorid_.SetAllocated(esmsensorid, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.esmsensorid_.IsDefault()) { - _impl_.esmsensorid_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:messages.track.ESMTrack.ESMSensorID) -} - -// .messages.track.Identifier EntityIdentifier = 2; -inline bool ESMTrack::_internal_has_entityidentifier() const { - return this != internal_default_instance() && _impl_.entityidentifier_ != nullptr; -} -inline bool ESMTrack::has_entityidentifier() const { - return _internal_has_entityidentifier(); -} -inline const ::messages::track::Identifier& ESMTrack::_internal_entityidentifier() const { - const ::messages::track::Identifier* p = _impl_.entityidentifier_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& ESMTrack::entityidentifier() const { - // @@protoc_insertion_point(field_get:messages.track.ESMTrack.EntityIdentifier) - return _internal_entityidentifier(); -} -inline void ESMTrack::unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - _impl_.entityidentifier_ = entityidentifier; - if (entityidentifier) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.ESMTrack.EntityIdentifier) -} -inline ::messages::track::Identifier* ESMTrack::release_entityidentifier() { - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* ESMTrack::unsafe_arena_release_entityidentifier() { - // @@protoc_insertion_point(field_release:messages.track.ESMTrack.EntityIdentifier) - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* ESMTrack::_internal_mutable_entityidentifier() { - - if (_impl_.entityidentifier_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.entityidentifier_ = p; - } - return _impl_.entityidentifier_; -} -inline ::messages::track::Identifier* ESMTrack::mutable_entityidentifier() { - ::messages::track::Identifier* _msg = _internal_mutable_entityidentifier(); - // @@protoc_insertion_point(field_mutable:messages.track.ESMTrack.EntityIdentifier) - return _msg; -} -inline void ESMTrack::set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - if (entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(entityidentifier)); - if (message_arena != submessage_arena) { - entityidentifier = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, entityidentifier, submessage_arena); - } - - } else { - - } - _impl_.entityidentifier_ = entityidentifier; - // @@protoc_insertion_point(field_set_allocated:messages.track.ESMTrack.EntityIdentifier) -} - -// .messages.track.ESMData ESMData = 3; -inline bool ESMTrack::_internal_has_esmdata() const { - return this != internal_default_instance() && _impl_.esmdata_ != nullptr; -} -inline bool ESMTrack::has_esmdata() const { - return _internal_has_esmdata(); -} -inline const ::messages::track::ESMData& ESMTrack::_internal_esmdata() const { - const ::messages::track::ESMData* p = _impl_.esmdata_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_ESMData_default_instance_); -} -inline const ::messages::track::ESMData& ESMTrack::esmdata() const { - // @@protoc_insertion_point(field_get:messages.track.ESMTrack.ESMData) - return _internal_esmdata(); -} -inline void ESMTrack::unsafe_arena_set_allocated_esmdata( - ::messages::track::ESMData* esmdata) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.esmdata_); - } - _impl_.esmdata_ = esmdata; - if (esmdata) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.ESMTrack.ESMData) -} -inline ::messages::track::ESMData* ESMTrack::release_esmdata() { - - ::messages::track::ESMData* temp = _impl_.esmdata_; - _impl_.esmdata_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::ESMData* ESMTrack::unsafe_arena_release_esmdata() { - // @@protoc_insertion_point(field_release:messages.track.ESMTrack.ESMData) - - ::messages::track::ESMData* temp = _impl_.esmdata_; - _impl_.esmdata_ = nullptr; - return temp; -} -inline ::messages::track::ESMData* ESMTrack::_internal_mutable_esmdata() { - - if (_impl_.esmdata_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::ESMData>(GetArenaForAllocation()); - _impl_.esmdata_ = p; - } - return _impl_.esmdata_; -} -inline ::messages::track::ESMData* ESMTrack::mutable_esmdata() { - ::messages::track::ESMData* _msg = _internal_mutable_esmdata(); - // @@protoc_insertion_point(field_mutable:messages.track.ESMTrack.ESMData) - return _msg; -} -inline void ESMTrack::set_allocated_esmdata(::messages::track::ESMData* esmdata) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.esmdata_); - } - if (esmdata) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(esmdata)); - if (message_arena != submessage_arena) { - esmdata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, esmdata, submessage_arena); - } - - } else { - - } - _impl_.esmdata_ = esmdata; - // @@protoc_insertion_point(field_set_allocated:messages.track.ESMTrack.ESMData) -} - -// double ContactBearing = 4; -inline void ESMTrack::clear_contactbearing() { - _impl_.contactbearing_ = 0; -} -inline double ESMTrack::_internal_contactbearing() const { - return _impl_.contactbearing_; -} -inline double ESMTrack::contactbearing() const { - // @@protoc_insertion_point(field_get:messages.track.ESMTrack.ContactBearing) - return _internal_contactbearing(); -} -inline void ESMTrack::_internal_set_contactbearing(double value) { - - _impl_.contactbearing_ = value; -} -inline void ESMTrack::set_contactbearing(double value) { - _internal_set_contactbearing(value); - // @@protoc_insertion_point(field_set:messages.track.ESMTrack.ContactBearing) -} - -// .google.protobuf.Timestamp timestamp = 5; -inline bool ESMTrack::_internal_has_timestamp() const { - return this != internal_default_instance() && _impl_.timestamp_ != nullptr; -} -inline bool ESMTrack::has_timestamp() const { - return _internal_has_timestamp(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& ESMTrack::_internal_timestamp() const { - const ::PROTOBUF_NAMESPACE_ID::Timestamp* p = _impl_.timestamp_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& ESMTrack::timestamp() const { - // @@protoc_insertion_point(field_get:messages.track.ESMTrack.timestamp) - return _internal_timestamp(); -} -inline void ESMTrack::unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - _impl_.timestamp_ = timestamp; - if (timestamp) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.ESMTrack.timestamp) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ESMTrack::release_timestamp() { - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ESMTrack::unsafe_arena_release_timestamp() { - // @@protoc_insertion_point(field_release:messages.track.ESMTrack.timestamp) - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ESMTrack::_internal_mutable_timestamp() { - - if (_impl_.timestamp_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaForAllocation()); - _impl_.timestamp_ = p; - } - return _impl_.timestamp_; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ESMTrack::mutable_timestamp() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_timestamp(); - // @@protoc_insertion_point(field_mutable:messages.track.ESMTrack.timestamp) - return _msg; -} -inline void ESMTrack::set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - if (timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timestamp)); - if (message_arena != submessage_arena) { - timestamp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, timestamp, submessage_arena); - } - - } else { - - } - _impl_.timestamp_ = timestamp; - // @@protoc_insertion_point(field_set_allocated:messages.track.ESMTrack.timestamp) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace track -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_ESMTrack_2eproto diff --git a/include/SimCore/Messages/Protos/ESMTrack.proto b/include/SimCore/Messages/Protos/ESMTrack.proto deleted file mode 100644 index 703261d..0000000 --- a/include/SimCore/Messages/Protos/ESMTrack.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package messages.track; - -import "Identifier.proto"; -import "ESMData.proto"; -import "GeocentricPosition.proto"; - -import "google/protobuf/timestamp.proto"; - - -message ESMTrack { - - string ESMSensorID = 1; - messages.track.Identifier EntityIdentifier = 2; - messages.track.ESMData ESMData = 3; - double ContactBearing = 4; - - google.protobuf.Timestamp timestamp = 5; -} \ No newline at end of file diff --git a/include/SimCore/Messages/Protos/GroundTruthTrack.pb.cc b/include/SimCore/Messages/Protos/GroundTruthTrack.pb.cc deleted file mode 100644 index 0664ff4..0000000 --- a/include/SimCore/Messages/Protos/GroundTruthTrack.pb.cc +++ /dev/null @@ -1,581 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: GroundTruthTrack.proto - -#include "GroundTruthTrack.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace track { -PROTOBUF_CONSTEXPR GroundTruthTrack::GroundTruthTrack( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.entityidentifier_)*/nullptr - , /*decltype(_impl_.geocentricposition_)*/nullptr - , /*decltype(_impl_.esmdata_)*/nullptr - , /*decltype(_impl_.timestamp_)*/nullptr - , /*decltype(_impl_.contactspeed_)*/0 - , /*decltype(_impl_.contactcourse_)*/0 - , /*decltype(_impl_.trackkind_)*/0u} {} -struct GroundTruthTrackDefaultTypeInternal { - PROTOBUF_CONSTEXPR GroundTruthTrackDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~GroundTruthTrackDefaultTypeInternal() {} - union { - GroundTruthTrack _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GroundTruthTrackDefaultTypeInternal _GroundTruthTrack_default_instance_; -} // namespace track -} // namespace messages -static ::_pb::Metadata file_level_metadata_GroundTruthTrack_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_GroundTruthTrack_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_GroundTruthTrack_2eproto = nullptr; - -const uint32_t TableStruct_GroundTruthTrack_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_.trackkind_), - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_.entityidentifier_), - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_.geocentricposition_), - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_.contactspeed_), - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_.contactcourse_), - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_.esmdata_), - PROTOBUF_FIELD_OFFSET(::messages::track::GroundTruthTrack, _impl_.timestamp_), - ~0u, - ~0u, - ~0u, - 1, - 2, - 0, - ~0u, -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 13, -1, sizeof(::messages::track::GroundTruthTrack)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::track::_GroundTruthTrack_default_instance_._instance, -}; - -const char descriptor_table_protodef_GroundTruthTrack_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\026GroundTruthTrack.proto\022\016messages.track" - "\032\020Identifier.proto\032\rESMData.proto\032\030Geoce" - "ntricPosition.proto\032\037google/protobuf/tim" - "estamp.proto\"\345\002\n\020GroundTruthTrack\022\021\n\tTra" - "ckKind\030\001 \001(\r\0224\n\020EntityIdentifier\030\002 \001(\0132\032" - ".messages.track.Identifier\022D\n\022Geocentric" - "Position\030\003 \001(\0132(.messages.track.EntityGe" - "ocentricPosition\022\031\n\014ContactSpeed\030\004 \001(\001H\000" - "\210\001\001\022\032\n\rContactCourse\030\005 \001(\001H\001\210\001\001\022-\n\007ESMDa" - "ta\030\006 \001(\0132\027.messages.track.ESMDataH\002\210\001\001\022-" - "\n\ttimestamp\030\007 \001(\0132\032.google.protobuf.Time" - "stampB\017\n\r_ContactSpeedB\020\n\016_ContactCourse" - "B\n\n\010_ESMDatab\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_GroundTruthTrack_2eproto_deps[4] = { - &::descriptor_table_ESMData_2eproto, - &::descriptor_table_GeocentricPosition_2eproto, - &::descriptor_table_Identifier_2eproto, - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::_pbi::once_flag descriptor_table_GroundTruthTrack_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_GroundTruthTrack_2eproto = { - false, false, 500, descriptor_table_protodef_GroundTruthTrack_2eproto, - "GroundTruthTrack.proto", - &descriptor_table_GroundTruthTrack_2eproto_once, descriptor_table_GroundTruthTrack_2eproto_deps, 4, 1, - schemas, file_default_instances, TableStruct_GroundTruthTrack_2eproto::offsets, - file_level_metadata_GroundTruthTrack_2eproto, file_level_enum_descriptors_GroundTruthTrack_2eproto, - file_level_service_descriptors_GroundTruthTrack_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_GroundTruthTrack_2eproto_getter() { - return &descriptor_table_GroundTruthTrack_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_GroundTruthTrack_2eproto(&descriptor_table_GroundTruthTrack_2eproto); -namespace messages { -namespace track { - -// =================================================================== - -class GroundTruthTrack::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::messages::track::Identifier& entityidentifier(const GroundTruthTrack* msg); - static const ::messages::track::EntityGeocentricPosition& geocentricposition(const GroundTruthTrack* msg); - static void set_has_contactspeed(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static void set_has_contactcourse(HasBits* has_bits) { - (*has_bits)[0] |= 4u; - } - static const ::messages::track::ESMData& esmdata(const GroundTruthTrack* msg); - static void set_has_esmdata(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp(const GroundTruthTrack* msg); -}; - -const ::messages::track::Identifier& -GroundTruthTrack::_Internal::entityidentifier(const GroundTruthTrack* msg) { - return *msg->_impl_.entityidentifier_; -} -const ::messages::track::EntityGeocentricPosition& -GroundTruthTrack::_Internal::geocentricposition(const GroundTruthTrack* msg) { - return *msg->_impl_.geocentricposition_; -} -const ::messages::track::ESMData& -GroundTruthTrack::_Internal::esmdata(const GroundTruthTrack* msg) { - return *msg->_impl_.esmdata_; -} -const ::PROTOBUF_NAMESPACE_ID::Timestamp& -GroundTruthTrack::_Internal::timestamp(const GroundTruthTrack* msg) { - return *msg->_impl_.timestamp_; -} -void GroundTruthTrack::clear_entityidentifier() { - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; -} -void GroundTruthTrack::clear_geocentricposition() { - if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) { - delete _impl_.geocentricposition_; - } - _impl_.geocentricposition_ = nullptr; -} -void GroundTruthTrack::clear_esmdata() { - if (_impl_.esmdata_ != nullptr) _impl_.esmdata_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -void GroundTruthTrack::clear_timestamp() { - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; -} -GroundTruthTrack::GroundTruthTrack(::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.GroundTruthTrack) -} -GroundTruthTrack::GroundTruthTrack(const GroundTruthTrack& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - GroundTruthTrack* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.esmdata_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.contactspeed_){} - , decltype(_impl_.contactcourse_){} - , decltype(_impl_.trackkind_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_entityidentifier()) { - _this->_impl_.entityidentifier_ = new ::messages::track::Identifier(*from._impl_.entityidentifier_); - } - if (from._internal_has_geocentricposition()) { - _this->_impl_.geocentricposition_ = new ::messages::track::EntityGeocentricPosition(*from._impl_.geocentricposition_); - } - if (from._internal_has_esmdata()) { - _this->_impl_.esmdata_ = new ::messages::track::ESMData(*from._impl_.esmdata_); - } - if (from._internal_has_timestamp()) { - _this->_impl_.timestamp_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.timestamp_); - } - ::memcpy(&_impl_.contactspeed_, &from._impl_.contactspeed_, - static_cast(reinterpret_cast(&_impl_.trackkind_) - - reinterpret_cast(&_impl_.contactspeed_)) + sizeof(_impl_.trackkind_)); - // @@protoc_insertion_point(copy_constructor:messages.track.GroundTruthTrack) -} - -inline void GroundTruthTrack::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.esmdata_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.contactspeed_){0} - , decltype(_impl_.contactcourse_){0} - , decltype(_impl_.trackkind_){0u} - }; -} - -GroundTruthTrack::~GroundTruthTrack() { - // @@protoc_insertion_point(destructor:messages.track.GroundTruthTrack) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void GroundTruthTrack::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.entityidentifier_; - if (this != internal_default_instance()) delete _impl_.geocentricposition_; - if (this != internal_default_instance()) delete _impl_.esmdata_; - if (this != internal_default_instance()) delete _impl_.timestamp_; -} - -void GroundTruthTrack::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void GroundTruthTrack::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.track.GroundTruthTrack) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) { - delete _impl_.geocentricposition_; - } - _impl_.geocentricposition_ = nullptr; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.esmdata_ != nullptr); - _impl_.esmdata_->Clear(); - } - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; - if (cached_has_bits & 0x00000006u) { - ::memset(&_impl_.contactspeed_, 0, static_cast( - reinterpret_cast(&_impl_.contactcourse_) - - reinterpret_cast(&_impl_.contactspeed_)) + sizeof(_impl_.contactcourse_)); - } - _impl_.trackkind_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GroundTruthTrack::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint32 TrackKind = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.trackkind_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .messages.track.Identifier EntityIdentifier = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_entityidentifier(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_geocentricposition(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional double ContactSpeed = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 33)) { - _Internal::set_has_contactspeed(&has_bits); - _impl_.contactspeed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // optional double ContactCourse = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 41)) { - _Internal::set_has_contactcourse(&has_bits); - _impl_.contactcourse_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // optional .messages.track.ESMData ESMData = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr = ctx->ParseMessage(_internal_mutable_esmdata(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .google.protobuf.Timestamp timestamp = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { - ptr = ctx->ParseMessage(_internal_mutable_timestamp(), ptr); - CHK_(ptr); - } 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: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* GroundTruthTrack::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.track.GroundTruthTrack) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 TrackKind = 1; - if (this->_internal_trackkind() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_trackkind(), target); - } - - // .messages.track.Identifier EntityIdentifier = 2; - if (this->_internal_has_entityidentifier()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::entityidentifier(this), - _Internal::entityidentifier(this).GetCachedSize(), target, stream); - } - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - if (this->_internal_has_geocentricposition()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::geocentricposition(this), - _Internal::geocentricposition(this).GetCachedSize(), target, stream); - } - - // optional double ContactSpeed = 4; - if (_internal_has_contactspeed()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_contactspeed(), target); - } - - // optional double ContactCourse = 5; - if (_internal_has_contactcourse()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_contactcourse(), target); - } - - // optional .messages.track.ESMData ESMData = 6; - if (_internal_has_esmdata()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(6, _Internal::esmdata(this), - _Internal::esmdata(this).GetCachedSize(), target, stream); - } - - // .google.protobuf.Timestamp timestamp = 7; - if (this->_internal_has_timestamp()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(7, _Internal::timestamp(this), - _Internal::timestamp(this).GetCachedSize(), target, stream); - } - - 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.GroundTruthTrack) - return target; -} - -size_t GroundTruthTrack::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.track.GroundTruthTrack) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .messages.track.Identifier EntityIdentifier = 2; - if (this->_internal_has_entityidentifier()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.entityidentifier_); - } - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - if (this->_internal_has_geocentricposition()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.geocentricposition_); - } - - // optional .messages.track.ESMData ESMData = 6; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.esmdata_); - } - - // .google.protobuf.Timestamp timestamp = 7; - if (this->_internal_has_timestamp()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.timestamp_); - } - - if (cached_has_bits & 0x00000006u) { - // optional double ContactSpeed = 4; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + 8; - } - - // optional double ContactCourse = 5; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + 8; - } - - } - // uint32 TrackKind = 1; - if (this->_internal_trackkind() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_trackkind()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GroundTruthTrack::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - GroundTruthTrack::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GroundTruthTrack::GetClassData() const { return &_class_data_; } - - -void GroundTruthTrack::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.track.GroundTruthTrack) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_entityidentifier()) { - _this->_internal_mutable_entityidentifier()->::messages::track::Identifier::MergeFrom( - from._internal_entityidentifier()); - } - if (from._internal_has_geocentricposition()) { - _this->_internal_mutable_geocentricposition()->::messages::track::EntityGeocentricPosition::MergeFrom( - from._internal_geocentricposition()); - } - if (from._internal_has_esmdata()) { - _this->_internal_mutable_esmdata()->::messages::track::ESMData::MergeFrom( - from._internal_esmdata()); - } - if (from._internal_has_timestamp()) { - _this->_internal_mutable_timestamp()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom( - from._internal_timestamp()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000006u) { - if (cached_has_bits & 0x00000002u) { - _this->_impl_.contactspeed_ = from._impl_.contactspeed_; - } - if (cached_has_bits & 0x00000004u) { - _this->_impl_.contactcourse_ = from._impl_.contactcourse_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; - } - if (from._internal_trackkind() != 0) { - _this->_internal_set_trackkind(from._internal_trackkind()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void GroundTruthTrack::CopyFrom(const GroundTruthTrack& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.track.GroundTruthTrack) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GroundTruthTrack::IsInitialized() const { - return true; -} - -void GroundTruthTrack::InternalSwap(GroundTruthTrack* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(GroundTruthTrack, _impl_.trackkind_) - + sizeof(GroundTruthTrack::_impl_.trackkind_) - - PROTOBUF_FIELD_OFFSET(GroundTruthTrack, _impl_.entityidentifier_)>( - reinterpret_cast(&_impl_.entityidentifier_), - reinterpret_cast(&other->_impl_.entityidentifier_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GroundTruthTrack::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_GroundTruthTrack_2eproto_getter, &descriptor_table_GroundTruthTrack_2eproto_once, - file_level_metadata_GroundTruthTrack_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::track::GroundTruthTrack* -Arena::CreateMaybeMessage< ::messages::track::GroundTruthTrack >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::track::GroundTruthTrack >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/SimCore/Messages/Protos/GroundTruthTrack.pb.h b/include/SimCore/Messages/Protos/GroundTruthTrack.pb.h deleted file mode 100644 index f124bf5..0000000 --- a/include/SimCore/Messages/Protos/GroundTruthTrack.pb.h +++ /dev/null @@ -1,764 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: GroundTruthTrack.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_GroundTruthTrack_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_GroundTruthTrack_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include "Identifier.pb.h" -#include "ESMData.pb.h" -#include "GeocentricPosition.pb.h" -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_GroundTruthTrack_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_GroundTruthTrack_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_GroundTruthTrack_2eproto; -namespace messages { -namespace track { -class GroundTruthTrack; -struct GroundTruthTrackDefaultTypeInternal; -extern GroundTruthTrackDefaultTypeInternal _GroundTruthTrack_default_instance_; -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::track::GroundTruthTrack* Arena::CreateMaybeMessage<::messages::track::GroundTruthTrack>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace track { - -// =================================================================== - -class GroundTruthTrack final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.track.GroundTruthTrack) */ { - public: - inline GroundTruthTrack() : GroundTruthTrack(nullptr) {} - ~GroundTruthTrack() override; - explicit PROTOBUF_CONSTEXPR GroundTruthTrack(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GroundTruthTrack(const GroundTruthTrack& from); - GroundTruthTrack(GroundTruthTrack&& from) noexcept - : GroundTruthTrack() { - *this = ::std::move(from); - } - - inline GroundTruthTrack& operator=(const GroundTruthTrack& from) { - CopyFrom(from); - return *this; - } - inline GroundTruthTrack& operator=(GroundTruthTrack&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const GroundTruthTrack& default_instance() { - return *internal_default_instance(); - } - static inline const GroundTruthTrack* internal_default_instance() { - return reinterpret_cast( - &_GroundTruthTrack_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(GroundTruthTrack& a, GroundTruthTrack& b) { - a.Swap(&b); - } - inline void Swap(GroundTruthTrack* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(GroundTruthTrack* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - GroundTruthTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const GroundTruthTrack& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const GroundTruthTrack& from) { - GroundTruthTrack::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GroundTruthTrack* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.track.GroundTruthTrack"; - } - protected: - explicit GroundTruthTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kEntityIdentifierFieldNumber = 2, - kGeocentricPositionFieldNumber = 3, - kESMDataFieldNumber = 6, - kTimestampFieldNumber = 7, - kContactSpeedFieldNumber = 4, - kContactCourseFieldNumber = 5, - kTrackKindFieldNumber = 1, - }; - // .messages.track.Identifier EntityIdentifier = 2; - bool has_entityidentifier() const; - private: - bool _internal_has_entityidentifier() const; - public: - void clear_entityidentifier(); - const ::messages::track::Identifier& entityidentifier() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_entityidentifier(); - ::messages::track::Identifier* mutable_entityidentifier(); - void set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier); - private: - const ::messages::track::Identifier& _internal_entityidentifier() const; - ::messages::track::Identifier* _internal_mutable_entityidentifier(); - public: - void unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier); - ::messages::track::Identifier* unsafe_arena_release_entityidentifier(); - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - bool has_geocentricposition() const; - private: - bool _internal_has_geocentricposition() const; - public: - void clear_geocentricposition(); - const ::messages::track::EntityGeocentricPosition& geocentricposition() const; - PROTOBUF_NODISCARD ::messages::track::EntityGeocentricPosition* release_geocentricposition(); - ::messages::track::EntityGeocentricPosition* mutable_geocentricposition(); - void set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition); - private: - const ::messages::track::EntityGeocentricPosition& _internal_geocentricposition() const; - ::messages::track::EntityGeocentricPosition* _internal_mutable_geocentricposition(); - public: - void unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition); - ::messages::track::EntityGeocentricPosition* unsafe_arena_release_geocentricposition(); - - // optional .messages.track.ESMData ESMData = 6; - bool has_esmdata() const; - private: - bool _internal_has_esmdata() const; - public: - void clear_esmdata(); - const ::messages::track::ESMData& esmdata() const; - PROTOBUF_NODISCARD ::messages::track::ESMData* release_esmdata(); - ::messages::track::ESMData* mutable_esmdata(); - void set_allocated_esmdata(::messages::track::ESMData* esmdata); - private: - const ::messages::track::ESMData& _internal_esmdata() const; - ::messages::track::ESMData* _internal_mutable_esmdata(); - public: - void unsafe_arena_set_allocated_esmdata( - ::messages::track::ESMData* esmdata); - ::messages::track::ESMData* unsafe_arena_release_esmdata(); - - // .google.protobuf.Timestamp timestamp = 7; - bool has_timestamp() const; - private: - bool _internal_has_timestamp() const; - public: - void clear_timestamp(); - const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Timestamp* release_timestamp(); - ::PROTOBUF_NAMESPACE_ID::Timestamp* mutable_timestamp(); - void set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - private: - const ::PROTOBUF_NAMESPACE_ID::Timestamp& _internal_timestamp() const; - ::PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_timestamp(); - public: - void unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - ::PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_timestamp(); - - // optional double ContactSpeed = 4; - bool has_contactspeed() const; - private: - bool _internal_has_contactspeed() const; - public: - void clear_contactspeed(); - double contactspeed() const; - void set_contactspeed(double value); - private: - double _internal_contactspeed() const; - void _internal_set_contactspeed(double value); - public: - - // optional double ContactCourse = 5; - bool has_contactcourse() const; - private: - bool _internal_has_contactcourse() const; - public: - void clear_contactcourse(); - double contactcourse() const; - void set_contactcourse(double value); - private: - double _internal_contactcourse() const; - void _internal_set_contactcourse(double value); - public: - - // uint32 TrackKind = 1; - void clear_trackkind(); - uint32_t trackkind() const; - void set_trackkind(uint32_t value); - private: - uint32_t _internal_trackkind() const; - void _internal_set_trackkind(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:messages.track.GroundTruthTrack) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::messages::track::Identifier* entityidentifier_; - ::messages::track::EntityGeocentricPosition* geocentricposition_; - ::messages::track::ESMData* esmdata_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp_; - double contactspeed_; - double contactcourse_; - uint32_t trackkind_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_GroundTruthTrack_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// GroundTruthTrack - -// uint32 TrackKind = 1; -inline void GroundTruthTrack::clear_trackkind() { - _impl_.trackkind_ = 0u; -} -inline uint32_t GroundTruthTrack::_internal_trackkind() const { - return _impl_.trackkind_; -} -inline uint32_t GroundTruthTrack::trackkind() const { - // @@protoc_insertion_point(field_get:messages.track.GroundTruthTrack.TrackKind) - return _internal_trackkind(); -} -inline void GroundTruthTrack::_internal_set_trackkind(uint32_t value) { - - _impl_.trackkind_ = value; -} -inline void GroundTruthTrack::set_trackkind(uint32_t value) { - _internal_set_trackkind(value); - // @@protoc_insertion_point(field_set:messages.track.GroundTruthTrack.TrackKind) -} - -// .messages.track.Identifier EntityIdentifier = 2; -inline bool GroundTruthTrack::_internal_has_entityidentifier() const { - return this != internal_default_instance() && _impl_.entityidentifier_ != nullptr; -} -inline bool GroundTruthTrack::has_entityidentifier() const { - return _internal_has_entityidentifier(); -} -inline const ::messages::track::Identifier& GroundTruthTrack::_internal_entityidentifier() const { - const ::messages::track::Identifier* p = _impl_.entityidentifier_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& GroundTruthTrack::entityidentifier() const { - // @@protoc_insertion_point(field_get:messages.track.GroundTruthTrack.EntityIdentifier) - return _internal_entityidentifier(); -} -inline void GroundTruthTrack::unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - _impl_.entityidentifier_ = entityidentifier; - if (entityidentifier) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.GroundTruthTrack.EntityIdentifier) -} -inline ::messages::track::Identifier* GroundTruthTrack::release_entityidentifier() { - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* GroundTruthTrack::unsafe_arena_release_entityidentifier() { - // @@protoc_insertion_point(field_release:messages.track.GroundTruthTrack.EntityIdentifier) - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* GroundTruthTrack::_internal_mutable_entityidentifier() { - - if (_impl_.entityidentifier_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.entityidentifier_ = p; - } - return _impl_.entityidentifier_; -} -inline ::messages::track::Identifier* GroundTruthTrack::mutable_entityidentifier() { - ::messages::track::Identifier* _msg = _internal_mutable_entityidentifier(); - // @@protoc_insertion_point(field_mutable:messages.track.GroundTruthTrack.EntityIdentifier) - return _msg; -} -inline void GroundTruthTrack::set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - if (entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(entityidentifier)); - if (message_arena != submessage_arena) { - entityidentifier = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, entityidentifier, submessage_arena); - } - - } else { - - } - _impl_.entityidentifier_ = entityidentifier; - // @@protoc_insertion_point(field_set_allocated:messages.track.GroundTruthTrack.EntityIdentifier) -} - -// .messages.track.EntityGeocentricPosition GeocentricPosition = 3; -inline bool GroundTruthTrack::_internal_has_geocentricposition() const { - return this != internal_default_instance() && _impl_.geocentricposition_ != nullptr; -} -inline bool GroundTruthTrack::has_geocentricposition() const { - return _internal_has_geocentricposition(); -} -inline const ::messages::track::EntityGeocentricPosition& GroundTruthTrack::_internal_geocentricposition() const { - const ::messages::track::EntityGeocentricPosition* p = _impl_.geocentricposition_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_EntityGeocentricPosition_default_instance_); -} -inline const ::messages::track::EntityGeocentricPosition& GroundTruthTrack::geocentricposition() const { - // @@protoc_insertion_point(field_get:messages.track.GroundTruthTrack.GeocentricPosition) - return _internal_geocentricposition(); -} -inline void GroundTruthTrack::unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - _impl_.geocentricposition_ = geocentricposition; - if (geocentricposition) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.GroundTruthTrack.GeocentricPosition) -} -inline ::messages::track::EntityGeocentricPosition* GroundTruthTrack::release_geocentricposition() { - - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::EntityGeocentricPosition* GroundTruthTrack::unsafe_arena_release_geocentricposition() { - // @@protoc_insertion_point(field_release:messages.track.GroundTruthTrack.GeocentricPosition) - - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; - return temp; -} -inline ::messages::track::EntityGeocentricPosition* GroundTruthTrack::_internal_mutable_geocentricposition() { - - if (_impl_.geocentricposition_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::EntityGeocentricPosition>(GetArenaForAllocation()); - _impl_.geocentricposition_ = p; - } - return _impl_.geocentricposition_; -} -inline ::messages::track::EntityGeocentricPosition* GroundTruthTrack::mutable_geocentricposition() { - ::messages::track::EntityGeocentricPosition* _msg = _internal_mutable_geocentricposition(); - // @@protoc_insertion_point(field_mutable:messages.track.GroundTruthTrack.GeocentricPosition) - return _msg; -} -inline void GroundTruthTrack::set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - if (geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(geocentricposition)); - if (message_arena != submessage_arena) { - geocentricposition = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, geocentricposition, submessage_arena); - } - - } else { - - } - _impl_.geocentricposition_ = geocentricposition; - // @@protoc_insertion_point(field_set_allocated:messages.track.GroundTruthTrack.GeocentricPosition) -} - -// optional double ContactSpeed = 4; -inline bool GroundTruthTrack::_internal_has_contactspeed() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool GroundTruthTrack::has_contactspeed() const { - return _internal_has_contactspeed(); -} -inline void GroundTruthTrack::clear_contactspeed() { - _impl_.contactspeed_ = 0; - _impl_._has_bits_[0] &= ~0x00000002u; -} -inline double GroundTruthTrack::_internal_contactspeed() const { - return _impl_.contactspeed_; -} -inline double GroundTruthTrack::contactspeed() const { - // @@protoc_insertion_point(field_get:messages.track.GroundTruthTrack.ContactSpeed) - return _internal_contactspeed(); -} -inline void GroundTruthTrack::_internal_set_contactspeed(double value) { - _impl_._has_bits_[0] |= 0x00000002u; - _impl_.contactspeed_ = value; -} -inline void GroundTruthTrack::set_contactspeed(double value) { - _internal_set_contactspeed(value); - // @@protoc_insertion_point(field_set:messages.track.GroundTruthTrack.ContactSpeed) -} - -// optional double ContactCourse = 5; -inline bool GroundTruthTrack::_internal_has_contactcourse() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool GroundTruthTrack::has_contactcourse() const { - return _internal_has_contactcourse(); -} -inline void GroundTruthTrack::clear_contactcourse() { - _impl_.contactcourse_ = 0; - _impl_._has_bits_[0] &= ~0x00000004u; -} -inline double GroundTruthTrack::_internal_contactcourse() const { - return _impl_.contactcourse_; -} -inline double GroundTruthTrack::contactcourse() const { - // @@protoc_insertion_point(field_get:messages.track.GroundTruthTrack.ContactCourse) - return _internal_contactcourse(); -} -inline void GroundTruthTrack::_internal_set_contactcourse(double value) { - _impl_._has_bits_[0] |= 0x00000004u; - _impl_.contactcourse_ = value; -} -inline void GroundTruthTrack::set_contactcourse(double value) { - _internal_set_contactcourse(value); - // @@protoc_insertion_point(field_set:messages.track.GroundTruthTrack.ContactCourse) -} - -// optional .messages.track.ESMData ESMData = 6; -inline bool GroundTruthTrack::_internal_has_esmdata() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.esmdata_ != nullptr); - return value; -} -inline bool GroundTruthTrack::has_esmdata() const { - return _internal_has_esmdata(); -} -inline const ::messages::track::ESMData& GroundTruthTrack::_internal_esmdata() const { - const ::messages::track::ESMData* p = _impl_.esmdata_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_ESMData_default_instance_); -} -inline const ::messages::track::ESMData& GroundTruthTrack::esmdata() const { - // @@protoc_insertion_point(field_get:messages.track.GroundTruthTrack.ESMData) - return _internal_esmdata(); -} -inline void GroundTruthTrack::unsafe_arena_set_allocated_esmdata( - ::messages::track::ESMData* esmdata) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.esmdata_); - } - _impl_.esmdata_ = esmdata; - if (esmdata) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.GroundTruthTrack.ESMData) -} -inline ::messages::track::ESMData* GroundTruthTrack::release_esmdata() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::ESMData* temp = _impl_.esmdata_; - _impl_.esmdata_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::ESMData* GroundTruthTrack::unsafe_arena_release_esmdata() { - // @@protoc_insertion_point(field_release:messages.track.GroundTruthTrack.ESMData) - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::ESMData* temp = _impl_.esmdata_; - _impl_.esmdata_ = nullptr; - return temp; -} -inline ::messages::track::ESMData* GroundTruthTrack::_internal_mutable_esmdata() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.esmdata_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::ESMData>(GetArenaForAllocation()); - _impl_.esmdata_ = p; - } - return _impl_.esmdata_; -} -inline ::messages::track::ESMData* GroundTruthTrack::mutable_esmdata() { - ::messages::track::ESMData* _msg = _internal_mutable_esmdata(); - // @@protoc_insertion_point(field_mutable:messages.track.GroundTruthTrack.ESMData) - return _msg; -} -inline void GroundTruthTrack::set_allocated_esmdata(::messages::track::ESMData* esmdata) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.esmdata_); - } - if (esmdata) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(esmdata)); - if (message_arena != submessage_arena) { - esmdata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, esmdata, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.esmdata_ = esmdata; - // @@protoc_insertion_point(field_set_allocated:messages.track.GroundTruthTrack.ESMData) -} - -// .google.protobuf.Timestamp timestamp = 7; -inline bool GroundTruthTrack::_internal_has_timestamp() const { - return this != internal_default_instance() && _impl_.timestamp_ != nullptr; -} -inline bool GroundTruthTrack::has_timestamp() const { - return _internal_has_timestamp(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& GroundTruthTrack::_internal_timestamp() const { - const ::PROTOBUF_NAMESPACE_ID::Timestamp* p = _impl_.timestamp_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& GroundTruthTrack::timestamp() const { - // @@protoc_insertion_point(field_get:messages.track.GroundTruthTrack.timestamp) - return _internal_timestamp(); -} -inline void GroundTruthTrack::unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - _impl_.timestamp_ = timestamp; - if (timestamp) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.GroundTruthTrack.timestamp) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* GroundTruthTrack::release_timestamp() { - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* GroundTruthTrack::unsafe_arena_release_timestamp() { - // @@protoc_insertion_point(field_release:messages.track.GroundTruthTrack.timestamp) - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* GroundTruthTrack::_internal_mutable_timestamp() { - - if (_impl_.timestamp_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaForAllocation()); - _impl_.timestamp_ = p; - } - return _impl_.timestamp_; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* GroundTruthTrack::mutable_timestamp() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_timestamp(); - // @@protoc_insertion_point(field_mutable:messages.track.GroundTruthTrack.timestamp) - return _msg; -} -inline void GroundTruthTrack::set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - if (timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timestamp)); - if (message_arena != submessage_arena) { - timestamp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, timestamp, submessage_arena); - } - - } else { - - } - _impl_.timestamp_ = timestamp; - // @@protoc_insertion_point(field_set_allocated:messages.track.GroundTruthTrack.timestamp) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace track -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_GroundTruthTrack_2eproto diff --git a/include/SimCore/Messages/Protos/GroundTruthTrack.proto b/include/SimCore/Messages/Protos/GroundTruthTrack.proto deleted file mode 100644 index 6dee74f..0000000 --- a/include/SimCore/Messages/Protos/GroundTruthTrack.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package messages.track; - -import "Identifier.proto"; -import "ESMData.proto"; -import "GeocentricPosition.proto"; -import "google/protobuf/timestamp.proto"; - - -message GroundTruthTrack -{ -uint32 TrackKind = 1; -messages.track.Identifier EntityIdentifier = 2; -messages.track.EntityGeocentricPosition GeocentricPosition = 3; -optional double ContactSpeed = 4; -optional double ContactCourse = 5; - -optional messages.track.ESMData ESMData = 6; - -google.protobuf.Timestamp timestamp = 7; - -} \ No newline at end of file diff --git a/include/SimCore/Messages/Protos/Identifier.pb.cc b/include/SimCore/Messages/Protos/Identifier.pb.cc index 7e15794..52c887a 100644 --- a/include/SimCore/Messages/Protos/Identifier.pb.cc +++ b/include/SimCore/Messages/Protos/Identifier.pb.cc @@ -25,8 +25,6 @@ namespace track { PROTOBUF_CONSTEXPR Identifier::Identifier( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.uuid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.parent_)*/0u - , /*decltype(_impl_.number_)*/0u , /*decltype(_impl_.external_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} struct IdentifierDefaultTypeInternal { @@ -51,8 +49,6 @@ const uint32_t TableStruct_Identifier_2eproto::offsets[] PROTOBUF_SECTION_VARIAB ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::track::Identifier, _impl_.parent_), - PROTOBUF_FIELD_OFFSET(::messages::track::Identifier, _impl_.number_), PROTOBUF_FIELD_OFFSET(::messages::track::Identifier, _impl_.external_), PROTOBUF_FIELD_OFFSET(::messages::track::Identifier, _impl_.uuid_), }; @@ -65,13 +61,13 @@ static const ::_pb::Message* const file_default_instances[] = { }; const char descriptor_table_protodef_Identifier_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\020Identifier.proto\022\016messages.track\"L\n\nId" - "entifier\022\016\n\006parent\030\001 \001(\r\022\016\n\006number\030\002 \001(\r" - "\022\020\n\010external\030\003 \001(\010\022\014\n\004uuid\030\004 \001(\tb\006proto3" + "\n\020Identifier.proto\022\016messages.track\",\n\nId" + "entifier\022\020\n\010external\030\001 \001(\010\022\014\n\004uuid\030\002 \001(\t" + "b\006proto3" ; static ::_pbi::once_flag descriptor_table_Identifier_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Identifier_2eproto = { - false, false, 120, descriptor_table_protodef_Identifier_2eproto, + false, false, 88, descriptor_table_protodef_Identifier_2eproto, "Identifier.proto", &descriptor_table_Identifier_2eproto_once, nullptr, 0, 1, schemas, file_default_instances, TableStruct_Identifier_2eproto::offsets, @@ -104,8 +100,6 @@ Identifier::Identifier(const Identifier& from) Identifier* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.uuid_){} - , decltype(_impl_.parent_){} - , decltype(_impl_.number_){} , decltype(_impl_.external_){} , /*decltype(_impl_._cached_size_)*/{}}; @@ -118,9 +112,7 @@ Identifier::Identifier(const Identifier& from) _this->_impl_.uuid_.Set(from._internal_uuid(), _this->GetArenaForAllocation()); } - ::memcpy(&_impl_.parent_, &from._impl_.parent_, - static_cast(reinterpret_cast(&_impl_.external_) - - reinterpret_cast(&_impl_.parent_)) + sizeof(_impl_.external_)); + _this->_impl_.external_ = from._impl_.external_; // @@protoc_insertion_point(copy_constructor:messages.track.Identifier) } @@ -130,8 +122,6 @@ inline void Identifier::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.uuid_){} - , decltype(_impl_.parent_){0u} - , decltype(_impl_.number_){0u} , decltype(_impl_.external_){false} , /*decltype(_impl_._cached_size_)*/{} }; @@ -166,9 +156,7 @@ void Identifier::Clear() { (void) cached_has_bits; _impl_.uuid_.ClearToEmpty(); - ::memset(&_impl_.parent_, 0, static_cast( - reinterpret_cast(&_impl_.external_) - - reinterpret_cast(&_impl_.parent_)) + sizeof(_impl_.external_)); + _impl_.external_ = false; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -178,33 +166,17 @@ const char* Identifier::_InternalParse(const char* ptr, ::_pbi::ParseContext* ct uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // uint32 parent = 1; + // bool external = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.parent_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 number = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool external = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { _impl_.external_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // string uuid = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + // string uuid = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { auto str = _internal_mutable_uuid(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); @@ -241,32 +213,20 @@ uint8_t* Identifier::_InternalSerialize( uint32_t cached_has_bits = 0; (void) cached_has_bits; - // uint32 parent = 1; - if (this->_internal_parent() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_parent(), target); - } - - // uint32 number = 2; - if (this->_internal_number() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_number(), target); - } - - // bool external = 3; + // bool external = 1; if (this->_internal_external() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_external(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_external(), target); } - // string uuid = 4; + // string uuid = 2; if (!this->_internal_uuid().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_uuid().data(), static_cast(this->_internal_uuid().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "messages.track.Identifier.uuid"); target = stream->WriteStringMaybeAliased( - 4, this->_internal_uuid(), target); + 2, this->_internal_uuid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -285,24 +245,14 @@ size_t Identifier::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string uuid = 4; + // string uuid = 2; if (!this->_internal_uuid().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_uuid()); } - // uint32 parent = 1; - if (this->_internal_parent() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_parent()); - } - - // uint32 number = 2; - if (this->_internal_number() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_number()); - } - - // bool external = 3; + // bool external = 1; if (this->_internal_external() != 0) { total_size += 1 + 1; } @@ -328,12 +278,6 @@ void Identifier::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PRO if (!from._internal_uuid().empty()) { _this->_internal_set_uuid(from._internal_uuid()); } - if (from._internal_parent() != 0) { - _this->_internal_set_parent(from._internal_parent()); - } - if (from._internal_number() != 0) { - _this->_internal_set_number(from._internal_number()); - } if (from._internal_external() != 0) { _this->_internal_set_external(from._internal_external()); } @@ -360,12 +304,7 @@ void Identifier::InternalSwap(Identifier* other) { &_impl_.uuid_, lhs_arena, &other->_impl_.uuid_, rhs_arena ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Identifier, _impl_.external_) - + sizeof(Identifier::_impl_.external_) - - PROTOBUF_FIELD_OFFSET(Identifier, _impl_.parent_)>( - reinterpret_cast(&_impl_.parent_), - reinterpret_cast(&other->_impl_.parent_)); + swap(_impl_.external_, other->_impl_.external_); } ::PROTOBUF_NAMESPACE_ID::Metadata Identifier::GetMetadata() const { diff --git a/include/SimCore/Messages/Protos/Identifier.pb.h b/include/SimCore/Messages/Protos/Identifier.pb.h index 0618872..820b1b7 100644 --- a/include/SimCore/Messages/Protos/Identifier.pb.h +++ b/include/SimCore/Messages/Protos/Identifier.pb.h @@ -180,12 +180,10 @@ class Identifier final : // accessors ------------------------------------------------------- enum : int { - kUuidFieldNumber = 4, - kParentFieldNumber = 1, - kNumberFieldNumber = 2, - kExternalFieldNumber = 3, + kUuidFieldNumber = 2, + kExternalFieldNumber = 1, }; - // string uuid = 4; + // string uuid = 2; void clear_uuid(); const std::string& uuid() const; template @@ -199,25 +197,7 @@ class Identifier final : std::string* _internal_mutable_uuid(); public: - // uint32 parent = 1; - void clear_parent(); - uint32_t parent() const; - void set_parent(uint32_t value); - private: - uint32_t _internal_parent() const; - void _internal_set_parent(uint32_t value); - public: - - // uint32 number = 2; - void clear_number(); - uint32_t number() const; - void set_number(uint32_t value); - private: - uint32_t _internal_number() const; - void _internal_set_number(uint32_t value); - public: - - // bool external = 3; + // bool external = 1; void clear_external(); bool external() const; void set_external(bool value); @@ -235,8 +215,6 @@ class Identifier final : typedef void DestructorSkippable_; struct Impl_ { ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr uuid_; - uint32_t parent_; - uint32_t number_; bool external_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; @@ -254,47 +232,7 @@ class Identifier final : #endif // __GNUC__ // Identifier -// uint32 parent = 1; -inline void Identifier::clear_parent() { - _impl_.parent_ = 0u; -} -inline uint32_t Identifier::_internal_parent() const { - return _impl_.parent_; -} -inline uint32_t Identifier::parent() const { - // @@protoc_insertion_point(field_get:messages.track.Identifier.parent) - return _internal_parent(); -} -inline void Identifier::_internal_set_parent(uint32_t value) { - - _impl_.parent_ = value; -} -inline void Identifier::set_parent(uint32_t value) { - _internal_set_parent(value); - // @@protoc_insertion_point(field_set:messages.track.Identifier.parent) -} - -// uint32 number = 2; -inline void Identifier::clear_number() { - _impl_.number_ = 0u; -} -inline uint32_t Identifier::_internal_number() const { - return _impl_.number_; -} -inline uint32_t Identifier::number() const { - // @@protoc_insertion_point(field_get:messages.track.Identifier.number) - return _internal_number(); -} -inline void Identifier::_internal_set_number(uint32_t value) { - - _impl_.number_ = value; -} -inline void Identifier::set_number(uint32_t value) { - _internal_set_number(value); - // @@protoc_insertion_point(field_set:messages.track.Identifier.number) -} - -// bool external = 3; +// bool external = 1; inline void Identifier::clear_external() { _impl_.external_ = false; } @@ -314,7 +252,7 @@ inline void Identifier::set_external(bool value) { // @@protoc_insertion_point(field_set:messages.track.Identifier.external) } -// string uuid = 4; +// string uuid = 2; inline void Identifier::clear_uuid() { _impl_.uuid_.ClearToEmpty(); } diff --git a/include/SimCore/Messages/Protos/Identifier.proto b/include/SimCore/Messages/Protos/Identifier.proto index 3eaf996..96eb0c5 100644 --- a/include/SimCore/Messages/Protos/Identifier.proto +++ b/include/SimCore/Messages/Protos/Identifier.proto @@ -2,8 +2,6 @@ package messages.track; message Identifier{ - uint32 parent = 1; - uint32 number = 2; - bool external = 3; - string uuid = 4; + bool external = 1; + string uuid = 2; } \ No newline at end of file diff --git a/include/SimCore/Messages/Protos/RadarTrack.pb.cc b/include/SimCore/Messages/Protos/RadarTrack.pb.cc deleted file mode 100644 index daae8aa..0000000 --- a/include/SimCore/Messages/Protos/RadarTrack.pb.cc +++ /dev/null @@ -1,548 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: RadarTrack.proto - -#include "RadarTrack.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace track { -PROTOBUF_CONSTEXPR RadarTrack::RadarTrack( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.radarid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.geocentricposition_)*/nullptr - , /*decltype(_impl_.contactspeed_)*/0 - , /*decltype(_impl_.contactcourse_)*/0 - , /*decltype(_impl_.contactbearing_)*/0 - , /*decltype(_impl_.contactrange_)*/0 - , /*decltype(_impl_.contactenvironemnt_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RadarTrackDefaultTypeInternal { - PROTOBUF_CONSTEXPR RadarTrackDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RadarTrackDefaultTypeInternal() {} - union { - RadarTrack _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RadarTrackDefaultTypeInternal _RadarTrack_default_instance_; -} // namespace track -} // namespace messages -static ::_pb::Metadata file_level_metadata_RadarTrack_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_RadarTrack_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_RadarTrack_2eproto = nullptr; - -const uint32_t TableStruct_RadarTrack_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _impl_.radarid_), - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _impl_.geocentricposition_), - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _impl_.contactspeed_), - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _impl_.contactcourse_), - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _impl_.contactbearing_), - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _impl_.contactrange_), - PROTOBUF_FIELD_OFFSET(::messages::track::RadarTrack, _impl_.contactenvironemnt_), -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::messages::track::RadarTrack)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::track::_RadarTrack_default_instance_._instance, -}; - -const char descriptor_table_protodef_RadarTrack_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\020RadarTrack.proto\022\016messages.track\032\030Geoc" - "entricPosition.proto\032\020Identifier.proto\032\037" - "google/protobuf/timestamp.proto\"\332\001\n\nRada" - "rTrack\022\017\n\007RadarID\030\001 \001(\t\022D\n\022GeocentricPos" - "ition\030\003 \001(\0132(.messages.track.EntityGeoce" - "ntricPosition\022\024\n\014ContactSpeed\030\004 \001(\001\022\025\n\rC" - "ontactCourse\030\005 \001(\001\022\026\n\016ContactBearing\030\006 \001" - "(\001\022\024\n\014ContactRange\030\007 \001(\001\022\032\n\022ContactEnvir" - "onemnt\030\010 \001(\rb\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_RadarTrack_2eproto_deps[3] = { - &::descriptor_table_GeocentricPosition_2eproto, - &::descriptor_table_Identifier_2eproto, - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::_pbi::once_flag descriptor_table_RadarTrack_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_RadarTrack_2eproto = { - false, false, 340, descriptor_table_protodef_RadarTrack_2eproto, - "RadarTrack.proto", - &descriptor_table_RadarTrack_2eproto_once, descriptor_table_RadarTrack_2eproto_deps, 3, 1, - schemas, file_default_instances, TableStruct_RadarTrack_2eproto::offsets, - file_level_metadata_RadarTrack_2eproto, file_level_enum_descriptors_RadarTrack_2eproto, - file_level_service_descriptors_RadarTrack_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_RadarTrack_2eproto_getter() { - return &descriptor_table_RadarTrack_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_RadarTrack_2eproto(&descriptor_table_RadarTrack_2eproto); -namespace messages { -namespace track { - -// =================================================================== - -class RadarTrack::_Internal { - public: - static const ::messages::track::EntityGeocentricPosition& geocentricposition(const RadarTrack* msg); -}; - -const ::messages::track::EntityGeocentricPosition& -RadarTrack::_Internal::geocentricposition(const RadarTrack* msg) { - return *msg->_impl_.geocentricposition_; -} -void RadarTrack::clear_geocentricposition() { - if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) { - delete _impl_.geocentricposition_; - } - _impl_.geocentricposition_ = nullptr; -} -RadarTrack::RadarTrack(::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.RadarTrack) -} -RadarTrack::RadarTrack(const RadarTrack& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RadarTrack* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.radarid_){} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.contactspeed_){} - , decltype(_impl_.contactcourse_){} - , decltype(_impl_.contactbearing_){} - , decltype(_impl_.contactrange_){} - , decltype(_impl_.contactenvironemnt_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.radarid_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.radarid_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_radarid().empty()) { - _this->_impl_.radarid_.Set(from._internal_radarid(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_geocentricposition()) { - _this->_impl_.geocentricposition_ = new ::messages::track::EntityGeocentricPosition(*from._impl_.geocentricposition_); - } - ::memcpy(&_impl_.contactspeed_, &from._impl_.contactspeed_, - static_cast(reinterpret_cast(&_impl_.contactenvironemnt_) - - reinterpret_cast(&_impl_.contactspeed_)) + sizeof(_impl_.contactenvironemnt_)); - // @@protoc_insertion_point(copy_constructor:messages.track.RadarTrack) -} - -inline void RadarTrack::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.radarid_){} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.contactspeed_){0} - , decltype(_impl_.contactcourse_){0} - , decltype(_impl_.contactbearing_){0} - , decltype(_impl_.contactrange_){0} - , decltype(_impl_.contactenvironemnt_){0u} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.radarid_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.radarid_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -RadarTrack::~RadarTrack() { - // @@protoc_insertion_point(destructor:messages.track.RadarTrack) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void RadarTrack::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.radarid_.Destroy(); - if (this != internal_default_instance()) delete _impl_.geocentricposition_; -} - -void RadarTrack::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RadarTrack::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.track.RadarTrack) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.radarid_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) { - delete _impl_.geocentricposition_; - } - _impl_.geocentricposition_ = nullptr; - ::memset(&_impl_.contactspeed_, 0, static_cast( - reinterpret_cast(&_impl_.contactenvironemnt_) - - reinterpret_cast(&_impl_.contactspeed_)) + sizeof(_impl_.contactenvironemnt_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RadarTrack::_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) { - // string RadarID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_radarid(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "messages.track.RadarTrack.RadarID")); - } else - goto handle_unusual; - continue; - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_geocentricposition(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // double ContactSpeed = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 33)) { - _impl_.contactspeed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // double ContactCourse = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 41)) { - _impl_.contactcourse_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // double ContactBearing = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 49)) { - _impl_.contactbearing_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // double ContactRange = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 57)) { - _impl_.contactrange_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // uint32 ContactEnvironemnt = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.contactenvironemnt_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } 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* RadarTrack::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.track.RadarTrack) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string RadarID = 1; - if (!this->_internal_radarid().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_radarid().data(), static_cast(this->_internal_radarid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "messages.track.RadarTrack.RadarID"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_radarid(), target); - } - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - if (this->_internal_has_geocentricposition()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::geocentricposition(this), - _Internal::geocentricposition(this).GetCachedSize(), target, stream); - } - - // double ContactSpeed = 4; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactspeed = this->_internal_contactspeed(); - uint64_t raw_contactspeed; - memcpy(&raw_contactspeed, &tmp_contactspeed, sizeof(tmp_contactspeed)); - if (raw_contactspeed != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_contactspeed(), target); - } - - // double ContactCourse = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactcourse = this->_internal_contactcourse(); - uint64_t raw_contactcourse; - memcpy(&raw_contactcourse, &tmp_contactcourse, sizeof(tmp_contactcourse)); - if (raw_contactcourse != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_contactcourse(), target); - } - - // double ContactBearing = 6; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactbearing = this->_internal_contactbearing(); - uint64_t raw_contactbearing; - memcpy(&raw_contactbearing, &tmp_contactbearing, sizeof(tmp_contactbearing)); - if (raw_contactbearing != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_contactbearing(), target); - } - - // double ContactRange = 7; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactrange = this->_internal_contactrange(); - uint64_t raw_contactrange; - memcpy(&raw_contactrange, &tmp_contactrange, sizeof(tmp_contactrange)); - if (raw_contactrange != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(7, this->_internal_contactrange(), target); - } - - // uint32 ContactEnvironemnt = 8; - if (this->_internal_contactenvironemnt() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_contactenvironemnt(), 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.RadarTrack) - return target; -} - -size_t RadarTrack::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.track.RadarTrack) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string RadarID = 1; - if (!this->_internal_radarid().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_radarid()); - } - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - if (this->_internal_has_geocentricposition()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.geocentricposition_); - } - - // double ContactSpeed = 4; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactspeed = this->_internal_contactspeed(); - uint64_t raw_contactspeed; - memcpy(&raw_contactspeed, &tmp_contactspeed, sizeof(tmp_contactspeed)); - if (raw_contactspeed != 0) { - total_size += 1 + 8; - } - - // double ContactCourse = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactcourse = this->_internal_contactcourse(); - uint64_t raw_contactcourse; - memcpy(&raw_contactcourse, &tmp_contactcourse, sizeof(tmp_contactcourse)); - if (raw_contactcourse != 0) { - total_size += 1 + 8; - } - - // double ContactBearing = 6; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactbearing = this->_internal_contactbearing(); - uint64_t raw_contactbearing; - memcpy(&raw_contactbearing, &tmp_contactbearing, sizeof(tmp_contactbearing)); - if (raw_contactbearing != 0) { - total_size += 1 + 8; - } - - // double ContactRange = 7; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactrange = this->_internal_contactrange(); - uint64_t raw_contactrange; - memcpy(&raw_contactrange, &tmp_contactrange, sizeof(tmp_contactrange)); - if (raw_contactrange != 0) { - total_size += 1 + 8; - } - - // uint32 ContactEnvironemnt = 8; - if (this->_internal_contactenvironemnt() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_contactenvironemnt()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RadarTrack::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RadarTrack::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RadarTrack::GetClassData() const { return &_class_data_; } - - -void RadarTrack::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.track.RadarTrack) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_radarid().empty()) { - _this->_internal_set_radarid(from._internal_radarid()); - } - if (from._internal_has_geocentricposition()) { - _this->_internal_mutable_geocentricposition()->::messages::track::EntityGeocentricPosition::MergeFrom( - from._internal_geocentricposition()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactspeed = from._internal_contactspeed(); - uint64_t raw_contactspeed; - memcpy(&raw_contactspeed, &tmp_contactspeed, sizeof(tmp_contactspeed)); - if (raw_contactspeed != 0) { - _this->_internal_set_contactspeed(from._internal_contactspeed()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactcourse = from._internal_contactcourse(); - uint64_t raw_contactcourse; - memcpy(&raw_contactcourse, &tmp_contactcourse, sizeof(tmp_contactcourse)); - if (raw_contactcourse != 0) { - _this->_internal_set_contactcourse(from._internal_contactcourse()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactbearing = from._internal_contactbearing(); - uint64_t raw_contactbearing; - memcpy(&raw_contactbearing, &tmp_contactbearing, sizeof(tmp_contactbearing)); - if (raw_contactbearing != 0) { - _this->_internal_set_contactbearing(from._internal_contactbearing()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_contactrange = from._internal_contactrange(); - uint64_t raw_contactrange; - memcpy(&raw_contactrange, &tmp_contactrange, sizeof(tmp_contactrange)); - if (raw_contactrange != 0) { - _this->_internal_set_contactrange(from._internal_contactrange()); - } - if (from._internal_contactenvironemnt() != 0) { - _this->_internal_set_contactenvironemnt(from._internal_contactenvironemnt()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void RadarTrack::CopyFrom(const RadarTrack& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.track.RadarTrack) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool RadarTrack::IsInitialized() const { - return true; -} - -void RadarTrack::InternalSwap(RadarTrack* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.radarid_, lhs_arena, - &other->_impl_.radarid_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(RadarTrack, _impl_.contactenvironemnt_) - + sizeof(RadarTrack::_impl_.contactenvironemnt_) - - PROTOBUF_FIELD_OFFSET(RadarTrack, _impl_.geocentricposition_)>( - reinterpret_cast(&_impl_.geocentricposition_), - reinterpret_cast(&other->_impl_.geocentricposition_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata RadarTrack::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_RadarTrack_2eproto_getter, &descriptor_table_RadarTrack_2eproto_once, - file_level_metadata_RadarTrack_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::track::RadarTrack* -Arena::CreateMaybeMessage< ::messages::track::RadarTrack >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::track::RadarTrack >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/SimCore/Messages/Protos/RadarTrack.pb.h b/include/SimCore/Messages/Protos/RadarTrack.pb.h deleted file mode 100644 index 5f0cd0b..0000000 --- a/include/SimCore/Messages/Protos/RadarTrack.pb.h +++ /dev/null @@ -1,549 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: RadarTrack.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_RadarTrack_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_RadarTrack_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include "GeocentricPosition.pb.h" -#include "Identifier.pb.h" -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_RadarTrack_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_RadarTrack_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_RadarTrack_2eproto; -namespace messages { -namespace track { -class RadarTrack; -struct RadarTrackDefaultTypeInternal; -extern RadarTrackDefaultTypeInternal _RadarTrack_default_instance_; -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::track::RadarTrack* Arena::CreateMaybeMessage<::messages::track::RadarTrack>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace track { - -// =================================================================== - -class RadarTrack final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.track.RadarTrack) */ { - public: - inline RadarTrack() : RadarTrack(nullptr) {} - ~RadarTrack() override; - explicit PROTOBUF_CONSTEXPR RadarTrack(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - RadarTrack(const RadarTrack& from); - RadarTrack(RadarTrack&& from) noexcept - : RadarTrack() { - *this = ::std::move(from); - } - - inline RadarTrack& operator=(const RadarTrack& from) { - CopyFrom(from); - return *this; - } - inline RadarTrack& operator=(RadarTrack&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const RadarTrack& default_instance() { - return *internal_default_instance(); - } - static inline const RadarTrack* internal_default_instance() { - return reinterpret_cast( - &_RadarTrack_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(RadarTrack& a, RadarTrack& b) { - a.Swap(&b); - } - inline void Swap(RadarTrack* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(RadarTrack* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - RadarTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RadarTrack& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RadarTrack& from) { - RadarTrack::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RadarTrack* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.track.RadarTrack"; - } - protected: - explicit RadarTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kRadarIDFieldNumber = 1, - kGeocentricPositionFieldNumber = 3, - kContactSpeedFieldNumber = 4, - kContactCourseFieldNumber = 5, - kContactBearingFieldNumber = 6, - kContactRangeFieldNumber = 7, - kContactEnvironemntFieldNumber = 8, - }; - // string RadarID = 1; - void clear_radarid(); - const std::string& radarid() const; - template - void set_radarid(ArgT0&& arg0, ArgT... args); - std::string* mutable_radarid(); - PROTOBUF_NODISCARD std::string* release_radarid(); - void set_allocated_radarid(std::string* radarid); - private: - const std::string& _internal_radarid() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_radarid(const std::string& value); - std::string* _internal_mutable_radarid(); - public: - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 3; - bool has_geocentricposition() const; - private: - bool _internal_has_geocentricposition() const; - public: - void clear_geocentricposition(); - const ::messages::track::EntityGeocentricPosition& geocentricposition() const; - PROTOBUF_NODISCARD ::messages::track::EntityGeocentricPosition* release_geocentricposition(); - ::messages::track::EntityGeocentricPosition* mutable_geocentricposition(); - void set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition); - private: - const ::messages::track::EntityGeocentricPosition& _internal_geocentricposition() const; - ::messages::track::EntityGeocentricPosition* _internal_mutable_geocentricposition(); - public: - void unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition); - ::messages::track::EntityGeocentricPosition* unsafe_arena_release_geocentricposition(); - - // double ContactSpeed = 4; - void clear_contactspeed(); - double contactspeed() const; - void set_contactspeed(double value); - private: - double _internal_contactspeed() const; - void _internal_set_contactspeed(double value); - public: - - // double ContactCourse = 5; - void clear_contactcourse(); - double contactcourse() const; - void set_contactcourse(double value); - private: - double _internal_contactcourse() const; - void _internal_set_contactcourse(double value); - public: - - // double ContactBearing = 6; - void clear_contactbearing(); - double contactbearing() const; - void set_contactbearing(double value); - private: - double _internal_contactbearing() const; - void _internal_set_contactbearing(double value); - public: - - // double ContactRange = 7; - void clear_contactrange(); - double contactrange() const; - void set_contactrange(double value); - private: - double _internal_contactrange() const; - void _internal_set_contactrange(double value); - public: - - // uint32 ContactEnvironemnt = 8; - void clear_contactenvironemnt(); - uint32_t contactenvironemnt() const; - void set_contactenvironemnt(uint32_t value); - private: - uint32_t _internal_contactenvironemnt() const; - void _internal_set_contactenvironemnt(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:messages.track.RadarTrack) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr radarid_; - ::messages::track::EntityGeocentricPosition* geocentricposition_; - double contactspeed_; - double contactcourse_; - double contactbearing_; - double contactrange_; - uint32_t contactenvironemnt_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_RadarTrack_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// RadarTrack - -// string RadarID = 1; -inline void RadarTrack::clear_radarid() { - _impl_.radarid_.ClearToEmpty(); -} -inline const std::string& RadarTrack::radarid() const { - // @@protoc_insertion_point(field_get:messages.track.RadarTrack.RadarID) - return _internal_radarid(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void RadarTrack::set_radarid(ArgT0&& arg0, ArgT... args) { - - _impl_.radarid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:messages.track.RadarTrack.RadarID) -} -inline std::string* RadarTrack::mutable_radarid() { - std::string* _s = _internal_mutable_radarid(); - // @@protoc_insertion_point(field_mutable:messages.track.RadarTrack.RadarID) - return _s; -} -inline const std::string& RadarTrack::_internal_radarid() const { - return _impl_.radarid_.Get(); -} -inline void RadarTrack::_internal_set_radarid(const std::string& value) { - - _impl_.radarid_.Set(value, GetArenaForAllocation()); -} -inline std::string* RadarTrack::_internal_mutable_radarid() { - - return _impl_.radarid_.Mutable(GetArenaForAllocation()); -} -inline std::string* RadarTrack::release_radarid() { - // @@protoc_insertion_point(field_release:messages.track.RadarTrack.RadarID) - return _impl_.radarid_.Release(); -} -inline void RadarTrack::set_allocated_radarid(std::string* radarid) { - if (radarid != nullptr) { - - } else { - - } - _impl_.radarid_.SetAllocated(radarid, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.radarid_.IsDefault()) { - _impl_.radarid_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:messages.track.RadarTrack.RadarID) -} - -// .messages.track.EntityGeocentricPosition GeocentricPosition = 3; -inline bool RadarTrack::_internal_has_geocentricposition() const { - return this != internal_default_instance() && _impl_.geocentricposition_ != nullptr; -} -inline bool RadarTrack::has_geocentricposition() const { - return _internal_has_geocentricposition(); -} -inline const ::messages::track::EntityGeocentricPosition& RadarTrack::_internal_geocentricposition() const { - const ::messages::track::EntityGeocentricPosition* p = _impl_.geocentricposition_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_EntityGeocentricPosition_default_instance_); -} -inline const ::messages::track::EntityGeocentricPosition& RadarTrack::geocentricposition() const { - // @@protoc_insertion_point(field_get:messages.track.RadarTrack.GeocentricPosition) - return _internal_geocentricposition(); -} -inline void RadarTrack::unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - _impl_.geocentricposition_ = geocentricposition; - if (geocentricposition) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.RadarTrack.GeocentricPosition) -} -inline ::messages::track::EntityGeocentricPosition* RadarTrack::release_geocentricposition() { - - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::EntityGeocentricPosition* RadarTrack::unsafe_arena_release_geocentricposition() { - // @@protoc_insertion_point(field_release:messages.track.RadarTrack.GeocentricPosition) - - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; - return temp; -} -inline ::messages::track::EntityGeocentricPosition* RadarTrack::_internal_mutable_geocentricposition() { - - if (_impl_.geocentricposition_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::EntityGeocentricPosition>(GetArenaForAllocation()); - _impl_.geocentricposition_ = p; - } - return _impl_.geocentricposition_; -} -inline ::messages::track::EntityGeocentricPosition* RadarTrack::mutable_geocentricposition() { - ::messages::track::EntityGeocentricPosition* _msg = _internal_mutable_geocentricposition(); - // @@protoc_insertion_point(field_mutable:messages.track.RadarTrack.GeocentricPosition) - return _msg; -} -inline void RadarTrack::set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - if (geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(geocentricposition)); - if (message_arena != submessage_arena) { - geocentricposition = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, geocentricposition, submessage_arena); - } - - } else { - - } - _impl_.geocentricposition_ = geocentricposition; - // @@protoc_insertion_point(field_set_allocated:messages.track.RadarTrack.GeocentricPosition) -} - -// double ContactSpeed = 4; -inline void RadarTrack::clear_contactspeed() { - _impl_.contactspeed_ = 0; -} -inline double RadarTrack::_internal_contactspeed() const { - return _impl_.contactspeed_; -} -inline double RadarTrack::contactspeed() const { - // @@protoc_insertion_point(field_get:messages.track.RadarTrack.ContactSpeed) - return _internal_contactspeed(); -} -inline void RadarTrack::_internal_set_contactspeed(double value) { - - _impl_.contactspeed_ = value; -} -inline void RadarTrack::set_contactspeed(double value) { - _internal_set_contactspeed(value); - // @@protoc_insertion_point(field_set:messages.track.RadarTrack.ContactSpeed) -} - -// double ContactCourse = 5; -inline void RadarTrack::clear_contactcourse() { - _impl_.contactcourse_ = 0; -} -inline double RadarTrack::_internal_contactcourse() const { - return _impl_.contactcourse_; -} -inline double RadarTrack::contactcourse() const { - // @@protoc_insertion_point(field_get:messages.track.RadarTrack.ContactCourse) - return _internal_contactcourse(); -} -inline void RadarTrack::_internal_set_contactcourse(double value) { - - _impl_.contactcourse_ = value; -} -inline void RadarTrack::set_contactcourse(double value) { - _internal_set_contactcourse(value); - // @@protoc_insertion_point(field_set:messages.track.RadarTrack.ContactCourse) -} - -// double ContactBearing = 6; -inline void RadarTrack::clear_contactbearing() { - _impl_.contactbearing_ = 0; -} -inline double RadarTrack::_internal_contactbearing() const { - return _impl_.contactbearing_; -} -inline double RadarTrack::contactbearing() const { - // @@protoc_insertion_point(field_get:messages.track.RadarTrack.ContactBearing) - return _internal_contactbearing(); -} -inline void RadarTrack::_internal_set_contactbearing(double value) { - - _impl_.contactbearing_ = value; -} -inline void RadarTrack::set_contactbearing(double value) { - _internal_set_contactbearing(value); - // @@protoc_insertion_point(field_set:messages.track.RadarTrack.ContactBearing) -} - -// double ContactRange = 7; -inline void RadarTrack::clear_contactrange() { - _impl_.contactrange_ = 0; -} -inline double RadarTrack::_internal_contactrange() const { - return _impl_.contactrange_; -} -inline double RadarTrack::contactrange() const { - // @@protoc_insertion_point(field_get:messages.track.RadarTrack.ContactRange) - return _internal_contactrange(); -} -inline void RadarTrack::_internal_set_contactrange(double value) { - - _impl_.contactrange_ = value; -} -inline void RadarTrack::set_contactrange(double value) { - _internal_set_contactrange(value); - // @@protoc_insertion_point(field_set:messages.track.RadarTrack.ContactRange) -} - -// uint32 ContactEnvironemnt = 8; -inline void RadarTrack::clear_contactenvironemnt() { - _impl_.contactenvironemnt_ = 0u; -} -inline uint32_t RadarTrack::_internal_contactenvironemnt() const { - return _impl_.contactenvironemnt_; -} -inline uint32_t RadarTrack::contactenvironemnt() const { - // @@protoc_insertion_point(field_get:messages.track.RadarTrack.ContactEnvironemnt) - return _internal_contactenvironemnt(); -} -inline void RadarTrack::_internal_set_contactenvironemnt(uint32_t value) { - - _impl_.contactenvironemnt_ = value; -} -inline void RadarTrack::set_contactenvironemnt(uint32_t value) { - _internal_set_contactenvironemnt(value); - // @@protoc_insertion_point(field_set:messages.track.RadarTrack.ContactEnvironemnt) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace track -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_RadarTrack_2eproto diff --git a/include/SimCore/Messages/Protos/RadarTrack.proto b/include/SimCore/Messages/Protos/RadarTrack.proto deleted file mode 100644 index 08dfb0c..0000000 --- a/include/SimCore/Messages/Protos/RadarTrack.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package messages.track; - -import "GeocentricPosition.proto"; -import "Identifier.proto"; -import "google/protobuf/timestamp.proto"; - - -message RadarTrack { - - string RadarID = 1; - // messages.track.Identifier EntityIdentifier = 2; - messages.track.EntityGeocentricPosition GeocentricPosition = 3; - double ContactSpeed = 4; - double ContactCourse = 5; - double ContactBearing = 6; - double ContactRange = 7; - uint32 ContactEnvironemnt = 8; - // google.protobuf.Timestamp timestamp = 9; - - -} \ No newline at end of file diff --git a/include/SimCore/Messages/Protos/SensorTrack.pb.cc b/include/SimCore/Messages/Protos/SensorTrack.pb.cc deleted file mode 100644 index 233841a..0000000 --- a/include/SimCore/Messages/Protos/SensorTrack.pb.cc +++ /dev/null @@ -1,620 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: SensorTrack.proto - -#include "SensorTrack.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace track { -PROTOBUF_CONSTEXPR SensorTrack::SensorTrack( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.sensorid_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.entityidentifier_)*/nullptr - , /*decltype(_impl_.radartrack_)*/nullptr - , /*decltype(_impl_.esmtrack_)*/nullptr - , /*decltype(_impl_.timestamp_)*/nullptr - , /*decltype(_impl_.duration_)*/nullptr - , /*decltype(_impl_.trackkind_)*/0u} {} -struct SensorTrackDefaultTypeInternal { - PROTOBUF_CONSTEXPR SensorTrackDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~SensorTrackDefaultTypeInternal() {} - union { - SensorTrack _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SensorTrackDefaultTypeInternal _SensorTrack_default_instance_; -} // namespace track -} // namespace messages -static ::_pb::Metadata file_level_metadata_SensorTrack_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_SensorTrack_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_SensorTrack_2eproto = nullptr; - -const uint32_t TableStruct_SensorTrack_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_.entityidentifier_), - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_.sensorid_), - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_.trackkind_), - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_.radartrack_), - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_.esmtrack_), - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_.timestamp_), - PROTOBUF_FIELD_OFFSET(::messages::track::SensorTrack, _impl_.duration_), - ~0u, - ~0u, - ~0u, - 0, - 1, - ~0u, - ~0u, -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 13, -1, sizeof(::messages::track::SensorTrack)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::track::_SensorTrack_default_instance_._instance, -}; - -const char descriptor_table_protodef_SensorTrack_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\021SensorTrack.proto\022\016messages.track\032\037goo" - "gle/protobuf/timestamp.proto\032\036google/pro" - "tobuf/duration.proto\032\020Identifier.proto\032\020" - "RadarTrack.proto\032\016ESMTrack.proto\"\306\002\n\013Sen" - "sorTrack\0224\n\020EntityIdentifier\030\001 \001(\0132\032.mes" - "sages.track.Identifier\022\020\n\010SensorID\030\002 \001(\t" - "\022\021\n\tTrackKind\030\003 \001(\r\0223\n\nRadarTrack\030\004 \001(\0132" - "\032.messages.track.RadarTrackH\000\210\001\001\022/\n\010ESMT" - "rack\030\005 \001(\0132\030.messages.track.ESMTrackH\001\210\001" - "\001\022-\n\ttimestamp\030\006 \001(\0132\032.google.protobuf.T" - "imestamp\022+\n\010duration\030\007 \001(\0132\031.google.prot" - "obuf.DurationB\r\n\013_RadarTrackB\013\n\t_ESMTrac" - "kb\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_SensorTrack_2eproto_deps[5] = { - &::descriptor_table_ESMTrack_2eproto, - &::descriptor_table_Identifier_2eproto, - &::descriptor_table_RadarTrack_2eproto, - &::descriptor_table_google_2fprotobuf_2fduration_2eproto, - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::_pbi::once_flag descriptor_table_SensorTrack_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_SensorTrack_2eproto = { - false, false, 489, descriptor_table_protodef_SensorTrack_2eproto, - "SensorTrack.proto", - &descriptor_table_SensorTrack_2eproto_once, descriptor_table_SensorTrack_2eproto_deps, 5, 1, - schemas, file_default_instances, TableStruct_SensorTrack_2eproto::offsets, - file_level_metadata_SensorTrack_2eproto, file_level_enum_descriptors_SensorTrack_2eproto, - file_level_service_descriptors_SensorTrack_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_SensorTrack_2eproto_getter() { - return &descriptor_table_SensorTrack_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_SensorTrack_2eproto(&descriptor_table_SensorTrack_2eproto); -namespace messages { -namespace track { - -// =================================================================== - -class SensorTrack::_Internal { - public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::messages::track::Identifier& entityidentifier(const SensorTrack* msg); - static const ::messages::track::RadarTrack& radartrack(const SensorTrack* msg); - static void set_has_radartrack(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static const ::messages::track::ESMTrack& esmtrack(const SensorTrack* msg); - static void set_has_esmtrack(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } - static const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp(const SensorTrack* msg); - static const ::PROTOBUF_NAMESPACE_ID::Duration& duration(const SensorTrack* msg); -}; - -const ::messages::track::Identifier& -SensorTrack::_Internal::entityidentifier(const SensorTrack* msg) { - return *msg->_impl_.entityidentifier_; -} -const ::messages::track::RadarTrack& -SensorTrack::_Internal::radartrack(const SensorTrack* msg) { - return *msg->_impl_.radartrack_; -} -const ::messages::track::ESMTrack& -SensorTrack::_Internal::esmtrack(const SensorTrack* msg) { - return *msg->_impl_.esmtrack_; -} -const ::PROTOBUF_NAMESPACE_ID::Timestamp& -SensorTrack::_Internal::timestamp(const SensorTrack* msg) { - return *msg->_impl_.timestamp_; -} -const ::PROTOBUF_NAMESPACE_ID::Duration& -SensorTrack::_Internal::duration(const SensorTrack* msg) { - return *msg->_impl_.duration_; -} -void SensorTrack::clear_entityidentifier() { - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; -} -void SensorTrack::clear_radartrack() { - if (_impl_.radartrack_ != nullptr) _impl_.radartrack_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -void SensorTrack::clear_esmtrack() { - if (_impl_.esmtrack_ != nullptr) _impl_.esmtrack_->Clear(); - _impl_._has_bits_[0] &= ~0x00000002u; -} -void SensorTrack::clear_timestamp() { - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; -} -void SensorTrack::clear_duration() { - if (GetArenaForAllocation() == nullptr && _impl_.duration_ != nullptr) { - delete _impl_.duration_; - } - _impl_.duration_ = nullptr; -} -SensorTrack::SensorTrack(::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.SensorTrack) -} -SensorTrack::SensorTrack(const SensorTrack& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - SensorTrack* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sensorid_){} - , decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.radartrack_){nullptr} - , decltype(_impl_.esmtrack_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.duration_){nullptr} - , decltype(_impl_.trackkind_){}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.sensorid_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.sensorid_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_sensorid().empty()) { - _this->_impl_.sensorid_.Set(from._internal_sensorid(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_entityidentifier()) { - _this->_impl_.entityidentifier_ = new ::messages::track::Identifier(*from._impl_.entityidentifier_); - } - if (from._internal_has_radartrack()) { - _this->_impl_.radartrack_ = new ::messages::track::RadarTrack(*from._impl_.radartrack_); - } - if (from._internal_has_esmtrack()) { - _this->_impl_.esmtrack_ = new ::messages::track::ESMTrack(*from._impl_.esmtrack_); - } - if (from._internal_has_timestamp()) { - _this->_impl_.timestamp_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.timestamp_); - } - if (from._internal_has_duration()) { - _this->_impl_.duration_ = new ::PROTOBUF_NAMESPACE_ID::Duration(*from._impl_.duration_); - } - _this->_impl_.trackkind_ = from._impl_.trackkind_; - // @@protoc_insertion_point(copy_constructor:messages.track.SensorTrack) -} - -inline void SensorTrack::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.sensorid_){} - , decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.radartrack_){nullptr} - , decltype(_impl_.esmtrack_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.duration_){nullptr} - , decltype(_impl_.trackkind_){0u} - }; - _impl_.sensorid_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.sensorid_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -SensorTrack::~SensorTrack() { - // @@protoc_insertion_point(destructor:messages.track.SensorTrack) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void SensorTrack::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.sensorid_.Destroy(); - if (this != internal_default_instance()) delete _impl_.entityidentifier_; - if (this != internal_default_instance()) delete _impl_.radartrack_; - if (this != internal_default_instance()) delete _impl_.esmtrack_; - if (this != internal_default_instance()) delete _impl_.timestamp_; - if (this != internal_default_instance()) delete _impl_.duration_; -} - -void SensorTrack::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void SensorTrack::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.track.SensorTrack) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.sensorid_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.radartrack_ != nullptr); - _impl_.radartrack_->Clear(); - } - if (cached_has_bits & 0x00000002u) { - GOOGLE_DCHECK(_impl_.esmtrack_ != nullptr); - _impl_.esmtrack_->Clear(); - } - } - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.duration_ != nullptr) { - delete _impl_.duration_; - } - _impl_.duration_ = nullptr; - _impl_.trackkind_ = 0u; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SensorTrack::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .messages.track.Identifier EntityIdentifier = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_entityidentifier(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string SensorID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_sensorid(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "messages.track.SensorTrack.SensorID")); - } else - goto handle_unusual; - continue; - // uint32 TrackKind = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.trackkind_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .messages.track.RadarTrack RadarTrack = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_radartrack(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // optional .messages.track.ESMTrack ESMTrack = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr = ctx->ParseMessage(_internal_mutable_esmtrack(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .google.protobuf.Timestamp timestamp = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr = ctx->ParseMessage(_internal_mutable_timestamp(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .google.protobuf.Duration duration = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { - ptr = ctx->ParseMessage(_internal_mutable_duration(), ptr); - CHK_(ptr); - } 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: - _impl_._has_bits_.Or(has_bits); - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* SensorTrack::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.track.SensorTrack) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .messages.track.Identifier EntityIdentifier = 1; - if (this->_internal_has_entityidentifier()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::entityidentifier(this), - _Internal::entityidentifier(this).GetCachedSize(), target, stream); - } - - // string SensorID = 2; - if (!this->_internal_sensorid().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_sensorid().data(), static_cast(this->_internal_sensorid().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "messages.track.SensorTrack.SensorID"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_sensorid(), target); - } - - // uint32 TrackKind = 3; - if (this->_internal_trackkind() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_trackkind(), target); - } - - // optional .messages.track.RadarTrack RadarTrack = 4; - if (_internal_has_radartrack()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::radartrack(this), - _Internal::radartrack(this).GetCachedSize(), target, stream); - } - - // optional .messages.track.ESMTrack ESMTrack = 5; - if (_internal_has_esmtrack()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(5, _Internal::esmtrack(this), - _Internal::esmtrack(this).GetCachedSize(), target, stream); - } - - // .google.protobuf.Timestamp timestamp = 6; - if (this->_internal_has_timestamp()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(6, _Internal::timestamp(this), - _Internal::timestamp(this).GetCachedSize(), target, stream); - } - - // .google.protobuf.Duration duration = 7; - if (this->_internal_has_duration()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(7, _Internal::duration(this), - _Internal::duration(this).GetCachedSize(), target, stream); - } - - 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.SensorTrack) - return target; -} - -size_t SensorTrack::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.track.SensorTrack) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string SensorID = 2; - if (!this->_internal_sensorid().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_sensorid()); - } - - // .messages.track.Identifier EntityIdentifier = 1; - if (this->_internal_has_entityidentifier()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.entityidentifier_); - } - - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional .messages.track.RadarTrack RadarTrack = 4; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.radartrack_); - } - - // optional .messages.track.ESMTrack ESMTrack = 5; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.esmtrack_); - } - - } - // .google.protobuf.Timestamp timestamp = 6; - if (this->_internal_has_timestamp()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.timestamp_); - } - - // .google.protobuf.Duration duration = 7; - if (this->_internal_has_duration()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.duration_); - } - - // uint32 TrackKind = 3; - if (this->_internal_trackkind() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_trackkind()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SensorTrack::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - SensorTrack::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SensorTrack::GetClassData() const { return &_class_data_; } - - -void SensorTrack::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.track.SensorTrack) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_sensorid().empty()) { - _this->_internal_set_sensorid(from._internal_sensorid()); - } - if (from._internal_has_entityidentifier()) { - _this->_internal_mutable_entityidentifier()->::messages::track::Identifier::MergeFrom( - from._internal_entityidentifier()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_internal_mutable_radartrack()->::messages::track::RadarTrack::MergeFrom( - from._internal_radartrack()); - } - if (cached_has_bits & 0x00000002u) { - _this->_internal_mutable_esmtrack()->::messages::track::ESMTrack::MergeFrom( - from._internal_esmtrack()); - } - } - if (from._internal_has_timestamp()) { - _this->_internal_mutable_timestamp()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom( - from._internal_timestamp()); - } - if (from._internal_has_duration()) { - _this->_internal_mutable_duration()->::PROTOBUF_NAMESPACE_ID::Duration::MergeFrom( - from._internal_duration()); - } - if (from._internal_trackkind() != 0) { - _this->_internal_set_trackkind(from._internal_trackkind()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void SensorTrack::CopyFrom(const SensorTrack& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.track.SensorTrack) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SensorTrack::IsInitialized() const { - return true; -} - -void SensorTrack::InternalSwap(SensorTrack* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.sensorid_, lhs_arena, - &other->_impl_.sensorid_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SensorTrack, _impl_.trackkind_) - + sizeof(SensorTrack::_impl_.trackkind_) - - PROTOBUF_FIELD_OFFSET(SensorTrack, _impl_.entityidentifier_)>( - reinterpret_cast(&_impl_.entityidentifier_), - reinterpret_cast(&other->_impl_.entityidentifier_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SensorTrack::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_SensorTrack_2eproto_getter, &descriptor_table_SensorTrack_2eproto_once, - file_level_metadata_SensorTrack_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::track::SensorTrack* -Arena::CreateMaybeMessage< ::messages::track::SensorTrack >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::track::SensorTrack >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/SimCore/Messages/Protos/SensorTrack.pb.h b/include/SimCore/Messages/Protos/SensorTrack.pb.h deleted file mode 100644 index 7f7e22d..0000000 --- a/include/SimCore/Messages/Protos/SensorTrack.pb.h +++ /dev/null @@ -1,852 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: SensorTrack.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_SensorTrack_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_SensorTrack_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include -#include "Identifier.pb.h" -#include "RadarTrack.pb.h" -#include "ESMTrack.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_SensorTrack_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_SensorTrack_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_SensorTrack_2eproto; -namespace messages { -namespace track { -class SensorTrack; -struct SensorTrackDefaultTypeInternal; -extern SensorTrackDefaultTypeInternal _SensorTrack_default_instance_; -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::track::SensorTrack* Arena::CreateMaybeMessage<::messages::track::SensorTrack>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace track { - -// =================================================================== - -class SensorTrack final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.track.SensorTrack) */ { - public: - inline SensorTrack() : SensorTrack(nullptr) {} - ~SensorTrack() override; - explicit PROTOBUF_CONSTEXPR SensorTrack(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SensorTrack(const SensorTrack& from); - SensorTrack(SensorTrack&& from) noexcept - : SensorTrack() { - *this = ::std::move(from); - } - - inline SensorTrack& operator=(const SensorTrack& from) { - CopyFrom(from); - return *this; - } - inline SensorTrack& operator=(SensorTrack&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const SensorTrack& default_instance() { - return *internal_default_instance(); - } - static inline const SensorTrack* internal_default_instance() { - return reinterpret_cast( - &_SensorTrack_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(SensorTrack& a, SensorTrack& b) { - a.Swap(&b); - } - inline void Swap(SensorTrack* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SensorTrack* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SensorTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const SensorTrack& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const SensorTrack& from) { - SensorTrack::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SensorTrack* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.track.SensorTrack"; - } - protected: - explicit SensorTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kSensorIDFieldNumber = 2, - kEntityIdentifierFieldNumber = 1, - kRadarTrackFieldNumber = 4, - kESMTrackFieldNumber = 5, - kTimestampFieldNumber = 6, - kDurationFieldNumber = 7, - kTrackKindFieldNumber = 3, - }; - // string SensorID = 2; - void clear_sensorid(); - const std::string& sensorid() const; - template - void set_sensorid(ArgT0&& arg0, ArgT... args); - std::string* mutable_sensorid(); - PROTOBUF_NODISCARD std::string* release_sensorid(); - void set_allocated_sensorid(std::string* sensorid); - private: - const std::string& _internal_sensorid() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_sensorid(const std::string& value); - std::string* _internal_mutable_sensorid(); - public: - - // .messages.track.Identifier EntityIdentifier = 1; - bool has_entityidentifier() const; - private: - bool _internal_has_entityidentifier() const; - public: - void clear_entityidentifier(); - const ::messages::track::Identifier& entityidentifier() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_entityidentifier(); - ::messages::track::Identifier* mutable_entityidentifier(); - void set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier); - private: - const ::messages::track::Identifier& _internal_entityidentifier() const; - ::messages::track::Identifier* _internal_mutable_entityidentifier(); - public: - void unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier); - ::messages::track::Identifier* unsafe_arena_release_entityidentifier(); - - // optional .messages.track.RadarTrack RadarTrack = 4; - bool has_radartrack() const; - private: - bool _internal_has_radartrack() const; - public: - void clear_radartrack(); - const ::messages::track::RadarTrack& radartrack() const; - PROTOBUF_NODISCARD ::messages::track::RadarTrack* release_radartrack(); - ::messages::track::RadarTrack* mutable_radartrack(); - void set_allocated_radartrack(::messages::track::RadarTrack* radartrack); - private: - const ::messages::track::RadarTrack& _internal_radartrack() const; - ::messages::track::RadarTrack* _internal_mutable_radartrack(); - public: - void unsafe_arena_set_allocated_radartrack( - ::messages::track::RadarTrack* radartrack); - ::messages::track::RadarTrack* unsafe_arena_release_radartrack(); - - // optional .messages.track.ESMTrack ESMTrack = 5; - bool has_esmtrack() const; - private: - bool _internal_has_esmtrack() const; - public: - void clear_esmtrack(); - const ::messages::track::ESMTrack& esmtrack() const; - PROTOBUF_NODISCARD ::messages::track::ESMTrack* release_esmtrack(); - ::messages::track::ESMTrack* mutable_esmtrack(); - void set_allocated_esmtrack(::messages::track::ESMTrack* esmtrack); - private: - const ::messages::track::ESMTrack& _internal_esmtrack() const; - ::messages::track::ESMTrack* _internal_mutable_esmtrack(); - public: - void unsafe_arena_set_allocated_esmtrack( - ::messages::track::ESMTrack* esmtrack); - ::messages::track::ESMTrack* unsafe_arena_release_esmtrack(); - - // .google.protobuf.Timestamp timestamp = 6; - bool has_timestamp() const; - private: - bool _internal_has_timestamp() const; - public: - void clear_timestamp(); - const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Timestamp* release_timestamp(); - ::PROTOBUF_NAMESPACE_ID::Timestamp* mutable_timestamp(); - void set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - private: - const ::PROTOBUF_NAMESPACE_ID::Timestamp& _internal_timestamp() const; - ::PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_timestamp(); - public: - void unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - ::PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_timestamp(); - - // .google.protobuf.Duration duration = 7; - bool has_duration() const; - private: - bool _internal_has_duration() const; - public: - void clear_duration(); - const ::PROTOBUF_NAMESPACE_ID::Duration& duration() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Duration* release_duration(); - ::PROTOBUF_NAMESPACE_ID::Duration* mutable_duration(); - void set_allocated_duration(::PROTOBUF_NAMESPACE_ID::Duration* duration); - private: - const ::PROTOBUF_NAMESPACE_ID::Duration& _internal_duration() const; - ::PROTOBUF_NAMESPACE_ID::Duration* _internal_mutable_duration(); - public: - void unsafe_arena_set_allocated_duration( - ::PROTOBUF_NAMESPACE_ID::Duration* duration); - ::PROTOBUF_NAMESPACE_ID::Duration* unsafe_arena_release_duration(); - - // uint32 TrackKind = 3; - void clear_trackkind(); - uint32_t trackkind() const; - void set_trackkind(uint32_t value); - private: - uint32_t _internal_trackkind() const; - void _internal_set_trackkind(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:messages.track.SensorTrack) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sensorid_; - ::messages::track::Identifier* entityidentifier_; - ::messages::track::RadarTrack* radartrack_; - ::messages::track::ESMTrack* esmtrack_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp_; - ::PROTOBUF_NAMESPACE_ID::Duration* duration_; - uint32_t trackkind_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_SensorTrack_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// SensorTrack - -// .messages.track.Identifier EntityIdentifier = 1; -inline bool SensorTrack::_internal_has_entityidentifier() const { - return this != internal_default_instance() && _impl_.entityidentifier_ != nullptr; -} -inline bool SensorTrack::has_entityidentifier() const { - return _internal_has_entityidentifier(); -} -inline const ::messages::track::Identifier& SensorTrack::_internal_entityidentifier() const { - const ::messages::track::Identifier* p = _impl_.entityidentifier_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& SensorTrack::entityidentifier() const { - // @@protoc_insertion_point(field_get:messages.track.SensorTrack.EntityIdentifier) - return _internal_entityidentifier(); -} -inline void SensorTrack::unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - _impl_.entityidentifier_ = entityidentifier; - if (entityidentifier) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.SensorTrack.EntityIdentifier) -} -inline ::messages::track::Identifier* SensorTrack::release_entityidentifier() { - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* SensorTrack::unsafe_arena_release_entityidentifier() { - // @@protoc_insertion_point(field_release:messages.track.SensorTrack.EntityIdentifier) - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* SensorTrack::_internal_mutable_entityidentifier() { - - if (_impl_.entityidentifier_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.entityidentifier_ = p; - } - return _impl_.entityidentifier_; -} -inline ::messages::track::Identifier* SensorTrack::mutable_entityidentifier() { - ::messages::track::Identifier* _msg = _internal_mutable_entityidentifier(); - // @@protoc_insertion_point(field_mutable:messages.track.SensorTrack.EntityIdentifier) - return _msg; -} -inline void SensorTrack::set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - if (entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(entityidentifier)); - if (message_arena != submessage_arena) { - entityidentifier = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, entityidentifier, submessage_arena); - } - - } else { - - } - _impl_.entityidentifier_ = entityidentifier; - // @@protoc_insertion_point(field_set_allocated:messages.track.SensorTrack.EntityIdentifier) -} - -// string SensorID = 2; -inline void SensorTrack::clear_sensorid() { - _impl_.sensorid_.ClearToEmpty(); -} -inline const std::string& SensorTrack::sensorid() const { - // @@protoc_insertion_point(field_get:messages.track.SensorTrack.SensorID) - return _internal_sensorid(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void SensorTrack::set_sensorid(ArgT0&& arg0, ArgT... args) { - - _impl_.sensorid_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:messages.track.SensorTrack.SensorID) -} -inline std::string* SensorTrack::mutable_sensorid() { - std::string* _s = _internal_mutable_sensorid(); - // @@protoc_insertion_point(field_mutable:messages.track.SensorTrack.SensorID) - return _s; -} -inline const std::string& SensorTrack::_internal_sensorid() const { - return _impl_.sensorid_.Get(); -} -inline void SensorTrack::_internal_set_sensorid(const std::string& value) { - - _impl_.sensorid_.Set(value, GetArenaForAllocation()); -} -inline std::string* SensorTrack::_internal_mutable_sensorid() { - - return _impl_.sensorid_.Mutable(GetArenaForAllocation()); -} -inline std::string* SensorTrack::release_sensorid() { - // @@protoc_insertion_point(field_release:messages.track.SensorTrack.SensorID) - return _impl_.sensorid_.Release(); -} -inline void SensorTrack::set_allocated_sensorid(std::string* sensorid) { - if (sensorid != nullptr) { - - } else { - - } - _impl_.sensorid_.SetAllocated(sensorid, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.sensorid_.IsDefault()) { - _impl_.sensorid_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:messages.track.SensorTrack.SensorID) -} - -// uint32 TrackKind = 3; -inline void SensorTrack::clear_trackkind() { - _impl_.trackkind_ = 0u; -} -inline uint32_t SensorTrack::_internal_trackkind() const { - return _impl_.trackkind_; -} -inline uint32_t SensorTrack::trackkind() const { - // @@protoc_insertion_point(field_get:messages.track.SensorTrack.TrackKind) - return _internal_trackkind(); -} -inline void SensorTrack::_internal_set_trackkind(uint32_t value) { - - _impl_.trackkind_ = value; -} -inline void SensorTrack::set_trackkind(uint32_t value) { - _internal_set_trackkind(value); - // @@protoc_insertion_point(field_set:messages.track.SensorTrack.TrackKind) -} - -// optional .messages.track.RadarTrack RadarTrack = 4; -inline bool SensorTrack::_internal_has_radartrack() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.radartrack_ != nullptr); - return value; -} -inline bool SensorTrack::has_radartrack() const { - return _internal_has_radartrack(); -} -inline const ::messages::track::RadarTrack& SensorTrack::_internal_radartrack() const { - const ::messages::track::RadarTrack* p = _impl_.radartrack_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_RadarTrack_default_instance_); -} -inline const ::messages::track::RadarTrack& SensorTrack::radartrack() const { - // @@protoc_insertion_point(field_get:messages.track.SensorTrack.RadarTrack) - return _internal_radartrack(); -} -inline void SensorTrack::unsafe_arena_set_allocated_radartrack( - ::messages::track::RadarTrack* radartrack) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.radartrack_); - } - _impl_.radartrack_ = radartrack; - if (radartrack) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.SensorTrack.RadarTrack) -} -inline ::messages::track::RadarTrack* SensorTrack::release_radartrack() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::RadarTrack* temp = _impl_.radartrack_; - _impl_.radartrack_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::RadarTrack* SensorTrack::unsafe_arena_release_radartrack() { - // @@protoc_insertion_point(field_release:messages.track.SensorTrack.RadarTrack) - _impl_._has_bits_[0] &= ~0x00000001u; - ::messages::track::RadarTrack* temp = _impl_.radartrack_; - _impl_.radartrack_ = nullptr; - return temp; -} -inline ::messages::track::RadarTrack* SensorTrack::_internal_mutable_radartrack() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.radartrack_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::RadarTrack>(GetArenaForAllocation()); - _impl_.radartrack_ = p; - } - return _impl_.radartrack_; -} -inline ::messages::track::RadarTrack* SensorTrack::mutable_radartrack() { - ::messages::track::RadarTrack* _msg = _internal_mutable_radartrack(); - // @@protoc_insertion_point(field_mutable:messages.track.SensorTrack.RadarTrack) - return _msg; -} -inline void SensorTrack::set_allocated_radartrack(::messages::track::RadarTrack* radartrack) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.radartrack_); - } - if (radartrack) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(radartrack)); - if (message_arena != submessage_arena) { - radartrack = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, radartrack, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - _impl_.radartrack_ = radartrack; - // @@protoc_insertion_point(field_set_allocated:messages.track.SensorTrack.RadarTrack) -} - -// optional .messages.track.ESMTrack ESMTrack = 5; -inline bool SensorTrack::_internal_has_esmtrack() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - PROTOBUF_ASSUME(!value || _impl_.esmtrack_ != nullptr); - return value; -} -inline bool SensorTrack::has_esmtrack() const { - return _internal_has_esmtrack(); -} -inline const ::messages::track::ESMTrack& SensorTrack::_internal_esmtrack() const { - const ::messages::track::ESMTrack* p = _impl_.esmtrack_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_ESMTrack_default_instance_); -} -inline const ::messages::track::ESMTrack& SensorTrack::esmtrack() const { - // @@protoc_insertion_point(field_get:messages.track.SensorTrack.ESMTrack) - return _internal_esmtrack(); -} -inline void SensorTrack::unsafe_arena_set_allocated_esmtrack( - ::messages::track::ESMTrack* esmtrack) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.esmtrack_); - } - _impl_.esmtrack_ = esmtrack; - if (esmtrack) { - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.SensorTrack.ESMTrack) -} -inline ::messages::track::ESMTrack* SensorTrack::release_esmtrack() { - _impl_._has_bits_[0] &= ~0x00000002u; - ::messages::track::ESMTrack* temp = _impl_.esmtrack_; - _impl_.esmtrack_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::ESMTrack* SensorTrack::unsafe_arena_release_esmtrack() { - // @@protoc_insertion_point(field_release:messages.track.SensorTrack.ESMTrack) - _impl_._has_bits_[0] &= ~0x00000002u; - ::messages::track::ESMTrack* temp = _impl_.esmtrack_; - _impl_.esmtrack_ = nullptr; - return temp; -} -inline ::messages::track::ESMTrack* SensorTrack::_internal_mutable_esmtrack() { - _impl_._has_bits_[0] |= 0x00000002u; - if (_impl_.esmtrack_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::ESMTrack>(GetArenaForAllocation()); - _impl_.esmtrack_ = p; - } - return _impl_.esmtrack_; -} -inline ::messages::track::ESMTrack* SensorTrack::mutable_esmtrack() { - ::messages::track::ESMTrack* _msg = _internal_mutable_esmtrack(); - // @@protoc_insertion_point(field_mutable:messages.track.SensorTrack.ESMTrack) - return _msg; -} -inline void SensorTrack::set_allocated_esmtrack(::messages::track::ESMTrack* esmtrack) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.esmtrack_); - } - if (esmtrack) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(esmtrack)); - if (message_arena != submessage_arena) { - esmtrack = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, esmtrack, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - _impl_.esmtrack_ = esmtrack; - // @@protoc_insertion_point(field_set_allocated:messages.track.SensorTrack.ESMTrack) -} - -// .google.protobuf.Timestamp timestamp = 6; -inline bool SensorTrack::_internal_has_timestamp() const { - return this != internal_default_instance() && _impl_.timestamp_ != nullptr; -} -inline bool SensorTrack::has_timestamp() const { - return _internal_has_timestamp(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& SensorTrack::_internal_timestamp() const { - const ::PROTOBUF_NAMESPACE_ID::Timestamp* p = _impl_.timestamp_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& SensorTrack::timestamp() const { - // @@protoc_insertion_point(field_get:messages.track.SensorTrack.timestamp) - return _internal_timestamp(); -} -inline void SensorTrack::unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - _impl_.timestamp_ = timestamp; - if (timestamp) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.SensorTrack.timestamp) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* SensorTrack::release_timestamp() { - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* SensorTrack::unsafe_arena_release_timestamp() { - // @@protoc_insertion_point(field_release:messages.track.SensorTrack.timestamp) - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* SensorTrack::_internal_mutable_timestamp() { - - if (_impl_.timestamp_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaForAllocation()); - _impl_.timestamp_ = p; - } - return _impl_.timestamp_; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* SensorTrack::mutable_timestamp() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_timestamp(); - // @@protoc_insertion_point(field_mutable:messages.track.SensorTrack.timestamp) - return _msg; -} -inline void SensorTrack::set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - if (timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timestamp)); - if (message_arena != submessage_arena) { - timestamp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, timestamp, submessage_arena); - } - - } else { - - } - _impl_.timestamp_ = timestamp; - // @@protoc_insertion_point(field_set_allocated:messages.track.SensorTrack.timestamp) -} - -// .google.protobuf.Duration duration = 7; -inline bool SensorTrack::_internal_has_duration() const { - return this != internal_default_instance() && _impl_.duration_ != nullptr; -} -inline bool SensorTrack::has_duration() const { - return _internal_has_duration(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Duration& SensorTrack::_internal_duration() const { - const ::PROTOBUF_NAMESPACE_ID::Duration* p = _impl_.duration_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Duration_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Duration& SensorTrack::duration() const { - // @@protoc_insertion_point(field_get:messages.track.SensorTrack.duration) - return _internal_duration(); -} -inline void SensorTrack::unsafe_arena_set_allocated_duration( - ::PROTOBUF_NAMESPACE_ID::Duration* duration) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.duration_); - } - _impl_.duration_ = duration; - if (duration) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.SensorTrack.duration) -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* SensorTrack::release_duration() { - - ::PROTOBUF_NAMESPACE_ID::Duration* temp = _impl_.duration_; - _impl_.duration_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* SensorTrack::unsafe_arena_release_duration() { - // @@protoc_insertion_point(field_release:messages.track.SensorTrack.duration) - - ::PROTOBUF_NAMESPACE_ID::Duration* temp = _impl_.duration_; - _impl_.duration_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* SensorTrack::_internal_mutable_duration() { - - if (_impl_.duration_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Duration>(GetArenaForAllocation()); - _impl_.duration_ = p; - } - return _impl_.duration_; -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* SensorTrack::mutable_duration() { - ::PROTOBUF_NAMESPACE_ID::Duration* _msg = _internal_mutable_duration(); - // @@protoc_insertion_point(field_mutable:messages.track.SensorTrack.duration) - return _msg; -} -inline void SensorTrack::set_allocated_duration(::PROTOBUF_NAMESPACE_ID::Duration* duration) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.duration_); - } - if (duration) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(duration)); - if (message_arena != submessage_arena) { - duration = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, duration, submessage_arena); - } - - } else { - - } - _impl_.duration_ = duration; - // @@protoc_insertion_point(field_set_allocated:messages.track.SensorTrack.duration) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace track -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_SensorTrack_2eproto diff --git a/include/SimCore/Messages/Protos/SensorTrack.proto b/include/SimCore/Messages/Protos/SensorTrack.proto deleted file mode 100644 index 2fef85a..0000000 --- a/include/SimCore/Messages/Protos/SensorTrack.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package messages.track; - -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "Identifier.proto"; - -import "RadarTrack.proto"; -import "ESMTrack.proto"; - - -// [END declaration] - - -message SensorTrack { - - messages.track.Identifier EntityIdentifier = 1; - - string SensorID = 2; - uint32 TrackKind = 3 ; - optional messages.track.RadarTrack RadarTrack = 4; - optional messages.track.ESMTrack ESMTrack = 5; - - google.protobuf.Timestamp timestamp = 6; - google.protobuf.Duration duration = 7; -} \ No newline at end of file diff --git a/include/SimCore/Messages/Protos/Track.pb.cc b/include/SimCore/Messages/Protos/Track.pb.cc deleted file mode 100644 index 0275e96..0000000 --- a/include/SimCore/Messages/Protos/Track.pb.cc +++ /dev/null @@ -1,490 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: Track.proto - -#include "Track.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - -namespace messages { -namespace track { -PROTOBUF_CONSTEXPR Track::Track( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.entityidentifier_)*/nullptr - , /*decltype(_impl_.geocentricposition_)*/nullptr - , /*decltype(_impl_.timestamp_)*/nullptr - , /*decltype(_impl_.speed_)*/0 - , /*decltype(_impl_.course_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} -struct TrackDefaultTypeInternal { - PROTOBUF_CONSTEXPR TrackDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~TrackDefaultTypeInternal() {} - union { - Track _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TrackDefaultTypeInternal _Track_default_instance_; -} // namespace track -} // namespace messages -static ::_pb::Metadata file_level_metadata_Track_2eproto[1]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_Track_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_Track_2eproto = nullptr; - -const uint32_t TableStruct_Track_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::messages::track::Track, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::messages::track::Track, _impl_.entityidentifier_), - PROTOBUF_FIELD_OFFSET(::messages::track::Track, _impl_.geocentricposition_), - PROTOBUF_FIELD_OFFSET(::messages::track::Track, _impl_.speed_), - PROTOBUF_FIELD_OFFSET(::messages::track::Track, _impl_.course_), - PROTOBUF_FIELD_OFFSET(::messages::track::Track, _impl_.timestamp_), -}; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::messages::track::Track)}, -}; - -static const ::_pb::Message* const file_default_instances[] = { - &::messages::track::_Track_default_instance_._instance, -}; - -const char descriptor_table_protodef_Track_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\013Track.proto\022\016messages.track\032\037google/pr" - "otobuf/timestamp.proto\032\030GeocentricPositi" - "on.proto\032\020Identifier.proto\"\321\001\n\005Track\0224\n\020" - "EntityIdentifier\030\001 \001(\0132\032.messages.track." - "Identifier\022D\n\022GeocentricPosition\030\002 \001(\0132(" - ".messages.track.EntityGeocentricPosition" - "\022\r\n\005Speed\030\003 \001(\001\022\016\n\006Course\030\004 \001(\001\022-\n\ttimes" - "tamp\030\006 \001(\0132\032.google.protobuf.Timestampb\006" - "proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_Track_2eproto_deps[3] = { - &::descriptor_table_GeocentricPosition_2eproto, - &::descriptor_table_Identifier_2eproto, - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::_pbi::once_flag descriptor_table_Track_2eproto_once; -const ::_pbi::DescriptorTable descriptor_table_Track_2eproto = { - false, false, 326, descriptor_table_protodef_Track_2eproto, - "Track.proto", - &descriptor_table_Track_2eproto_once, descriptor_table_Track_2eproto_deps, 3, 1, - schemas, file_default_instances, TableStruct_Track_2eproto::offsets, - file_level_metadata_Track_2eproto, file_level_enum_descriptors_Track_2eproto, - file_level_service_descriptors_Track_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_Track_2eproto_getter() { - return &descriptor_table_Track_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_Track_2eproto(&descriptor_table_Track_2eproto); -namespace messages { -namespace track { - -// =================================================================== - -class Track::_Internal { - public: - static const ::messages::track::Identifier& entityidentifier(const Track* msg); - static const ::messages::track::EntityGeocentricPosition& geocentricposition(const Track* msg); - static const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp(const Track* msg); -}; - -const ::messages::track::Identifier& -Track::_Internal::entityidentifier(const Track* msg) { - return *msg->_impl_.entityidentifier_; -} -const ::messages::track::EntityGeocentricPosition& -Track::_Internal::geocentricposition(const Track* msg) { - return *msg->_impl_.geocentricposition_; -} -const ::PROTOBUF_NAMESPACE_ID::Timestamp& -Track::_Internal::timestamp(const Track* msg) { - return *msg->_impl_.timestamp_; -} -void Track::clear_entityidentifier() { - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; -} -void Track::clear_geocentricposition() { - if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) { - delete _impl_.geocentricposition_; - } - _impl_.geocentricposition_ = nullptr; -} -void Track::clear_timestamp() { - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; -} -Track::Track(::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.Track) -} -Track::Track(const Track& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Track* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.speed_){} - , decltype(_impl_.course_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_entityidentifier()) { - _this->_impl_.entityidentifier_ = new ::messages::track::Identifier(*from._impl_.entityidentifier_); - } - if (from._internal_has_geocentricposition()) { - _this->_impl_.geocentricposition_ = new ::messages::track::EntityGeocentricPosition(*from._impl_.geocentricposition_); - } - if (from._internal_has_timestamp()) { - _this->_impl_.timestamp_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.timestamp_); - } - ::memcpy(&_impl_.speed_, &from._impl_.speed_, - static_cast(reinterpret_cast(&_impl_.course_) - - reinterpret_cast(&_impl_.speed_)) + sizeof(_impl_.course_)); - // @@protoc_insertion_point(copy_constructor:messages.track.Track) -} - -inline void Track::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.entityidentifier_){nullptr} - , decltype(_impl_.geocentricposition_){nullptr} - , decltype(_impl_.timestamp_){nullptr} - , decltype(_impl_.speed_){0} - , decltype(_impl_.course_){0} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -Track::~Track() { - // @@protoc_insertion_point(destructor:messages.track.Track) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void Track::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.entityidentifier_; - if (this != internal_default_instance()) delete _impl_.geocentricposition_; - if (this != internal_default_instance()) delete _impl_.timestamp_; -} - -void Track::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Track::Clear() { -// @@protoc_insertion_point(message_clear_start:messages.track.Track) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArenaForAllocation() == nullptr && _impl_.entityidentifier_ != nullptr) { - delete _impl_.entityidentifier_; - } - _impl_.entityidentifier_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) { - delete _impl_.geocentricposition_; - } - _impl_.geocentricposition_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.timestamp_ != nullptr) { - delete _impl_.timestamp_; - } - _impl_.timestamp_ = nullptr; - ::memset(&_impl_.speed_, 0, static_cast( - reinterpret_cast(&_impl_.course_) - - reinterpret_cast(&_impl_.speed_)) + sizeof(_impl_.course_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Track::_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) { - // .messages.track.Identifier EntityIdentifier = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_entityidentifier(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .messages.track.EntityGeocentricPosition GeocentricPosition = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_geocentricposition(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // double Speed = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 25)) { - _impl_.speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // double Course = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 33)) { - _impl_.course_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // .google.protobuf.Timestamp timestamp = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr = ctx->ParseMessage(_internal_mutable_timestamp(), ptr); - CHK_(ptr); - } 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* Track::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:messages.track.Track) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // .messages.track.Identifier EntityIdentifier = 1; - if (this->_internal_has_entityidentifier()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::entityidentifier(this), - _Internal::entityidentifier(this).GetCachedSize(), target, stream); - } - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 2; - if (this->_internal_has_geocentricposition()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::geocentricposition(this), - _Internal::geocentricposition(this).GetCachedSize(), target, stream); - } - - // double Speed = 3; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_speed = this->_internal_speed(); - uint64_t raw_speed; - memcpy(&raw_speed, &tmp_speed, sizeof(tmp_speed)); - if (raw_speed != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_speed(), target); - } - - // double Course = 4; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_course = this->_internal_course(); - uint64_t raw_course; - memcpy(&raw_course, &tmp_course, sizeof(tmp_course)); - if (raw_course != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_course(), target); - } - - // .google.protobuf.Timestamp timestamp = 6; - if (this->_internal_has_timestamp()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(6, _Internal::timestamp(this), - _Internal::timestamp(this).GetCachedSize(), target, stream); - } - - 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.Track) - return target; -} - -size_t Track::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:messages.track.Track) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .messages.track.Identifier EntityIdentifier = 1; - if (this->_internal_has_entityidentifier()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.entityidentifier_); - } - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 2; - if (this->_internal_has_geocentricposition()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.geocentricposition_); - } - - // .google.protobuf.Timestamp timestamp = 6; - if (this->_internal_has_timestamp()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.timestamp_); - } - - // double Speed = 3; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_speed = this->_internal_speed(); - uint64_t raw_speed; - memcpy(&raw_speed, &tmp_speed, sizeof(tmp_speed)); - if (raw_speed != 0) { - total_size += 1 + 8; - } - - // double Course = 4; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_course = this->_internal_course(); - uint64_t raw_course; - memcpy(&raw_course, &tmp_course, sizeof(tmp_course)); - if (raw_course != 0) { - total_size += 1 + 8; - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Track::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Track::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Track::GetClassData() const { return &_class_data_; } - - -void Track::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:messages.track.Track) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_has_entityidentifier()) { - _this->_internal_mutable_entityidentifier()->::messages::track::Identifier::MergeFrom( - from._internal_entityidentifier()); - } - if (from._internal_has_geocentricposition()) { - _this->_internal_mutable_geocentricposition()->::messages::track::EntityGeocentricPosition::MergeFrom( - from._internal_geocentricposition()); - } - if (from._internal_has_timestamp()) { - _this->_internal_mutable_timestamp()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom( - from._internal_timestamp()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_speed = from._internal_speed(); - uint64_t raw_speed; - memcpy(&raw_speed, &tmp_speed, sizeof(tmp_speed)); - if (raw_speed != 0) { - _this->_internal_set_speed(from._internal_speed()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_course = from._internal_course(); - uint64_t raw_course; - memcpy(&raw_course, &tmp_course, sizeof(tmp_course)); - if (raw_course != 0) { - _this->_internal_set_course(from._internal_course()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Track::CopyFrom(const Track& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:messages.track.Track) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Track::IsInitialized() const { - return true; -} - -void Track::InternalSwap(Track* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Track, _impl_.course_) - + sizeof(Track::_impl_.course_) - - PROTOBUF_FIELD_OFFSET(Track, _impl_.entityidentifier_)>( - reinterpret_cast(&_impl_.entityidentifier_), - reinterpret_cast(&other->_impl_.entityidentifier_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Track::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_Track_2eproto_getter, &descriptor_table_Track_2eproto_once, - file_level_metadata_Track_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::messages::track::Track* -Arena::CreateMaybeMessage< ::messages::track::Track >(Arena* arena) { - return Arena::CreateMessageInternal< ::messages::track::Track >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/include/SimCore/Messages/Protos/Track.pb.h b/include/SimCore/Messages/Protos/Track.pb.h deleted file mode 100644 index 6bda4f9..0000000 --- a/include/SimCore/Messages/Protos/Track.pb.h +++ /dev/null @@ -1,600 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: Track.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_Track_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_Track_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include "GeocentricPosition.pb.h" -#include "Identifier.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_Track_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_Track_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Track_2eproto; -namespace messages { -namespace track { -class Track; -struct TrackDefaultTypeInternal; -extern TrackDefaultTypeInternal _Track_default_instance_; -} // namespace track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::track::Track* Arena::CreateMaybeMessage<::messages::track::Track>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace track { - -// =================================================================== - -class Track final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.track.Track) */ { - public: - inline Track() : Track(nullptr) {} - ~Track() override; - explicit PROTOBUF_CONSTEXPR Track(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Track(const Track& from); - Track(Track&& from) noexcept - : Track() { - *this = ::std::move(from); - } - - inline Track& operator=(const Track& from) { - CopyFrom(from); - return *this; - } - inline Track& operator=(Track&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Track& default_instance() { - return *internal_default_instance(); - } - static inline const Track* internal_default_instance() { - return reinterpret_cast( - &_Track_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Track& a, Track& b) { - a.Swap(&b); - } - inline void Swap(Track* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Track* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Track* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Track& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Track& from) { - Track::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Track* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.track.Track"; - } - protected: - explicit Track(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kEntityIdentifierFieldNumber = 1, - kGeocentricPositionFieldNumber = 2, - kTimestampFieldNumber = 6, - kSpeedFieldNumber = 3, - kCourseFieldNumber = 4, - }; - // .messages.track.Identifier EntityIdentifier = 1; - bool has_entityidentifier() const; - private: - bool _internal_has_entityidentifier() const; - public: - void clear_entityidentifier(); - const ::messages::track::Identifier& entityidentifier() const; - PROTOBUF_NODISCARD ::messages::track::Identifier* release_entityidentifier(); - ::messages::track::Identifier* mutable_entityidentifier(); - void set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier); - private: - const ::messages::track::Identifier& _internal_entityidentifier() const; - ::messages::track::Identifier* _internal_mutable_entityidentifier(); - public: - void unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier); - ::messages::track::Identifier* unsafe_arena_release_entityidentifier(); - - // .messages.track.EntityGeocentricPosition GeocentricPosition = 2; - bool has_geocentricposition() const; - private: - bool _internal_has_geocentricposition() const; - public: - void clear_geocentricposition(); - const ::messages::track::EntityGeocentricPosition& geocentricposition() const; - PROTOBUF_NODISCARD ::messages::track::EntityGeocentricPosition* release_geocentricposition(); - ::messages::track::EntityGeocentricPosition* mutable_geocentricposition(); - void set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition); - private: - const ::messages::track::EntityGeocentricPosition& _internal_geocentricposition() const; - ::messages::track::EntityGeocentricPosition* _internal_mutable_geocentricposition(); - public: - void unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition); - ::messages::track::EntityGeocentricPosition* unsafe_arena_release_geocentricposition(); - - // .google.protobuf.Timestamp timestamp = 6; - bool has_timestamp() const; - private: - bool _internal_has_timestamp() const; - public: - void clear_timestamp(); - const ::PROTOBUF_NAMESPACE_ID::Timestamp& timestamp() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Timestamp* release_timestamp(); - ::PROTOBUF_NAMESPACE_ID::Timestamp* mutable_timestamp(); - void set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - private: - const ::PROTOBUF_NAMESPACE_ID::Timestamp& _internal_timestamp() const; - ::PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_timestamp(); - public: - void unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); - ::PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_timestamp(); - - // double Speed = 3; - void clear_speed(); - double speed() const; - void set_speed(double value); - private: - double _internal_speed() const; - void _internal_set_speed(double value); - public: - - // double Course = 4; - void clear_course(); - double course() const; - void set_course(double value); - private: - double _internal_course() const; - void _internal_set_course(double value); - public: - - // @@protoc_insertion_point(class_scope:messages.track.Track) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::messages::track::Identifier* entityidentifier_; - ::messages::track::EntityGeocentricPosition* geocentricposition_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp_; - double speed_; - double course_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_Track_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Track - -// .messages.track.Identifier EntityIdentifier = 1; -inline bool Track::_internal_has_entityidentifier() const { - return this != internal_default_instance() && _impl_.entityidentifier_ != nullptr; -} -inline bool Track::has_entityidentifier() const { - return _internal_has_entityidentifier(); -} -inline const ::messages::track::Identifier& Track::_internal_entityidentifier() const { - const ::messages::track::Identifier* p = _impl_.entityidentifier_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_Identifier_default_instance_); -} -inline const ::messages::track::Identifier& Track::entityidentifier() const { - // @@protoc_insertion_point(field_get:messages.track.Track.EntityIdentifier) - return _internal_entityidentifier(); -} -inline void Track::unsafe_arena_set_allocated_entityidentifier( - ::messages::track::Identifier* entityidentifier) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - _impl_.entityidentifier_ = entityidentifier; - if (entityidentifier) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.Track.EntityIdentifier) -} -inline ::messages::track::Identifier* Track::release_entityidentifier() { - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::Identifier* Track::unsafe_arena_release_entityidentifier() { - // @@protoc_insertion_point(field_release:messages.track.Track.EntityIdentifier) - - ::messages::track::Identifier* temp = _impl_.entityidentifier_; - _impl_.entityidentifier_ = nullptr; - return temp; -} -inline ::messages::track::Identifier* Track::_internal_mutable_entityidentifier() { - - if (_impl_.entityidentifier_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation()); - _impl_.entityidentifier_ = p; - } - return _impl_.entityidentifier_; -} -inline ::messages::track::Identifier* Track::mutable_entityidentifier() { - ::messages::track::Identifier* _msg = _internal_mutable_entityidentifier(); - // @@protoc_insertion_point(field_mutable:messages.track.Track.EntityIdentifier) - return _msg; -} -inline void Track::set_allocated_entityidentifier(::messages::track::Identifier* entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityidentifier_); - } - if (entityidentifier) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(entityidentifier)); - if (message_arena != submessage_arena) { - entityidentifier = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, entityidentifier, submessage_arena); - } - - } else { - - } - _impl_.entityidentifier_ = entityidentifier; - // @@protoc_insertion_point(field_set_allocated:messages.track.Track.EntityIdentifier) -} - -// .messages.track.EntityGeocentricPosition GeocentricPosition = 2; -inline bool Track::_internal_has_geocentricposition() const { - return this != internal_default_instance() && _impl_.geocentricposition_ != nullptr; -} -inline bool Track::has_geocentricposition() const { - return _internal_has_geocentricposition(); -} -inline const ::messages::track::EntityGeocentricPosition& Track::_internal_geocentricposition() const { - const ::messages::track::EntityGeocentricPosition* p = _impl_.geocentricposition_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::track::_EntityGeocentricPosition_default_instance_); -} -inline const ::messages::track::EntityGeocentricPosition& Track::geocentricposition() const { - // @@protoc_insertion_point(field_get:messages.track.Track.GeocentricPosition) - return _internal_geocentricposition(); -} -inline void Track::unsafe_arena_set_allocated_geocentricposition( - ::messages::track::EntityGeocentricPosition* geocentricposition) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - _impl_.geocentricposition_ = geocentricposition; - if (geocentricposition) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.Track.GeocentricPosition) -} -inline ::messages::track::EntityGeocentricPosition* Track::release_geocentricposition() { - - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::messages::track::EntityGeocentricPosition* Track::unsafe_arena_release_geocentricposition() { - // @@protoc_insertion_point(field_release:messages.track.Track.GeocentricPosition) - - ::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_; - _impl_.geocentricposition_ = nullptr; - return temp; -} -inline ::messages::track::EntityGeocentricPosition* Track::_internal_mutable_geocentricposition() { - - if (_impl_.geocentricposition_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::track::EntityGeocentricPosition>(GetArenaForAllocation()); - _impl_.geocentricposition_ = p; - } - return _impl_.geocentricposition_; -} -inline ::messages::track::EntityGeocentricPosition* Track::mutable_geocentricposition() { - ::messages::track::EntityGeocentricPosition* _msg = _internal_mutable_geocentricposition(); - // @@protoc_insertion_point(field_mutable:messages.track.Track.GeocentricPosition) - return _msg; -} -inline void Track::set_allocated_geocentricposition(::messages::track::EntityGeocentricPosition* geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.geocentricposition_); - } - if (geocentricposition) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(geocentricposition)); - if (message_arena != submessage_arena) { - geocentricposition = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, geocentricposition, submessage_arena); - } - - } else { - - } - _impl_.geocentricposition_ = geocentricposition; - // @@protoc_insertion_point(field_set_allocated:messages.track.Track.GeocentricPosition) -} - -// double Speed = 3; -inline void Track::clear_speed() { - _impl_.speed_ = 0; -} -inline double Track::_internal_speed() const { - return _impl_.speed_; -} -inline double Track::speed() const { - // @@protoc_insertion_point(field_get:messages.track.Track.Speed) - return _internal_speed(); -} -inline void Track::_internal_set_speed(double value) { - - _impl_.speed_ = value; -} -inline void Track::set_speed(double value) { - _internal_set_speed(value); - // @@protoc_insertion_point(field_set:messages.track.Track.Speed) -} - -// double Course = 4; -inline void Track::clear_course() { - _impl_.course_ = 0; -} -inline double Track::_internal_course() const { - return _impl_.course_; -} -inline double Track::course() const { - // @@protoc_insertion_point(field_get:messages.track.Track.Course) - return _internal_course(); -} -inline void Track::_internal_set_course(double value) { - - _impl_.course_ = value; -} -inline void Track::set_course(double value) { - _internal_set_course(value); - // @@protoc_insertion_point(field_set:messages.track.Track.Course) -} - -// .google.protobuf.Timestamp timestamp = 6; -inline bool Track::_internal_has_timestamp() const { - return this != internal_default_instance() && _impl_.timestamp_ != nullptr; -} -inline bool Track::has_timestamp() const { - return _internal_has_timestamp(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& Track::_internal_timestamp() const { - const ::PROTOBUF_NAMESPACE_ID::Timestamp* p = _impl_.timestamp_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& Track::timestamp() const { - // @@protoc_insertion_point(field_get:messages.track.Track.timestamp) - return _internal_timestamp(); -} -inline void Track::unsafe_arena_set_allocated_timestamp( - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - _impl_.timestamp_ = timestamp; - if (timestamp) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.track.Track.timestamp) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* Track::release_timestamp() { - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* Track::unsafe_arena_release_timestamp() { - // @@protoc_insertion_point(field_release:messages.track.Track.timestamp) - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* Track::_internal_mutable_timestamp() { - - if (_impl_.timestamp_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaForAllocation()); - _impl_.timestamp_ = p; - } - return _impl_.timestamp_; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* Track::mutable_timestamp() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_timestamp(); - // @@protoc_insertion_point(field_mutable:messages.track.Track.timestamp) - return _msg; -} -inline void Track::set_allocated_timestamp(::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timestamp_); - } - if (timestamp) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timestamp)); - if (message_arena != submessage_arena) { - timestamp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, timestamp, submessage_arena); - } - - } else { - - } - _impl_.timestamp_ = timestamp; - // @@protoc_insertion_point(field_set_allocated:messages.track.Track.timestamp) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace track -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_Track_2eproto diff --git a/include/SimCore/Messages/Protos/Track.proto b/include/SimCore/Messages/Protos/Track.proto deleted file mode 100644 index 2c0e372..0000000 --- a/include/SimCore/Messages/Protos/Track.proto +++ /dev/null @@ -1,36 +0,0 @@ - -// [START declaration] -syntax = "proto3"; -package messages.track; - -import "google/protobuf/timestamp.proto"; - -import "GeocentricPosition.proto"; -import "Identifier.proto"; - -// [END declaration] - - -// [START messages] -message Track { - // uint32 trackNo = 1; - // bool external = 2; - // message DISEntityID { - // uint32 site = 1; - // uint32 application = 2; - // uint32 entity = 3; - // } - - Identifier EntityIdentifier = 1; - - - - EntityGeocentricPosition GeocentricPosition = 2; - double Speed = 3; - double Course = 4; - - // DISEntityID EntityID = 2; - - google.protobuf.Timestamp timestamp = 6; -} - diff --git a/include/SimCore/Messages/RadarTrack.hpp b/include/SimCore/Messages/RadarTrack.hpp deleted file mode 100644 index cb7ac1a..0000000 --- a/include/SimCore/Messages/RadarTrack.hpp +++ /dev/null @@ -1,125 +0,0 @@ -#pragma once - -#include "SimCore/Identifier.hpp" -#include "SimCore/Messages/Protos/RadarTrack.pb.h" -#include "SimCore/SimCore.hpp" -#include "google/protobuf/any.pb.h" -#include -#include - -#include - - -#include - -#include -#include -#include -#include -#include - -namespace SimCore { - -class RadarTrack : public Track { - -private: - - - /// position of the track - Position position_; - /// speed the track - double speed_ = 0; - /// course of the track - double course_ = 0; - - /// bearing - double bearing_; - ///range in meters - double range_; - //environment (AIR,SURFACE,SUBSURFACE,SPACE) - SimCore::EntityKind environemnt_; - - - -public: - - - /** - * @brief constructor for building a track which is also the trackmessage to - * send - * @param WHISPER::SourceType sourcetype of the sending device - * @param SimCore::Identifier object identifier - * - * @return - */ - RadarTrack(WHISPER::SourceType src,SimCore::Identifier id); - - - virtual WHISPER::Message buildMessage(SimCore::Identifier parentID) override; - - - /** - * @brief set the position of the track - * @param Position object of the position class - * - */ - void setPosition(Position pos); - - /** - * @brief set the position of the track - * @param 3x double set the x,y,z coordinates direkt which causes that an - * object of position class is created - */ - void setPosition(double x, double y, double z); - - /** - * @brief returns the position - * @return object of position class - * - */ - Position getPostion(); - - /// sets speed - void setSpeed(double speed); - - /// set speed in knots - void setSpeedinKnots(double knots); - - /// return sspeed - double getSpeed(); - - /// returns speed as knots - double getSpeedinKnots(); - - /// set course - void setCourse(double course); - - /// returns course - double getCourse(); - - /// set course - void setBearing(double bearing); - - /// returns course - double getBearing(); - - /// set course - void setRange(double range); - - /// returns course - double getRange(); - - /// set course - void setEnvironment(SimCore::EntityKind); - - /// returns course - SimCore::EntityKind getEnvironment(); - - /// set external indicator - void setExternal(bool val); - - static RadarTrack unpack(WHISPER::Message msg); - - -}; -} // namespace SimCore \ No newline at end of file diff --git a/include/SimCore/Messages/SensorTrack.hpp b/include/SimCore/Messages/SensorTrack.hpp deleted file mode 100644 index fba01ae..0000000 --- a/include/SimCore/Messages/SensorTrack.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once - -#include "SimCore/Identifier.hpp" -#include "SimCore/Messages/Protos/SensorTrack.pb.h" -#include "SimCore/SimCore.hpp" -#include "WHISPER/Messages/Message.hpp" -#include - -#include - - -namespace SimCore -{ - - class SensorTrack : public WHISPER::Message - { - private: - - /// ID of the object - SimCore::Identifier ID_; - - - - protected: - - - void setID(SimCore::Identifier id); - - - /// message object from google protobuf - messages::track::SensorTrack sensorTrackMessage_; - - public: - SensorTrack(); - SensorTrack(WHISPER::Message receivedMessageObj); - - SensorTrack(WHISPER::SourceType src,SimCore::Identifier id,SimCore::TrackKind trackkind); - - SimCore::TrackKind trackKind_ = UNKNOWN_TRACK; - - SimCore::Identifier getID(); - - - }; - - -} \ No newline at end of file diff --git a/include/SimCore/Messages/Track.hpp b/include/SimCore/Messages/Track.hpp deleted file mode 100644 index baecab3..0000000 --- a/include/SimCore/Messages/Track.hpp +++ /dev/null @@ -1,70 +0,0 @@ -#pragma once - - -#include "SimCore/Identifier.hpp" -#include "SimCore/SimCore.hpp" -#include "google/protobuf/any.pb.h" -#include -#include -#include - -#include - - -#include -#include -#include -#include -#include -#include - -namespace SimCore { - - - - class Track - { - private: - /// ID of the object - const SimCore::Identifier ID_; - - const SimCore::TrackKind TrackKind_ = UNKNOWN_TRACK; - - const WHISPER::SourceType SourceType_; - - const SimCore::ObjectSource ObjectSource_; - - - - public: - - /** - * @brief constructor for building a track which is also the trackmessage to send - * @param WHISPER::SourceType sourcetype of the sending device - * @param SimCore::Identifier object identifier - * - * @return - */ - Track( WHISPER::SourceType src,SimCore::Identifier id, SimCore::TrackKind trackkind,SimCore::ObjectSource ObjectSource = EXTERNAL); - - - - const SimCore::Identifier getIdentifier(); - - const SimCore::TrackKind getTrackkind(); - - const WHISPER::SourceType getSourceType(); - - const SimCore::ObjectSource getObjectSource(); - - - - protected: - - virtual WHISPER::Message buildMessage(SimCore::Identifier parentID) = 0; - - - - - }; -} \ No newline at end of file diff --git a/include/SimCore/Templates/Entity.hpp b/include/SimCore/Templates/Entity.hpp deleted file mode 100644 index 699fb9c..0000000 --- a/include/SimCore/Templates/Entity.hpp +++ /dev/null @@ -1,116 +0,0 @@ -#pragma once - - - -#include "SimCore/Messages/GroundThruthTrack.hpp" -#include "SimCore/Messages/Track.hpp" -#include "SimCore/SafeMap.hpp" -#include "SimCore/SimCore.hpp" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace SimCore { - - struct SensorData - { - std::string SensorName; - bool isActive; - SimCore::Identifier SensorID; - std::shared_ptr SensorSender; - }; - - struct EffectorData - { - std::string EffectorName; - bool isActive; - SimCore::Identifier EffectorID; - std::shared_ptr EffectorSender; - }; - - - - class Entity { - public: - Entity(const SimCore::Identifier OwnID, - std::string EnttityName, - WHISPER::SourceType OwnType, - SimCore::Identifier ParentID, - SimCore::EntityKind EntityKind, - std::uint32_t GroundTruthPort, - std::uint32_t CommandPort, - std::string CommandIPAddress); - // ~Entity(); - void start(); - void stop(); - - - protected: - - std::shared_ptr> incommingCommandMessages = nullptr; - std::shared_ptr> outgoingCommandMessages = nullptr; - - virtual void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) = 0; - virtual void specificReloadCharacteristicts() = 0; - - std::shared_ptr ownShipPosition_ = nullptr; - - private: - - std::string EntityName_; - - - - - SimCore::GroundTruthTrack ownTrack_; - SimCore::Identifier ParentID_; - SimCore::EntityKind EntityKind_; - std::uint32_t GroundTruthPort_; - std::uint32_t CommandPort_; - std::string CommandIPAddress_; - - - std::vector threads; - - - std::atomic stopCommandWorker = false; - std::atomic stopSensorWorker = false; - std::atomic stopTrackWorker = false; - std::atomic stopPhysicsWorker = false; - - - std::atomic physicsIsRunning = false; - - - void CommandWorker(); - void SensorWorker(); - void TrackWorker(); - void physicsWorker(); - - - void startSensor(); - - - - std::shared_ptr GroundTruthUDPSender_ = nullptr; - - std::shared_ptr> SensorStore_; - - std::shared_ptr>> Trackstore_; - - - }; -} \ No newline at end of file diff --git a/include/SimCore/Templates/Sensor.hpp b/include/SimCore/Templates/Sensor.hpp deleted file mode 100644 index 05dbb1a..0000000 --- a/include/SimCore/Templates/Sensor.hpp +++ /dev/null @@ -1,78 +0,0 @@ -#pragma once - - - -#include "SimCore/Messages/GroundThruthTrack.hpp" -#include "SimCore/Messages/Track.hpp" -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace SimCore { - - class Sensor { - public: - Sensor(SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress); - ~Sensor(); - void start(); - void stop(); - - protected: - std::shared_ptr> incommingTrackMessages = nullptr; - - - std::shared_ptr> incommingGroundThruthMessages = nullptr; - std::shared_ptr> outgoingGroundThruthMessages = nullptr; - - std::shared_ptr> incommingParentMessages = nullptr; - std::shared_ptr> outgoingParentMessages = nullptr; - - virtual void specificSensorCalculations() = 0; - virtual void specificReloadCharacteristicts() = 0; - - std::shared_ptr ownShipPosition_ = nullptr; - - private: - - SimCore::Identifier OwnID_; - SimCore::Identifier ParentID_; - SimCore::SensorKinds SensorKind_; - std::uint32_t GroundTruthPort_; - std::uint32_t ParentPort_; - std::string ParentIPAddress_; - - std::shared_ptr GroundTruthUDPService_ = nullptr; - std::shared_ptr ParentUDPService_ = nullptr; - - void groundThruthData(); - void parentData(); - - void SensorCalculations(); - void ReloadCharacteristicts(); - - std::atomic stopReceivingGroundThruth = false; - std::atomic ReceivingGroundThruthIsRunnung = false; - - std::atomic stopsendCalculatedData = false; - std::atomic sendCalculatedDataIsRunnung = false; - - std::atomic stopCalculationData = false; - std::atomic CalculationIsRunnung = false; - - - std::thread receiveGroundTruthThread; - std::thread sendCalculatedDataThread; - - std::thread sensorCalculationThread; - - - - }; -} \ No newline at end of file diff --git a/libs/whisper-com b/libs/whisper-com index 9ffa958..6d0f7ed 160000 --- a/libs/whisper-com +++ b/libs/whisper-com @@ -1 +1 @@ -Subproject commit 9ffa95877b8e1f165ec744a27c94e899f6494e38 +Subproject commit 6d0f7edc6782d8eb669c2561dab773a882fedb0a diff --git a/src/SimCore/Identifier.cpp b/src/SimCore/Identifier.cpp index d300758..5b8dd97 100644 --- a/src/SimCore/Identifier.cpp +++ b/src/SimCore/Identifier.cpp @@ -1,5 +1,6 @@ #include "SimCore/SimCore.hpp" #include +#include #include #include #include @@ -11,24 +12,18 @@ namespace SimCore { - Identifier::Identifier():uuid_(xg::newGuid().str()) + Identifier::Identifier(bool external):uuid_(xg::newGuid().str()),external_(external) {} -Identifier::Identifier(std::uint32_t parent,std::uint32_t number, std::string uuid,bool external):parent_(parent),number_(number),external_(external),uuid_(uuid) + +Identifier::Identifier(xg::Guid uuid,bool external ):uuid_(uuid.str()),external_(external) { } -Identifier::Identifier(std::uint32_t parent,std::uint32_t number,bool external):parent_(parent),number_(number),external_(external),uuid_(xg::newGuid().str()) -{ - -} - SimCore::Identifier::Identifier(messages::track::Identifier id) { this->uuid_ = id.uuid(); - this->parent_ = id.parent(); - this->number_ = id.number(); this->external_ = id.external(); } @@ -36,43 +31,30 @@ SimCore::Identifier::Identifier(messages::track::Identifier id) Identifier::Identifier(std::string str) { std::vector var = UtilFunctions::explode(str,StringDelimiter); - if (UtilFunctions::isNumber(var[0])) { - parent_ = stoi(var[0]); + + if (var[0] != "") { + uuid_ = var[0]; } if (UtilFunctions::isNumber(var[1])) { - number_ = stoi(var[1]); - } - if (UtilFunctions::isNumber(var[2])) { - external_ = (bool)stoi(var[2]); - } - if (var[3] != "") { - uuid_ = var[3]; + external_ = (bool)stoi(var[1]); } } std::string Identifier::serialize() const { -return std::to_string(parent_) + StringDelimiter + std::to_string(number_) + StringDelimiter + std::to_string(external_) + StringDelimiter + uuid_; +return uuid_+ StringDelimiter + std::to_string(external_); } -std::uint32_t Identifier::getNumber() const -{ - return number_; -} -std::uint32_t Identifier::getParentNumber() const -{ - return parent_; -} bool Identifier::isValid() { - if (number_ > 0) { + if (std::empty(this->uuid_) ) { return true; }else { - return false; + return false; } } @@ -95,15 +77,11 @@ std::string Identifier::getUUID() const bool operator==(const Identifier &lhs,const Identifier &rhs){ - if (lhs.uuid_ == rhs.uuid_) { + if (lhs.uuid_ == rhs.uuid_ && lhs.external_ == rhs.external_) { return true; } - if (lhs.number_ == rhs.number_ && lhs.external_ == rhs.external_ && lhs.parent_ == rhs.parent_) { - return true; - }else{ - return false; - } + return false; } diff --git a/src/SimCore/IdentifierMaker.cpp b/src/SimCore/IdentifierMaker.cpp index c5934c0..2428b52 100644 --- a/src/SimCore/IdentifierMaker.cpp +++ b/src/SimCore/IdentifierMaker.cpp @@ -18,20 +18,15 @@ std::shared_ptr IdentifierMaker::getNewIdentifier(std::uint int lastNumber = 0; if (size > 0) { - for (std::list>::iterator it=IDList_.begin(); it != IDList_.end(); ++it){ - if (ObjectSource == it->get()->isExternal()) { - lastNumber = it->get()->getNumber(); - } - } + - int newNumber = lastNumber+1; - auto id_ = std::make_shared(parent,newNumber,ObjectSource); + auto id_ = std::make_shared(ObjectSource); IDList_.push_back(id_); return id_; }else{ - auto id_ = std::make_shared(parent,1,ObjectSource); + auto id_ = std::make_shared(ObjectSource); IDList_.push_back(id_); return id_; } diff --git a/src/SimCore/Messages/ESMTrack.cpp b/src/SimCore/Messages/ESMTrack.cpp deleted file mode 100644 index c7cdc17..0000000 --- a/src/SimCore/Messages/ESMTrack.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include - - -namespace SimCore -{ - - ESMTrack::ESMTrack(WHISPER::SourceType src,SimCore::Identifier id): - Track(src,id,SimCore::TrackKind::RADAR_TRACK) - - { - - } - - WHISPER::Message ESMTrack::buildMessage(SimCore::Identifier parentID) - { - - - - } - - - - -} \ No newline at end of file diff --git a/src/SimCore/Messages/Emission.cpp b/src/SimCore/Messages/Emission.cpp index d756c24..c42c950 100644 --- a/src/SimCore/Messages/Emission.cpp +++ b/src/SimCore/Messages/Emission.cpp @@ -20,9 +20,7 @@ namespace SimCore messages::SimTrack::Emission msg; msg.set_name(this->name_.getValue()); - msg.mutable_identifier()->set_number(this->ID_.getNumber()); msg.mutable_identifier()->set_external((uint32_t)this->ID_.isExternal()); - msg.mutable_identifier()->set_parent(this->ID_.getParentNumber()); msg.mutable_identifier()->set_uuid(this->ID_.getUUID()); msg.set_range(Range.getValue()); diff --git a/src/SimCore/Messages/GroundThruthTrack.cpp b/src/SimCore/Messages/GroundThruthTrack.cpp deleted file mode 100644 index 9b67aed..0000000 --- a/src/SimCore/Messages/GroundThruthTrack.cpp +++ /dev/null @@ -1,114 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - - - - -namespace SimCore -{ - [[deprecated("use SimTrack instead")]] - GroundTruthTrack::GroundTruthTrack(WHISPER::SourceType src,SimCore::Identifier id,SimCore::TrackKind kind):Track(src, id, kind) - { - - } - - WHISPER::Message GroundTruthTrack::buildMessage(SimCore::Identifier parentID) - { - WHISPER::Message msg(parentID.getParentNumber(), parentID.getNumber(),WHISPER::MsgTopics::TRACK , WHISPER::MsgType::GROUND_TRUTH_TRACK, WHISPER::SourceType::GATEWAY); - - - messages::track::GroundTruthTrack groundTruthTrack; - - groundTruthTrack.mutable_geocentricposition()->set_x(position_.getGeocentricPos()(SimCore::X)); - groundTruthTrack.mutable_geocentricposition()->set_y(position_.getGeocentricPos()(SimCore::Y)); - groundTruthTrack.mutable_geocentricposition()->set_z(position_.getGeocentricPos()(SimCore::Z)); - - groundTruthTrack.set_contactspeed(speed_); - groundTruthTrack.set_contactcourse(course_); - - - - groundTruthTrack.mutable_entityidentifier()->set_number(this->getIdentifier().getNumber()); - groundTruthTrack.mutable_entityidentifier()->set_external((uint32_t)this->getIdentifier().isExternal()); - groundTruthTrack.mutable_entityidentifier()->set_parent(this->getIdentifier().getParentNumber()); - - - groundTruthTrack.mutable_timestamp()->set_seconds(time(NULL)); - - auto any = std::make_shared(); - - any->PackFrom(groundTruthTrack); - msg.addPayLoad(any); - - return msg; - } - - void GroundTruthTrack::setPosition(Position pos) { - position_ = pos; - } - - void GroundTruthTrack::setPosition(double x, double y, double z) { - Position pos(x, y, z); - position_ = pos; - } - - Position GroundTruthTrack::getPostion() { return position_; } - - void GroundTruthTrack::setSpeed(double speed) { - speed_ = speed; - } - void GroundTruthTrack::setCourse(double course) { - course_ = course; - } - - void GroundTruthTrack::setSpeedinKnots(double knots) { - speed_ = knots / SimCore::MsKt; - } - - void GroundTruthTrack::setEnvironment(SimCore::EntityKind env ) - { - environemnt_ = env; - } - - double GroundTruthTrack::getSpeed() { return speed_; } - double GroundTruthTrack::getSpeedinKnots() { return speed_ * SimCore::MsKt; } - double GroundTruthTrack::getCourse() { return course_; } - SimCore::EntityKind GroundTruthTrack::getEnvironment(){ return environemnt_; } - - - - - GroundTruthTrack GroundTruthTrack::unpack(WHISPER::Message msg) - { - auto m = msg.getProtoMessage(); - - auto trackMsg = messages::track::GroundTruthTrack(); - if(m.payload().Is()) - { - m.payload().UnpackTo(&trackMsg); - } - SimCore::Identifier id(trackMsg.mutable_entityidentifier()->parent(),trackMsg.mutable_entityidentifier()->number(),trackMsg.mutable_entityidentifier()->external()); - GroundTruthTrack track((WHISPER::SourceType)m.sourcetype(), id,(SimCore::TrackKind)trackMsg.trackkind()); - if (trackMsg.has_geocentricposition()) - { - track.setPosition(trackMsg.mutable_geocentricposition()->x(), trackMsg.mutable_geocentricposition()->y(), trackMsg.mutable_geocentricposition()->z()); - } - if (trackMsg.has_contactcourse()) - { - track.setCourse(trackMsg.contactcourse()); - } - if (trackMsg.has_contactspeed()) - { - track.setSpeed(trackMsg.contactspeed()); - } - - - return track; - } - -} \ No newline at end of file diff --git a/src/SimCore/Messages/RadarTrack.cpp b/src/SimCore/Messages/RadarTrack.cpp deleted file mode 100644 index 335752d..0000000 --- a/src/SimCore/Messages/RadarTrack.cpp +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace SimCore { - - - -RadarTrack::RadarTrack( WHISPER::SourceType src,SimCore::Identifier id) - : Track(src,id,SimCore::TrackKind::RADAR_TRACK) - { - - - } - -WHISPER::Message RadarTrack::buildMessage(SimCore::Identifier parentID) -{ - WHISPER::Message msg(parentID.getParentNumber(), parentID.getNumber(),WHISPER::MsgTopics::TRACK , WHISPER::MsgType::RADAR_TRACK, WHISPER::SourceType::SENSOR); - - messages::track::RadarTrack radarTrack; - - radarTrack.mutable_geocentricposition()->set_x(position_.getGeocentricPos()(SimCore::X)); - radarTrack.mutable_geocentricposition()->set_y(position_.getGeocentricPos()(SimCore::Y)); - radarTrack.mutable_geocentricposition()->set_z(position_.getGeocentricPos()(SimCore::Z)); - - radarTrack.set_contactspeed(speed_); - radarTrack.set_contactcourse(course_); - radarTrack.set_contactbearing(bearing_); - radarTrack.set_contactrange(range_); - radarTrack.set_contactenvironemnt((uint32_t)environemnt_); - - messages::track::SensorTrack SensorTrack; - - SensorTrack.mutable_entityidentifier()->set_number(this->getIdentifier().getNumber()); - SensorTrack.mutable_entityidentifier()->set_external((uint32_t)this->getIdentifier().isExternal()); - SensorTrack.mutable_entityidentifier()->set_parent(this->getIdentifier().getParentNumber()); - SensorTrack.mutable_entityidentifier()->set_uuid(this->getIdentifier().getUUID()); - - - SensorTrack.mutable_radartrack()->CopyFrom(radarTrack); - SensorTrack.mutable_timestamp()->set_seconds(time(NULL)); - - auto any = std::make_shared(); - - any->PackFrom(SensorTrack); - msg.addPayLoad(any); - -return msg; -} - -void RadarTrack::setPosition(Position pos) { - position_ = pos; -} - -void RadarTrack::setPosition(double x, double y, double z) { - Position pos(x, y, z); - position_ = pos; -} - -Position RadarTrack::getPostion() { return position_; } - -void RadarTrack::setSpeed(double speed) { - speed_ = speed; -} -void RadarTrack::setCourse(double course) { - course_ = course; -} - -void RadarTrack::setSpeedinKnots(double knots) { - speed_ = knots / SimCore::MsKt; -} - -void RadarTrack::setBearing(double bearing) { - bearing_ = bearing; -} - -void RadarTrack::setRange(double range) { - range_ = range; -} - -void RadarTrack::setEnvironment(SimCore::EntityKind env ) -{ - environemnt_ = env; -} - - - -double RadarTrack::getSpeed() { return speed_; } -double RadarTrack::getSpeedinKnots() { return speed_ * SimCore::MsKt; } -double RadarTrack::getCourse() { return course_; } -double RadarTrack::getBearing() { return bearing_; } -double RadarTrack::getRange() { return range_; } -SimCore::EntityKind RadarTrack::getEnvironment(){ return environemnt_; } - - - -RadarTrack RadarTrack::unpack(WHISPER::Message msg) -{ - auto m = msg.getProtoMessage(); - - auto SensortrackMsg = messages::track::SensorTrack(); - if(m.payload().Is()) - { - m.payload().UnpackTo(&SensortrackMsg); - } - - SimCore::Identifier id(SensortrackMsg.mutable_entityidentifier()->parent(), - SensortrackMsg.mutable_entityidentifier()->number(), - SensortrackMsg.mutable_entityidentifier()->uuid(), - SensortrackMsg.mutable_entityidentifier()->external()); - - RadarTrack track((WHISPER::SourceType)m.sourcetype(), id); - - if (SensortrackMsg.has_radartrack()) - { - auto radarTrack = SensortrackMsg.radartrack(); - - track.setPosition(radarTrack.mutable_geocentricposition()->x(), radarTrack.mutable_geocentricposition()->y(), radarTrack.mutable_geocentricposition()->z()); - track.setCourse(radarTrack.contactcourse()); - track.setSpeed(radarTrack.contactspeed()); - track.setBearing(radarTrack.contactbearing()); - track.setEnvironment((SimCore::EntityKind)radarTrack.contactenvironemnt()); - - - } - - - return track; -} - -} // namespace SimCore \ No newline at end of file diff --git a/src/SimCore/Messages/SensorTrack.cpp b/src/SimCore/Messages/SensorTrack.cpp deleted file mode 100644 index e80e47c..0000000 --- a/src/SimCore/Messages/SensorTrack.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include "SimCore/Identifier.hpp" -#include "WHISPER/Messages/Message.hpp" -#include - - - - -namespace SimCore -{ - SensorTrack::SensorTrack(WHISPER::SourceType src,SimCore::Identifier id,SimCore::TrackKind trackkind):trackKind_(trackkind),ID_(id), - Message(id.getUUID(),WHISPER::MsgTopics::TRACK,WHISPER::SENSOR_TRACK,src) - { - - } - SensorTrack::SensorTrack() - {} - - SensorTrack::SensorTrack(WHISPER::Message receivedMessageObj) - { - if (receivedMessageObj.msgType_ == WHISPER::MsgType::SENSOR_TRACK) - { - - msg = messages::header::Message(); - msg.ParseFromString(receivedMessageObj.serialize()); - topic_ = msg.topic(); - sourceType_ = msg.sourcetype(); - msgType_ = msg.msgtype(); - - - if (msg.mutable_payload()->Is()) - { - auto SensorTrackMessage = messages::track::SensorTrack(); - msg.mutable_payload()->UnpackTo(&SensorTrackMessage); - if (SensorTrackMessage.has_radartrack()) - { - - - } - }else if (msg.mutable_payload()->Is()) - { - auto trackMessage = new messages::track::RadarTrack(); - msg.mutable_payload()->UnpackTo(trackMessage); - - } - - - } - } - - - - void SensorTrack::setID(SimCore::Identifier id) - { - ID_ = id; - } - - SimCore::Identifier SensorTrack::getID() - { - return ID_; - } - -} - diff --git a/src/SimCore/Messages/SimTrack.cpp b/src/SimCore/Messages/SimTrack.cpp index 5df507c..8b45dc9 100644 --- a/src/SimCore/Messages/SimTrack.cpp +++ b/src/SimCore/Messages/SimTrack.cpp @@ -91,9 +91,7 @@ namespace SimCore if(RCS.isValid()) SimTrack.set_contactrcs(this->RCS.getValue()); - SimTrack.mutable_entityidentifier()->set_number(this->ID_.getNumber()); SimTrack.mutable_entityidentifier()->set_external((uint32_t)this->ID_.isExternal()); - SimTrack.mutable_entityidentifier()->set_parent(this->ID_.getParentNumber()); SimTrack.mutable_entityidentifier()->set_uuid(this->ID_.getUUID()); std::vector>::iterator it; @@ -128,7 +126,7 @@ namespace SimCore m.payload().UnpackTo(&trackMsg); } - SimCore::Identifier id(trackMsg.mutable_entityidentifier()->parent(),trackMsg.mutable_entityidentifier()->number(),trackMsg.mutable_entityidentifier()->uuid(),trackMsg.mutable_entityidentifier()->external()); + SimCore::Identifier id(trackMsg.mutable_entityidentifier()); WHISPER::SourceType sourcetype = (WHISPER::SourceType)trackMsg.contactsourcetype(); diff --git a/src/SimCore/Messages/Track.cpp b/src/SimCore/Messages/Track.cpp deleted file mode 100644 index cd1d927..0000000 --- a/src/SimCore/Messages/Track.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "SimCore/Identifier.hpp" -#include "SimCore/Position.hpp" -#include "SimCore/SimCore.hpp" -#include "WHISPER/Messages/Message.hpp" -#include "google/protobuf/message.h" -#include "google/protobuf/timestamp.pb.h" -#include -#include -#include -#include -#include - - - - -namespace SimCore { - - - - Track::Track( WHISPER::SourceType src,SimCore::Identifier id, SimCore::TrackKind trackkind,SimCore::ObjectSource ObjectSource ) - :ID_(id),TrackKind_(trackkind),SourceType_(src),ObjectSource_(ObjectSource) - { - } - - const SimCore::Identifier Track::getIdentifier () - { - return ID_; - } - - const SimCore::TrackKind Track::getTrackkind() - { - return TrackKind_; - } - - const WHISPER::SourceType Track::getSourceType() - { - return SourceType_; - } - - const SimCore::ObjectSource Track::getObjectSource() - { - return ObjectSource_; - } - - - - -} \ No newline at end of file diff --git a/src/SimCore/Templates/Entity.cpp b/src/SimCore/Templates/Entity.cpp deleted file mode 100644 index dce4b7a..0000000 --- a/src/SimCore/Templates/Entity.cpp +++ /dev/null @@ -1,182 +0,0 @@ -#include "WHISPER/InternalUDPListener.hpp" -#include "WHISPER/InternalUDPSender.hpp" -#include "WHISPER/Messages/Message.hpp" -#include "WHISPER/Messages/stringData.hpp" -#include "WHISPER/threadSafeQueue.hpp" -#include -#include - -#include -#include -#include - - - -#define calculationPeriode 100 - -namespace SimCore -{ - - Entity::Entity(const SimCore::Identifier OwnID, - std::string EnttityName, - WHISPER::SourceType OwnType, - SimCore::Identifier ParentID, - SimCore::EntityKind EntityKind, - std::uint32_t GroundTruthPort, - std::uint32_t CommandPort, - std::string CommandIPAddress):EntityName_(EnttityName), - ownTrack_(OwnType, OwnID, SimCore::TrackKind::GROUND_TRUTH_TRACK), - ParentID_(ParentID), - EntityKind_(EntityKind), - GroundTruthPort_(GroundTruthPort), - CommandPort_(CommandPort), - CommandIPAddress_(CommandIPAddress) - - { - - } - - void Entity::start() - { - - stopCommandWorker = false; - stopSensorWorker = false; - stopTrackWorker = false; - stopPhysicsWorker = false; - - threads.emplace_back(std::thread(&Entity::CommandWorker,this)); - threads.emplace_back(std::thread(&Entity::SensorWorker,this)); - threads.emplace_back(std::thread(&Entity::TrackWorker,this)); - threads.emplace_back(std::thread(&Entity::physicsWorker,this)); - - - } - - void Entity::stop() - { - stopCommandWorker = true; - stopSensorWorker = true; - stopTrackWorker = true; - stopPhysicsWorker = true; - // for (auto &th :threads) - // { - // if (th.joinable()) { - // th.join(); - // } - - // } - - - for (std::vector::iterator it = threads.begin(); it != threads.end();) - { - if (it->joinable()) - { - it->join(); - it = threads.erase(it); - } - - } - - LOG_S(ERROR)<< threads.size(); - - - - - } - - void Entity::physicsWorker() - { - physicsIsRunning = true; - - while (!stopPhysicsWorker) { - auto start = std::chrono::steady_clock::now(); - - - std::this_thread::sleep_for(std::chrono::milliseconds(calculationPeriode)); - - - auto end = std::chrono::steady_clock::now(); - std::chrono::milliseconds::rep duration = std::chrono::duration_cast(end - start).count(); - specificPhysicsCalculations(duration); - } - - physicsIsRunning = false; - } - - - - void Entity::CommandWorker() - { - auto CommandUDPListener = std::make_shared(CommandPort_) ; - auto receiverQueue = std::make_shared>(); - CommandUDPListener->connect(receiverQueue); - - - auto CommandUDPSender = std::make_shared(CommandIPAddress_,CommandPort_); - - - while (!stopCommandWorker) - { - if (receiverQueue->size() > 0) { - - auto msg = WHISPER::Message(); - receiverQueue->get(msg); - - switch (msg.msgType_) { - - case WHISPER::MsgType::STRINGDATA :{ - WHISPER::StringData stringMsg = WHISPER::StringData(msg.serialize()); - std::string str = stringMsg.data_; - break; - } - - case WHISPER::MsgType::COMMAND: { - WHISPER::StringData string = WHISPER::StringData(msg.serialize()); - break; - } - } - - } - - - LOG_S(INFO)<<"hello from command worker"; - std::this_thread::sleep_for(std::chrono::milliseconds(900)); - - } - - - } - - void Entity::SensorWorker() - { - - - while (!stopSensorWorker) - { - LOG_S(INFO)<<"hello from sensor worker"; - std::this_thread::sleep_for(std::chrono::milliseconds(900)); - - } - - } - - void Entity::TrackWorker() - { - while (!stopTrackWorker) - { - LOG_S(INFO)<<"hello from track worker"; - std::this_thread::sleep_for(std::chrono::milliseconds(900)); - - } - - } - - void Entity::startSensor() - { - - LOG_S(ERROR)<< "starting new pods is not implemented yet"; - } - - - -} \ No newline at end of file diff --git a/src/SimCore/Templates/Sensor.cpp b/src/SimCore/Templates/Sensor.cpp deleted file mode 100644 index ddf06b1..0000000 --- a/src/SimCore/Templates/Sensor.cpp +++ /dev/null @@ -1,214 +0,0 @@ -#include "SimCore/Messages/GroundThruthTrack.hpp" -#include "SimCore/Messages/Track.hpp" -#include "SimCore/Position.hpp" -#include "SimCore/SimCore.hpp" -#include "SimCore/UtilFunctions.hpp" -#include "WHISPER/Messages/Message.hpp" -#include -#include - -namespace SimCore { - - Sensor::Sensor(SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress): - OwnID_(OwnID),ParentID_(ParentID),SensorKind_(SensorKind),GroundTruthPort_(GroundTruthPort),ParentPort_(ParentPort),ParentIPAddress_(ParentIPAddress) - { - - std::string ownIP = SimCore::UtilFunctions::getOwnIP(); - auto ip = SimCore::UtilFunctions::explode(ownIP, '.'); - ip[3] = "255"; - LOG_S(INFO)<>(); - outgoingGroundThruthMessages = std::make_shared>(); - - incommingParentMessages = std::make_shared>(); - outgoingParentMessages = std::make_shared>(); - - incommingTrackMessages = std::make_shared>(); - - - GroundTruthUDPService_ = std::make_shared(OwnID.getParentNumber(),OwnID.getNumber(),WHISPER::SENSOR,GroundTruthPort_,SimCore::UtilFunctions::implode(ip,'.'),ownIP); - ParentUDPService_ = std::make_shared(OwnID.getParentNumber(),OwnID.getNumber(),WHISPER::SENSOR,ParentPort,ParentIPAddress_,ownIP); - - - }; - - - Sensor::~Sensor(){ - // this->stop(); - if (ReceivingGroundThruthIsRunnung && sendCalculatedDataIsRunnung && CalculationIsRunnung) { - this->stop(); - } - - - this->incommingGroundThruthMessages.reset(); - - - this->outgoingGroundThruthMessages.reset(); - - - // GroundTruthUDPService_->disconnect(); - while (!this->GroundTruthUDPService_.unique()) { - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } - this->GroundTruthUDPService_.reset(); - - LOG_S(INFO)<<"groundThruth is closed"; - ParentUDPService_->disconnect(); - while (!this->ParentUDPService_.unique()) { - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } - this->ParentUDPService_.reset(); - - - LOG_S(INFO)<<"all destructed"; - - } - - void Sensor::start(){ - ReloadCharacteristicts(); - - - stopReceivingGroundThruth = false; - receiveGroundTruthThread = std::thread(&Sensor::groundThruthData,this); - - stopsendCalculatedData = false; - sendCalculatedDataThread = std::thread(&Sensor::parentData,this); - - stopCalculationData = false; - sensorCalculationThread = std::thread(&Sensor::SensorCalculations,this); - } - - void Sensor::stop() { - - - while (ReceivingGroundThruthIsRunnung == true ) { - stopReceivingGroundThruth = true; - LOG_S(INFO)<<"waiting for groundthruth thread thread"; - if (receiveGroundTruthThread.joinable() == true ) { - receiveGroundTruthThread.join(); - } - } - - while (sendCalculatedDataIsRunnung == true ) { - stopsendCalculatedData = true; - LOG_S(INFO)<<"waiting for parent sending thread thread"; - if (sendCalculatedDataThread.joinable() == true ) { - sendCalculatedDataThread.join(); - } - } - - while (CalculationIsRunnung == true ) { - stopCalculationData = true; - LOG_S(INFO)<<"waiting for calculation thread thread"; - if (sensorCalculationThread.joinable() == true ) { - - sensorCalculationThread.join(); - } - } - LOG_S(INFO)<<"all stopped"; - - } - - - void Sensor::groundThruthData() - { - this->ReceivingGroundThruthIsRunnung = true; - GroundTruthUDPService_->connect(incommingGroundThruthMessages); - GroundTruthUDPService_->subscribe(WHISPER::MsgTopicsMap[WHISPER::MsgTopics::TRACK]); - - while (stopReceivingGroundThruth == false) { - if (incommingGroundThruthMessages->size() > 0) { - WHISPER::Message msg; - incommingGroundThruthMessages->get(msg); - if (msg.msgType_ == WHISPER::MsgType::GROUND_TRUTH_TRACK) { - auto elem = GroundTruthTrack::unpack(msg); - // auto Track = SimCore::Track(msg.serialize()); - incommingTrackMessages->addElement(elem); - } - } - - if (outgoingGroundThruthMessages->size() > 0) { - WHISPER::Message msg; - outgoingGroundThruthMessages->get(msg); - GroundTruthUDPService_->publish(msg.serialize(), WHISPER::MsgTopicsMap[(WHISPER::MsgTopics)msg.topic_]); - } - - } - GroundTruthUDPService_->disconnect(); - this->ReceivingGroundThruthIsRunnung = false; - } - - void Sensor::parentData() - { - this->sendCalculatedDataIsRunnung = true; - - ParentUDPService_->connect(incommingParentMessages); - ParentUDPService_->subscribe(WHISPER::MsgTopicsMap[WHISPER::MsgTopics::COMMANDS]); - - while (stopsendCalculatedData == false) { - - if (incommingParentMessages->size() > 0) { - WHISPER::Message msg; - incommingParentMessages->get(msg); - LOG_S(INFO)<< "Message received from Parent is" << msg.msgType_; - std::uint32_t type = 0; - - if (msg.msgType_ == WHISPER::MsgType::OWN_TRACK) { - auto OwnTrack = SimCore::GroundTruthTrack::unpack(msg); - // SimCore::Track OwnTrack(msg.serialize()); - auto tmpPos = OwnTrack.getPostion().getGeocentricPos(); - if (this->ownShipPosition_ == nullptr) { - this->ownShipPosition_ = std::make_shared( - tmpPos[SimCore::GeocentricPosition::X], - tmpPos[SimCore::GeocentricPosition::Y], - tmpPos[SimCore::GeocentricPosition::Z]); - - }else { - this->ownShipPosition_->setGeocentricPos( - tmpPos[SimCore::GeocentricPosition::X], - tmpPos[SimCore::GeocentricPosition::Y], - tmpPos[SimCore::GeocentricPosition::Z]); - } - } - - } - - - - - if (outgoingParentMessages->size() > 0) { - WHISPER::Message msg; - outgoingParentMessages->get(msg); - ParentUDPService_->publish(msg.serialize(), WHISPER::MsgTopicsMap[(WHISPER::MsgTopics)msg.topic_]); - } - - } - - this->sendCalculatedDataIsRunnung = false; - } - - - void Sensor::SensorCalculations() - { - CalculationIsRunnung = true; - specificSensorCalculations(); - - while (!stopCalculationData) { - specificSensorCalculations(); - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - - } - LOG_S(INFO)<<"calculation is stopt"; - - CalculationIsRunnung = false; - } - - void Sensor::ReloadCharacteristicts() - { - - specificReloadCharacteristicts(); - } - - - -} \ No newline at end of file diff --git a/tests/test_EntityClass.cpp b/tests/test_EntityClass.cpp deleted file mode 100644 index 3265110..0000000 --- a/tests/test_EntityClass.cpp +++ /dev/null @@ -1,69 +0,0 @@ - -#include "SimCore/Identifier.hpp" -#include "WHISPER/Messages/Message.hpp" -#include -#include -#include -#include -#define CATCH_CONFIG_MAIN -#include -#include - -// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress -class Ship : public SimCore::Entity -{ - public: - Ship(SimCore::Identifier OwnID, - std::string EntityName, - WHISPER::SourceType ownType, - SimCore::Identifier ParentID, - SimCore::EntityKind EntityKind, - std::uint32_t GroundTruthPort, - std::uint32_t CommandPort, - std::string CommandIPAddress): - Entity( OwnID,EntityName,ownType, ParentID, EntityKind, GroundTruthPort, CommandPort, CommandIPAddress) - { - - } - - private: - - void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) override - { - LOG_S(INFO)<<"calculating every " << duration << "milliseconds"; - }; - - void specificReloadCharacteristicts() override - { - LOG_S(INFO)<<"loading specifications"; - }; -}; - - - - -SCENARIO("Testing the SimCore Sensor") -{ - GIVEN("different Attributes for a Track in different forms") - { - SimCore::Identifier IDParent(0,1,false); - SimCore::Identifier ID1(0,2,false); - Ship Ship(ID1,"FGS Hamburg",WHISPER::SourceType::SHIP,IDParent,SimCore::EntityKind::SURFACE,8000,8001,"127.0.0.1"); - Ship.start(); - std::this_thread::sleep_for(std::chrono::milliseconds(5000)); - Ship.stop(); - WHEN("constructing Track Object with data") - { - - THEN("check if Track attributes are correct") - { - // REQUIRE(testOperator == true); - - - - - - } //THEN - } // WHEN - } // GIVEN -} //SCENARIO \ No newline at end of file diff --git a/tests/test_IdentifierClass.cpp b/tests/test_IdentifierClass.cpp index 0cc3603..57355b8 100644 --- a/tests/test_IdentifierClass.cpp +++ b/tests/test_IdentifierClass.cpp @@ -1,4 +1,4 @@ -#include "SimCore/Identifier.hpp" +#include #include #define CATCH_CONFIG_MAIN #include @@ -11,10 +11,10 @@ SCENARIO("Testing the SimCorePositionClass") GIVEN("different position in different forms") { - SimCore::Identifier ID1(0,100,SimCore::ObjectSource::EXTERNAL); - SimCore::Identifier ID2(0,100,SimCore::ObjectSource::EXTERNAL); - SimCore::Identifier ID3(1,100,SimCore::ObjectSource::INTERNAL); - SimCore::Identifier ID4(1,200,SimCore::ObjectSource::INTERNAL); + SimCore::Identifier ID1(true); + SimCore::Identifier ID2(); + SimCore::Identifier ID3(); + SimCore::Identifier ID4(); WHEN("constructing Position Object with data") @@ -25,12 +25,10 @@ SCENARIO("Testing the SimCorePositionClass") THEN("positions attributes are correct") { - REQUIRE(ID1.getNumber() == 100); - REQUIRE(ID1.isExternal() == true); - REQUIRE(ID1.getParentNumber() == 0); + REQUIRE(ID1.isValid() == 100); REQUIRE(ID1.isExternal() == true); - REQUIRE(ID1 == ID2); + REQUIRE(ID1 != ID2); REQUIRE(ID1 != ID3); REQUIRE(ID4 != ID3); diff --git a/tests/test_SensorClass.cpp b/tests/test_SensorClass.cpp deleted file mode 100644 index 852b52f..0000000 --- a/tests/test_SensorClass.cpp +++ /dev/null @@ -1,67 +0,0 @@ - -#include "SimCore/Identifier.hpp" -#include -#include -#include -#define CATCH_CONFIG_MAIN -#include -#include - -// SimCore::Identifier OwnID, SimCore::Identifier ParentID, SimCore::SensorKinds SensorKind,std::uint32_t GroundTruthPort, std::uint32_t ParentPort,std::string ParentIPAddress -class Radar : public SimCore::Sensor -{ - public: - Radar(SimCore::Identifier OwnID, - SimCore::Identifier ParentID, - SimCore::SensorKinds SensorKind, - std::uint32_t GroundTruthPort, - std::uint32_t ParentPort, - std::string ParentIPAddress, - std::string radarType):SimCore::Sensor(OwnID, ParentID, SensorKind, GroundTruthPort, ParentPort, ParentIPAddress),radarType_(radarType) - { - - } - - private: - std::string radarType_; - - void specificSensorCalculations() override - { - LOG_S(INFO)<<"calculating"; - }; - - void specificReloadCharacteristicts() override - { - LOG_S(INFO)<<"loading specifications"; - }; -}; - - - - -SCENARIO("Testing the SimCore Sensor") -{ - GIVEN("different Attributes for a Track in different forms") - { - SimCore::Identifier IDParent(0,1,false); - SimCore::Identifier IDRadar(1,1,false); - - Radar Radar(IDRadar,IDParent,SimCore::SensorKinds::RADAR,8000,8001,"127.0.0.1","APAR"); - Radar.start(); - - WHEN("constructing Track Object with data") - { - - std::this_thread::sleep_for(std::chrono::milliseconds(1000)); - THEN("check if Track attributes are correct") - { - // REQUIRE(testOperator == true); - - - - - - } //THEN - } // WHEN - } // GIVEN -} //SCENARIO \ No newline at end of file