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::string GroundTruthAddr_;
std::uint32_t GroundTruthPort_; std::uint32_t GroundTruthPort_;
ushort CommandPort_;

View File

@@ -56,6 +56,7 @@ namespace Entities
EntitySide_(EntitySide), EntitySide_(EntitySide),
GroundTruthPort_(GroundTruthPort), GroundTruthPort_(GroundTruthPort),
GroundTruthAddr_(GroundTruthAddr), GroundTruthAddr_(GroundTruthAddr),
CommandPort_(CommandPort),
SensorPort_(SensorPort), SensorPort_(SensorPort),
online_(online) online_(online)
@@ -184,10 +185,13 @@ namespace Entities
LOG_S(INFO)<<"__ONLINE__"; LOG_S(INFO)<<"__ONLINE__";
MovementPodUUID_ = xg::newGuid().str(); MovementPodUUID_ = xg::newGuid().str();
LOG_S(INFO)<<this->OwnShipTrack->getIdentifier().getUUID(); 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.setEnvironmentVar("SERVER_IP", SimCore::UtilFunctions::getOwnIP());
MovementPod.setComponent("MovementCalculation"); MovementPod.setComponent(component);
PodController_->startPod(MovementPod); PodController_->startPod(MovementPod);
LOG_S(INFO)<<PodController_->getServerAddress(); LOG_S(INFO)<<PodController_->getServerAddress();
@@ -241,8 +245,8 @@ namespace Entities
try { try {
WHISPER::Message whisperMsg(msg); WHISPER::Message whisperMsg(msg);
LOG_S(INFO)<<"New Message from TCP Client"; // LOG_S(INFO)<<"New Message from TCP Client";
LOG_S(INFO)<<"Message Type is: " << whisperMsg.msgType_; // LOG_S(INFO)<<"Message Type is: " << whisperMsg.msgType_;
switch (whisperMsg.msgType_) switch (whisperMsg.msgType_)
{ {
@@ -346,7 +350,7 @@ namespace Entities
case SimCore::START: case SimCore::START:
case SimCore::STOP : case SimCore::STOP :
case SimCore::SHUT_DOWN : case SimCore::SHUT_DOWN :
{ {
LOG_S(INFO)<<"shutdown received"; LOG_S(INFO)<<"shutdown received";
this->stop(); this->stop();
@@ -362,6 +366,7 @@ namespace Entities
default: default:
{ {
DLOG_S(INFO)<<"Message Type is: " << whisperMsg.msgType_;
} }