ADD: added Command Port to protected variables

This commit is contained in:
Henry Winkel
2024-03-14 17:46:01 +01:00
parent 453d3c27c4
commit 56577388e8
2 changed files with 11 additions and 5 deletions

View File

@@ -102,6 +102,7 @@ namespace Entities {
std::string GroundTruthAddr_;
std::uint32_t GroundTruthPort_;
ushort CommandPort_;

View File

@@ -56,6 +56,7 @@ namespace Entities
EntitySide_(EntitySide),
GroundTruthPort_(GroundTruthPort),
GroundTruthAddr_(GroundTruthAddr),
CommandPort_(CommandPort),
SensorPort_(SensorPort),
online_(online)
@@ -184,10 +185,13 @@ namespace Entities
LOG_S(INFO)<<"__ONLINE__";
MovementPodUUID_ = xg::newGuid().str();
LOG_S(INFO)<<this->OwnShipTrack->getIdentifier().getUUID();
kubecontrol::KubePod MovementPod(this->OwnShipTrack->getIdentifier().getUUID(),MovementPodUUID_,"movementimage:latest");
std::string MovementImage = "movementimage:latest";
std::string component = "MovementCalculation";
std::string uuid = this->OwnShipTrack->getIdentifier().getUUID();
kubecontrol::KubePod MovementPod(uuid,MovementPodUUID_,MovementImage);
MovementPod.setEnvironmentVar("SERVER_IP", SimCore::UtilFunctions::getOwnIP());
MovementPod.setComponent("MovementCalculation");
MovementPod.setComponent(component);
PodController_->startPod(MovementPod);
LOG_S(INFO)<<PodController_->getServerAddress();
@@ -241,8 +245,8 @@ namespace Entities
try {
WHISPER::Message whisperMsg(msg);
LOG_S(INFO)<<"New Message from TCP Client";
LOG_S(INFO)<<"Message Type is: " << whisperMsg.msgType_;
// LOG_S(INFO)<<"New Message from TCP Client";
// LOG_S(INFO)<<"Message Type is: " << whisperMsg.msgType_;
switch (whisperMsg.msgType_)
{
@@ -362,6 +366,7 @@ namespace Entities
default:
{
DLOG_S(INFO)<<"Message Type is: " << whisperMsg.msgType_;
}