diff --git a/CMakeLists.txt b/CMakeLists.txt index ca503f1..ebb69a0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ ENDIF() set(protobuf_BUILD_TESTS OFF CACHE INTERNAL "") set(protobuf_BUILD_EXAMPLES OFF CACHE INTERNAL "") -add_subdirectory(libs/protobuf EXCLUDE_FROM_ALL) +add_subdirectory(libs/protobuf ) include(protobuf) protobuf_generate_cpp(PROTO_PATH include/WHISPER/Messages/Protos/ CPP_PATH include/WHISPER/Messages/Protos HPP_PATH include/WHISPER/Messages/Protos) diff --git a/include/WHISPER/Messages/Protos/raw_track.pb.h b/include/WHISPER/Messages/Protos/raw_track.pb.h deleted file mode 100644 index 5f6f878..0000000 --- a/include/WHISPER/Messages/Protos/raw_track.pb.h +++ /dev/null @@ -1,709 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: raw_track.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_raw_5ftrack_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_raw_5ftrack_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 -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_raw_5ftrack_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_raw_5ftrack_2eproto { - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_raw_5ftrack_2eproto; -namespace messages { -namespace raw_track { -class RawTrack; -struct RawTrackDefaultTypeInternal; -extern RawTrackDefaultTypeInternal _RawTrack_default_instance_; -class RawTrack_DISEntityID; -struct RawTrack_DISEntityIDDefaultTypeInternal; -extern RawTrack_DISEntityIDDefaultTypeInternal _RawTrack_DISEntityID_default_instance_; -} // namespace raw_track -} // namespace messages -PROTOBUF_NAMESPACE_OPEN -template<> ::messages::raw_track::RawTrack* Arena::CreateMaybeMessage<::messages::raw_track::RawTrack>(Arena*); -template<> ::messages::raw_track::RawTrack_DISEntityID* Arena::CreateMaybeMessage<::messages::raw_track::RawTrack_DISEntityID>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace messages { -namespace raw_track { - -// =================================================================== - -class RawTrack_DISEntityID final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.raw_track.RawTrack.DISEntityID) */ { - public: - inline RawTrack_DISEntityID() : RawTrack_DISEntityID(nullptr) {} - ~RawTrack_DISEntityID() override; - explicit PROTOBUF_CONSTEXPR RawTrack_DISEntityID(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - RawTrack_DISEntityID(const RawTrack_DISEntityID& from); - RawTrack_DISEntityID(RawTrack_DISEntityID&& from) noexcept - : RawTrack_DISEntityID() { - *this = ::std::move(from); - } - - inline RawTrack_DISEntityID& operator=(const RawTrack_DISEntityID& from) { - CopyFrom(from); - return *this; - } - inline RawTrack_DISEntityID& operator=(RawTrack_DISEntityID&& 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 RawTrack_DISEntityID& default_instance() { - return *internal_default_instance(); - } - static inline const RawTrack_DISEntityID* internal_default_instance() { - return reinterpret_cast( - &_RawTrack_DISEntityID_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(RawTrack_DISEntityID& a, RawTrack_DISEntityID& b) { - a.Swap(&b); - } - inline void Swap(RawTrack_DISEntityID* 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(RawTrack_DISEntityID* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - RawTrack_DISEntityID* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawTrack_DISEntityID& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawTrack_DISEntityID& from) { - RawTrack_DISEntityID::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(RawTrack_DISEntityID* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.raw_track.RawTrack.DISEntityID"; - } - protected: - explicit RawTrack_DISEntityID(::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 { - kSiteFieldNumber = 1, - kApplicationFieldNumber = 2, - kEntityFieldNumber = 3, - }; - // uint32 site = 1; - void clear_site(); - uint32_t site() const; - void set_site(uint32_t value); - private: - uint32_t _internal_site() const; - void _internal_set_site(uint32_t value); - public: - - // uint32 application = 2; - void clear_application(); - uint32_t application() const; - void set_application(uint32_t value); - private: - uint32_t _internal_application() const; - void _internal_set_application(uint32_t value); - public: - - // uint32 entity = 3; - void clear_entity(); - uint32_t entity() const; - void set_entity(uint32_t value); - private: - uint32_t _internal_entity() const; - void _internal_set_entity(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:messages.raw_track.RawTrack.DISEntityID) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - uint32_t site_; - uint32_t application_; - uint32_t entity_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_raw_5ftrack_2eproto; -}; -// ------------------------------------------------------------------- - -class RawTrack final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:messages.raw_track.RawTrack) */ { - public: - inline RawTrack() : RawTrack(nullptr) {} - ~RawTrack() override; - explicit PROTOBUF_CONSTEXPR RawTrack(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - RawTrack(const RawTrack& from); - RawTrack(RawTrack&& from) noexcept - : RawTrack() { - *this = ::std::move(from); - } - - inline RawTrack& operator=(const RawTrack& from) { - CopyFrom(from); - return *this; - } - inline RawTrack& operator=(RawTrack&& 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 RawTrack& default_instance() { - return *internal_default_instance(); - } - static inline const RawTrack* internal_default_instance() { - return reinterpret_cast( - &_RawTrack_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(RawTrack& a, RawTrack& b) { - a.Swap(&b); - } - inline void Swap(RawTrack* 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(RawTrack* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - RawTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawTrack& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawTrack& from) { - RawTrack::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(RawTrack* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "messages.raw_track.RawTrack"; - } - protected: - explicit RawTrack(::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 ---------------------------------------------------- - - typedef RawTrack_DISEntityID DISEntityID; - - // accessors ------------------------------------------------------- - - enum : int { - kEntityIDFieldNumber = 2, - kTimestampFieldNumber = 3, - kTrackNoFieldNumber = 1, - }; - // .messages.raw_track.RawTrack.DISEntityID EntityID = 2; - bool has_entityid() const; - private: - bool _internal_has_entityid() const; - public: - void clear_entityid(); - const ::messages::raw_track::RawTrack_DISEntityID& entityid() const; - PROTOBUF_NODISCARD ::messages::raw_track::RawTrack_DISEntityID* release_entityid(); - ::messages::raw_track::RawTrack_DISEntityID* mutable_entityid(); - void set_allocated_entityid(::messages::raw_track::RawTrack_DISEntityID* entityid); - private: - const ::messages::raw_track::RawTrack_DISEntityID& _internal_entityid() const; - ::messages::raw_track::RawTrack_DISEntityID* _internal_mutable_entityid(); - public: - void unsafe_arena_set_allocated_entityid( - ::messages::raw_track::RawTrack_DISEntityID* entityid); - ::messages::raw_track::RawTrack_DISEntityID* unsafe_arena_release_entityid(); - - // .google.protobuf.Timestamp timestamp = 3; - 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(); - - // uint32 trackNo = 1; - void clear_trackno(); - uint32_t trackno() const; - void set_trackno(uint32_t value); - private: - uint32_t _internal_trackno() const; - void _internal_set_trackno(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:messages.raw_track.RawTrack) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::messages::raw_track::RawTrack_DISEntityID* entityid_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* timestamp_; - uint32_t trackno_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_raw_5ftrack_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// RawTrack_DISEntityID - -// uint32 site = 1; -inline void RawTrack_DISEntityID::clear_site() { - _impl_.site_ = 0u; -} -inline uint32_t RawTrack_DISEntityID::_internal_site() const { - return _impl_.site_; -} -inline uint32_t RawTrack_DISEntityID::site() const { - // @@protoc_insertion_point(field_get:messages.raw_track.RawTrack.DISEntityID.site) - return _internal_site(); -} -inline void RawTrack_DISEntityID::_internal_set_site(uint32_t value) { - - _impl_.site_ = value; -} -inline void RawTrack_DISEntityID::set_site(uint32_t value) { - _internal_set_site(value); - // @@protoc_insertion_point(field_set:messages.raw_track.RawTrack.DISEntityID.site) -} - -// uint32 application = 2; -inline void RawTrack_DISEntityID::clear_application() { - _impl_.application_ = 0u; -} -inline uint32_t RawTrack_DISEntityID::_internal_application() const { - return _impl_.application_; -} -inline uint32_t RawTrack_DISEntityID::application() const { - // @@protoc_insertion_point(field_get:messages.raw_track.RawTrack.DISEntityID.application) - return _internal_application(); -} -inline void RawTrack_DISEntityID::_internal_set_application(uint32_t value) { - - _impl_.application_ = value; -} -inline void RawTrack_DISEntityID::set_application(uint32_t value) { - _internal_set_application(value); - // @@protoc_insertion_point(field_set:messages.raw_track.RawTrack.DISEntityID.application) -} - -// uint32 entity = 3; -inline void RawTrack_DISEntityID::clear_entity() { - _impl_.entity_ = 0u; -} -inline uint32_t RawTrack_DISEntityID::_internal_entity() const { - return _impl_.entity_; -} -inline uint32_t RawTrack_DISEntityID::entity() const { - // @@protoc_insertion_point(field_get:messages.raw_track.RawTrack.DISEntityID.entity) - return _internal_entity(); -} -inline void RawTrack_DISEntityID::_internal_set_entity(uint32_t value) { - - _impl_.entity_ = value; -} -inline void RawTrack_DISEntityID::set_entity(uint32_t value) { - _internal_set_entity(value); - // @@protoc_insertion_point(field_set:messages.raw_track.RawTrack.DISEntityID.entity) -} - -// ------------------------------------------------------------------- - -// RawTrack - -// uint32 trackNo = 1; -inline void RawTrack::clear_trackno() { - _impl_.trackno_ = 0u; -} -inline uint32_t RawTrack::_internal_trackno() const { - return _impl_.trackno_; -} -inline uint32_t RawTrack::trackno() const { - // @@protoc_insertion_point(field_get:messages.raw_track.RawTrack.trackNo) - return _internal_trackno(); -} -inline void RawTrack::_internal_set_trackno(uint32_t value) { - - _impl_.trackno_ = value; -} -inline void RawTrack::set_trackno(uint32_t value) { - _internal_set_trackno(value); - // @@protoc_insertion_point(field_set:messages.raw_track.RawTrack.trackNo) -} - -// .messages.raw_track.RawTrack.DISEntityID EntityID = 2; -inline bool RawTrack::_internal_has_entityid() const { - return this != internal_default_instance() && _impl_.entityid_ != nullptr; -} -inline bool RawTrack::has_entityid() const { - return _internal_has_entityid(); -} -inline void RawTrack::clear_entityid() { - if (GetArenaForAllocation() == nullptr && _impl_.entityid_ != nullptr) { - delete _impl_.entityid_; - } - _impl_.entityid_ = nullptr; -} -inline const ::messages::raw_track::RawTrack_DISEntityID& RawTrack::_internal_entityid() const { - const ::messages::raw_track::RawTrack_DISEntityID* p = _impl_.entityid_; - return p != nullptr ? *p : reinterpret_cast( - ::messages::raw_track::_RawTrack_DISEntityID_default_instance_); -} -inline const ::messages::raw_track::RawTrack_DISEntityID& RawTrack::entityid() const { - // @@protoc_insertion_point(field_get:messages.raw_track.RawTrack.EntityID) - return _internal_entityid(); -} -inline void RawTrack::unsafe_arena_set_allocated_entityid( - ::messages::raw_track::RawTrack_DISEntityID* entityid) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entityid_); - } - _impl_.entityid_ = entityid; - if (entityid) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.raw_track.RawTrack.EntityID) -} -inline ::messages::raw_track::RawTrack_DISEntityID* RawTrack::release_entityid() { - - ::messages::raw_track::RawTrack_DISEntityID* temp = _impl_.entityid_; - _impl_.entityid_ = 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::raw_track::RawTrack_DISEntityID* RawTrack::unsafe_arena_release_entityid() { - // @@protoc_insertion_point(field_release:messages.raw_track.RawTrack.EntityID) - - ::messages::raw_track::RawTrack_DISEntityID* temp = _impl_.entityid_; - _impl_.entityid_ = nullptr; - return temp; -} -inline ::messages::raw_track::RawTrack_DISEntityID* RawTrack::_internal_mutable_entityid() { - - if (_impl_.entityid_ == nullptr) { - auto* p = CreateMaybeMessage<::messages::raw_track::RawTrack_DISEntityID>(GetArenaForAllocation()); - _impl_.entityid_ = p; - } - return _impl_.entityid_; -} -inline ::messages::raw_track::RawTrack_DISEntityID* RawTrack::mutable_entityid() { - ::messages::raw_track::RawTrack_DISEntityID* _msg = _internal_mutable_entityid(); - // @@protoc_insertion_point(field_mutable:messages.raw_track.RawTrack.EntityID) - return _msg; -} -inline void RawTrack::set_allocated_entityid(::messages::raw_track::RawTrack_DISEntityID* entityid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.entityid_; - } - if (entityid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(entityid); - if (message_arena != submessage_arena) { - entityid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, entityid, submessage_arena); - } - - } else { - - } - _impl_.entityid_ = entityid; - // @@protoc_insertion_point(field_set_allocated:messages.raw_track.RawTrack.EntityID) -} - -// .google.protobuf.Timestamp timestamp = 3; -inline bool RawTrack::_internal_has_timestamp() const { - return this != internal_default_instance() && _impl_.timestamp_ != nullptr; -} -inline bool RawTrack::has_timestamp() const { - return _internal_has_timestamp(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& RawTrack::_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& RawTrack::timestamp() const { - // @@protoc_insertion_point(field_get:messages.raw_track.RawTrack.timestamp) - return _internal_timestamp(); -} -inline void RawTrack::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.raw_track.RawTrack.timestamp) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* RawTrack::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* RawTrack::unsafe_arena_release_timestamp() { - // @@protoc_insertion_point(field_release:messages.raw_track.RawTrack.timestamp) - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = _impl_.timestamp_; - _impl_.timestamp_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* RawTrack::_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* RawTrack::mutable_timestamp() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_timestamp(); - // @@protoc_insertion_point(field_mutable:messages.raw_track.RawTrack.timestamp) - return _msg; -} -inline void RawTrack::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.raw_track.RawTrack.timestamp) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace raw_track -} // namespace messages - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_raw_5ftrack_2eproto diff --git a/include/WHISPER/Messages/Protos/raw_track.proto b/include/WHISPER/Messages/Protos/raw_track.proto deleted file mode 100644 index 136a77f..0000000 --- a/include/WHISPER/Messages/Protos/raw_track.proto +++ /dev/null @@ -1,23 +0,0 @@ - -// [START declaration] -syntax = "proto3"; -package messages.raw_track; - -import "google/protobuf/timestamp.proto"; -// [END declaration] - - -// [START messages] -message RawTrack { - uint32 trackNo = 1; - - message DISEntityID { - uint32 site = 1; - uint32 application = 2; - uint32 entity = 3; - } - - DISEntityID EntityID = 2; - - google.protobuf.Timestamp timestamp = 3; -} diff --git a/include/WHISPER/Messages/Track.hpp b/include/WHISPER/Messages/Track.hpp deleted file mode 100644 index eed3227..0000000 --- a/include/WHISPER/Messages/Track.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - - -#include "google/protobuf/message.h" -#include -#include -#include -#include - -namespace WHISPER { - - class RawTrack : public Message - { - private: - - messages::raw_track::RawTrack trackMessage; - public: - std::uint32_t trackNo; - - RawTrack(std::string receivedMessage); - - RawTrack(std::uint32_t deviceID,WHISPER::MsgTopics topic, SourceType src,std::uint32_t trackNo); - - }; -} \ No newline at end of file diff --git a/src/WHISPER/Messages/Track.cpp b/src/WHISPER/Messages/Track.cpp deleted file mode 100644 index 20afe37..0000000 --- a/src/WHISPER/Messages/Track.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "WHISPER/Messages/Message.hpp" -#include "WHISPER/Messages/Protos/raw_track.pb.h" -#include -#include - - - - -namespace WHISPER { - - RawTrack::RawTrack(std::string receivedMessage){ - msg = messages::header::Message(); - try { - msg.ParseFromString(receivedMessage); - topic_ = msg.topic(); - sourceType_ = msg.sourcetype(); - msgType_ = msg.msgtype(); - - trackMessage = messages::raw_track::RawTrack(); - - if ( msg.payload_size()) { - if (msg.payload().begin()->Is()) { - msg.payload().begin()->UnpackTo(&trackMessage); - } - } - - - trackNo = trackMessage.trackno(); - - - - } catch (const std::exception& e) { - LOG_S(ERROR)<(); - payloadMessage->PackFrom(trackMessage); - addPayLoad(payloadMessage); - - - } - - - - -} \ No newline at end of file diff --git a/tests/test_test.cpp b/tests/test_test.cpp index c09f6be..d34d50a 100644 --- a/tests/test_test.cpp +++ b/tests/test_test.cpp @@ -20,7 +20,6 @@ #include "WHISPER/InternalUDPService.hpp" #include "WHISPER/Messages/Message.hpp" -#include "WHISPER/Messages/Track.hpp" #include "zmq.hpp" #include