#pragma once #include "DirectCommunicationServer.hpp" #include "Entities/SensorControl.hpp" #include "SimCore/Identifier.hpp" #include "SimCore/Messages/SimTrack.hpp" #include "SimCore/SimCore.hpp" #include "kubecontrol/PodController.hpp" #include #include #include #include #include namespace Entities { class SensorManager { public: SensorManager(SimCore::Identifier OwnID,std::shared_ptr PodController, ushort sensorPort = 5557); /** *@brief starts a Sensor based on a KubePod Object *@param KubePod - a KubePod Item ready to start *@param SensorKind - numeric value of the SensorKind from SimCore */ void startSensor(std::shared_ptr pod, SimCore::SensorKinds SensorKind); /** *@brief stops a Sensor based on a uuid ( the sensors just stops to operate) *@param string uuid sensor */ void stopSenser(std::string uuid); /** *@brief deletes a sensor pod based on the uuid *@param string uuid sensor */ void deleteSensor(std::string uuid); /** *@brief get the Tracklist as JSON formatted string where you can see the tracks every sensor detects *@return string - JSON formatted string */ std::string getTracklistStringBySensor(); /** *@brief get the Tracklist as JSON formatted string where the tracks are fusiond with a list for each track which sensor has detected that track *@return string - JSON formatted string */ std::string getTracklistStringFusioned(); /** *@brief Updates the Tracklist for the Specific Sensor *@param string uuid for the Sensor *@param SimTrack updated Track */ void updateTracklistForSensor(std::string uuidSensor, std::shared_ptr track); private: const SimCore::Identifier OwnId_; ushort SensorPort_ = 5557; std::map> SensorStore; std::shared_ptr PodController_; std::shared_ptr SensorServer_ = nullptr; void handlSensorMessages(std::string Message); }; }