ADD: SensorManager with Trackfusion Trackstore and Sensor List wich contains every contact a sensor has
This commit is contained in:
84
include/Entities/Tracklist/Trackfusion.hpp
Normal file
84
include/Entities/Tracklist/Trackfusion.hpp
Normal file
@@ -0,0 +1,84 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <SimCore/Messages/TracklistItem.hpp>
|
||||
#include "SimCore/Identifier.hpp"
|
||||
#include "SimCore/Messages/SimTrack.hpp"
|
||||
#include <SimCore/Messages/TracklistUpdate.hpp>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace TrackList
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Trackfusion
|
||||
{
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief adds or updates track
|
||||
*
|
||||
* @param track shared pointer of a simtrack
|
||||
* @param sensorData
|
||||
*/
|
||||
void addOrUpdateTrack(std::shared_ptr<SimCore::SimTrack> track,std::shared_ptr<SimCore::SensorData> sensorData);
|
||||
|
||||
/**
|
||||
* @brief deltets a track based on a SimCore::Identifier
|
||||
*
|
||||
*/
|
||||
void deleteTrack(SimCore::Identifier id);
|
||||
|
||||
/**
|
||||
* @brief deletes a track based on a string uuid
|
||||
*
|
||||
* @param UUID
|
||||
*/
|
||||
void deleteTrack(std::string UUID);
|
||||
|
||||
/**
|
||||
* @brief Get the Tracklist As String
|
||||
*
|
||||
* @return std::string
|
||||
*/
|
||||
std::string getTracklistAsString();
|
||||
|
||||
/**
|
||||
* @brief retruns a shared pointer of a track
|
||||
*
|
||||
* @param id
|
||||
* @return std::shared_ptr<TracklistItem>
|
||||
*/
|
||||
std::shared_ptr<SimCore::TracklistItem> findTrack(SimCore::Identifier id);
|
||||
|
||||
/**
|
||||
* @brief returns a shared pointer of a track
|
||||
*
|
||||
* @param UUID
|
||||
* @return std::shared_ptr<TracklistItem>
|
||||
*/
|
||||
std::shared_ptr<SimCore::TracklistItem> findTrack(std::string UUID);
|
||||
|
||||
/**
|
||||
* @brief Get the Track List Update object
|
||||
*
|
||||
* @return std::unique_ptr<SimCore::TracklistUpdate>
|
||||
*/
|
||||
std::unique_ptr<SimCore::TracklistUpdate> getTrackListUpdate(SimCore::Identifier ID);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
mutable std::mutex mx_;
|
||||
|
||||
std::unordered_map<SimCore::Identifier, std::shared_ptr<SimCore::TracklistItem>> TrackStore_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user