#pragma once #include "SimCore/Identifier.hpp" #include "SimCore/IdentifierMaker.hpp" #include "SimCore/Messages/SensorTrack.hpp" #include "SimCore/Messages/SimTrack.hpp" #include "nlohmann/json.hpp" #include #include #include #include #include #include // #include #include #include #include #include namespace TrackList { class TrackList { public: TrackList(); ~TrackList(); TrackList(const TrackList &other); TrackList& operator=(const TrackList & oter); void addTrack(std::shared_ptr Track); std::shared_ptr getTrack(SimCore::Identifier); void deleteTrack(std::string ID); void deleteTrack(SimCore::Identifier); std::shared_ptr getTrackBySringID(std::string ID); size_t getSize(); void getJsonTRackList(nlohmann::json &message); std::map> getTrackStore(); /** * @brief cheks the trackstore for old tracks to delete * */ void checkTrackStore(); private: mutable std::mutex mx_; std::map> TrackStore_; /// seconds after the last updated a track gets deleted const int trackNoUpdateTime = 10; CallBackTimer timer_; }; }