diff --git a/include/Entities/Entity.hpp b/include/Entities/Entity.hpp index 7a220ac..db2b862 100644 --- a/include/Entities/Entity.hpp +++ b/include/Entities/Entity.hpp @@ -102,6 +102,7 @@ namespace Entities { std::string GroundTruthAddr_; std::uint32_t GroundTruthPort_; + ushort CommandPort_; diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 3754734..419973b 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -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)<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)<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_) { @@ -346,7 +350,7 @@ namespace Entities case SimCore::START: case SimCore::STOP : case SimCore::SHUT_DOWN : - { + { LOG_S(INFO)<<"shutdown received"; this->stop(); @@ -362,6 +366,7 @@ namespace Entities default: { + DLOG_S(INFO)<<"Message Type is: " << whisperMsg.msgType_; }