ADD: added update of simtrack
This commit is contained in:
@@ -35,6 +35,7 @@ namespace SimCore
|
||||
/// @return
|
||||
std::string getName();
|
||||
|
||||
|
||||
Data<double> Frequency;
|
||||
Data<double> Range;
|
||||
Data<double> Bandwidth;
|
||||
|
||||
@@ -10,42 +10,55 @@
|
||||
|
||||
#include <SimCore/Messages/Emission.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace SimCore
|
||||
{
|
||||
class SimTrack
|
||||
{
|
||||
private:
|
||||
const SimCore::Identifier ID_;
|
||||
|
||||
const WHISPER::SourceType SourceType_;
|
||||
|
||||
Position position_;
|
||||
|
||||
std::vector<Emission> EmitterList;
|
||||
|
||||
public:
|
||||
SimTrack();
|
||||
SimTrack(WHISPER::SourceType sourcetype,SimCore::EntityKind entityKind);
|
||||
SimTrack( SimCore::Identifier id ,WHISPER::SourceType sourcetype,SimCore::EntityKind entityKind );
|
||||
|
||||
SimTrack(WHISPER::SourceType sourcetype, SimCore::EntityKind entityKind);
|
||||
|
||||
SimTrack(SimCore::Identifier id, WHISPER::SourceType sourcetype, SimCore::EntityKind entityKind);
|
||||
|
||||
~SimTrack();
|
||||
|
||||
/// @brief
|
||||
/// @param pos
|
||||
void setPosition(SimCore::Position pos);
|
||||
/// @brief
|
||||
/// @param x
|
||||
/// @param pos
|
||||
void setPosition(SimCore::Position pos);
|
||||
|
||||
/// @brief
|
||||
/// @param x
|
||||
/// @param y
|
||||
/// @param z
|
||||
/// @param z
|
||||
void setPosition(double x, double y, double z);
|
||||
SimCore::Position getPosition();
|
||||
SimCore::Identifier getIdentifier();
|
||||
/// @brief
|
||||
/// @param emission
|
||||
void addEmission(Emission emission);
|
||||
|
||||
/// @brief
|
||||
/// @param id
|
||||
/// @return
|
||||
std::shared_ptr<Emission> getEmission(SimCore::Identifier id);
|
||||
|
||||
/// @brief couts the stored emissions
|
||||
/// @return returns the amout of emission
|
||||
size_t coutEmissions();
|
||||
|
||||
/// @brief return a WHISPER Message out of a simtrack object
|
||||
/// @param parentID
|
||||
/// @return WHISPER::Message
|
||||
WHISPER::Message buildMessage(SimCore::Identifier parentID);
|
||||
|
||||
/// @brief creates a SimTrack out of a whisper message
|
||||
/// @param msg
|
||||
/// @return SimTrack Oject
|
||||
static SimTrack unpack(WHISPER::Message msg);
|
||||
|
||||
public:
|
||||
Data<double> Speed;
|
||||
Data<double> Course;
|
||||
Data<double> Pitch;
|
||||
@@ -53,12 +66,14 @@ namespace SimCore
|
||||
|
||||
Data<SimCore::EntityKind> EntityKind;
|
||||
|
||||
private:
|
||||
const SimCore::Identifier ID_;
|
||||
|
||||
WHISPER::Message buildMessage(SimCore::Identifier parentID);
|
||||
static SimTrack unpack(WHISPER::Message msg);
|
||||
const WHISPER::SourceType SourceType_;
|
||||
|
||||
Position position_;
|
||||
|
||||
std::vector<std::shared_ptr<SimCore::Emission>> EmissionList;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user