ADD: use of new sensor messages
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "DirectCommunicationClient.hpp"
|
||||
#include "SimCore/Messages/SensorData.hpp"
|
||||
#include "SimCore/Messages/SensorTrack.hpp"
|
||||
#include "SimCore/Messages/SimTrack.hpp"
|
||||
#include "WHISPER/InternalUDPListener.hpp"
|
||||
#include <WHISPER/InternalUDPService.hpp>
|
||||
@@ -28,6 +30,7 @@ namespace Entities {
|
||||
Sensor(
|
||||
SimCore::Identifier OwnID,
|
||||
SimCore::Identifier OwnShipID,
|
||||
std::string Name,
|
||||
SimCore::SensorKinds SensorKind,
|
||||
std::string GroundTruthAddress,
|
||||
std::uint32_t GroundTruthPort,
|
||||
@@ -39,19 +42,18 @@ namespace Entities {
|
||||
|
||||
protected:
|
||||
|
||||
SimCore::SensorData OwnData;
|
||||
|
||||
|
||||
virtual void specificSensorCalculations(std::unique_ptr<SimCore::SimTrack> track) = 0;
|
||||
|
||||
std::shared_ptr<SimCore::SimTrack> OwnShipTrack_ = nullptr;
|
||||
|
||||
const SimCore::Identifier OwnID_;
|
||||
const SimCore::Identifier OwnShipID;
|
||||
|
||||
|
||||
SimCore::SensorKinds SensorKind_;
|
||||
|
||||
std::shared_ptr<WHISPER::threadSafeQueue<std::shared_ptr<SimCore::SimTrack>>> recognisedTracks_ = nullptr;
|
||||
std::shared_ptr<WHISPER::threadSafeQueue<std::shared_ptr<SimCore::SensorTrack>>> recognisedTracks_ = nullptr;
|
||||
private:
|
||||
|
||||
std::uint32_t GroundTruthPort_;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Entities
|
||||
*@param string uuid for the Sensor
|
||||
*@param SimTrack updated Track
|
||||
*/
|
||||
void updateTracklistForSensor(std::string uuidSensor, std::shared_ptr<SimCore::SimTrack> track);
|
||||
void updateTracklistForSensor(std::string uuidSensor, std::shared_ptr<SimCore::SensorTrack> track);
|
||||
|
||||
/**
|
||||
* @brief sends a message to a specific sensor if uuid is passed else it sends to everyone
|
||||
@@ -103,7 +103,7 @@ namespace Entities
|
||||
* @param sensor
|
||||
*
|
||||
*/
|
||||
void addSensorLocal(std::unique_ptr<Sensor::SensorControl> sensor);
|
||||
void addSensorLocal(std::shared_ptr<Sensor::SensorControl> sensor);
|
||||
|
||||
/**
|
||||
* @brief Get the number of sensors
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <SimCore/Messages/TracklistItem.hpp>
|
||||
#include "SimCore/Identifier.hpp"
|
||||
#include "SimCore/Messages/SensorTrack.hpp"
|
||||
#include "SimCore/Messages/SimTrack.hpp"
|
||||
#include <SimCore/Messages/TracklistUpdate.hpp>
|
||||
#include <map>
|
||||
@@ -26,7 +27,7 @@ namespace TrackList
|
||||
* @param track shared pointer of a simtrack
|
||||
* @param sensorData
|
||||
*/
|
||||
void addOrUpdateTrack(std::shared_ptr<SimCore::SimTrack> track,std::shared_ptr<SimCore::SensorData> sensorData);
|
||||
void addOrUpdateTrack(std::shared_ptr<SimCore::SensorTrack> track);
|
||||
|
||||
/**
|
||||
* @brief deltets a track based on a SimCore::Identifier
|
||||
|
||||
Reference in New Issue
Block a user