ADD: moved tracklist to parent class

This commit is contained in:
hwinkel
2023-11-10 13:27:17 +01:00
parent 407cb60444
commit 22149dc61d
4 changed files with 23 additions and 4 deletions

View File

@@ -69,6 +69,7 @@ namespace Entities
BroadcastServer_ = std::make_shared<WHISPER::InternalUDPSender>(GroundTruthAddr, GroundTruthPort);
// BroadcastServer_ = std::make_shared<WHISPER::InternalUDPSender>("239.0.0.1", 10000);
TrackList_ = std::make_unique<TrackList::TrackList>();
}
@@ -286,7 +287,10 @@ namespace Entities
std::unique_ptr<SimCore::Control> control = std::move(SimCore::Control::unpack(whisperMsg));
switch (control->Type)
{
case SimCore::IDENTIFY :
case SimCore::IDENTIFY :
{
break;
}
case SimCore::START:
case SimCore::STOP :
case SimCore::SHUT_DOWN :
@@ -297,6 +301,18 @@ namespace Entities
case SimCore::CREATE_ENTITY:
case SimCore::DELETE_ENTITY :
case SimCore::GET_CONTROL:
{
break;
}
case SimCore::GET_TRACKLIST:
{
nlohmann::json j;
this->TrackList_->getJsonTRackList(j);
// WHISPER::StringData(this->OwnShipTrack->getIdentifier(),)
this->CommandCommsServer_->sendMessage(j.dump());
break;
}
break;
};