From 9f9922dded0139d2f2b335cebd3f4bd7688f854d Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Thu, 26 Oct 2023 13:56:59 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-7831 Signed-off-by: stephb9959 --- CMakeLists.txt | 4 ++- build | 2 +- src/RESTObjects/RESTAPI_OWLSobjects.cpp | 31 ++++++++++++----------- src/RESTObjects/RESTAPI_OWLSobjects.h | 33 +++++++++++++------------ 4 files changed, 37 insertions(+), 33 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c77b733..62908ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,4 +134,6 @@ target_link_libraries(owls PRIVATE ${MySQL_LIBRARIES} ${ZLIB_LIBRARIES} fmt::fmt - CppKafka::cppkafka) + CppKafka::cppkafka + resolv +) diff --git a/build b/build index 19c7bdb..dec2bf5 100644 --- a/build +++ b/build @@ -1 +1 @@ -16 \ No newline at end of file +19 \ No newline at end of file diff --git a/src/RESTObjects/RESTAPI_OWLSobjects.cpp b/src/RESTObjects/RESTAPI_OWLSobjects.cpp index 0a420b7..93a2732 100644 --- a/src/RESTObjects/RESTAPI_OWLSobjects.cpp +++ b/src/RESTObjects/RESTAPI_OWLSobjects.cpp @@ -78,21 +78,22 @@ namespace OpenWifi::OWLSObjects { return false; } - void SimulationStatus::to_json(Poco::JSON::Object &Obj) const { - field_to_json(Obj, "id", id); - field_to_json(Obj, "simulationId", simulationId); - field_to_json(Obj, "state", state); - field_to_json(Obj, "tx", tx); - field_to_json(Obj, "rx", rx); - field_to_json(Obj, "msgsTx", msgsTx); - field_to_json(Obj, "msgsRx", msgsRx); - field_to_json(Obj, "liveDevices", liveDevices); - field_to_json(Obj, "timeToFullDevices", timeToFullDevices); - field_to_json(Obj, "startTime", startTime); - field_to_json(Obj, "endTime", endTime); - field_to_json(Obj, "errorDevices", errorDevices); - field_to_json(Obj, "owner", owner); - } + void SimulationStatus::to_json(Poco::JSON::Object &Obj) const { + field_to_json(Obj, "id", id); + field_to_json(Obj, "simulationId", simulationId); + field_to_json(Obj, "state", state); + field_to_json(Obj, "tx", tx); + field_to_json(Obj, "rx", rx); + field_to_json(Obj, "msgsTx", msgsTx); + field_to_json(Obj, "msgsRx", msgsRx); + field_to_json(Obj, "liveDevices", liveDevices); + field_to_json(Obj, "timeToFullDevices", timeToFullDevices); + field_to_json(Obj, "startTime", startTime); + field_to_json(Obj, "endTime", endTime); + field_to_json(Obj, "errorDevices", errorDevices); + field_to_json(Obj, "owner", owner); + field_to_json(Obj, "expectedDevices", expectedDevices); + } void Dashboard::to_json([[maybe_unused]] Poco::JSON::Object &Obj) const {} diff --git a/src/RESTObjects/RESTAPI_OWLSobjects.h b/src/RESTObjects/RESTAPI_OWLSobjects.h index 92623cb..54b78c3 100644 --- a/src/RESTObjects/RESTAPI_OWLSobjects.h +++ b/src/RESTObjects/RESTAPI_OWLSobjects.h @@ -43,23 +43,24 @@ namespace OpenWifi::OWLSObjects { bool from_json(const Poco::JSON::Object::Ptr &Obj); }; - struct SimulationStatus { - std::string id; - std::string simulationId; - std::string state; - uint64_t tx; - uint64_t rx; - uint64_t msgsTx; - uint64_t msgsRx; - uint64_t liveDevices; - uint64_t timeToFullDevices; - uint64_t startTime; - uint64_t endTime; - uint64_t errorDevices; - std::string owner; + struct SimulationStatus { + std::string id; + std::string simulationId; + std::string state; + uint64_t tx; + uint64_t rx; + uint64_t msgsTx; + uint64_t msgsRx; + uint64_t liveDevices; + uint64_t timeToFullDevices; + uint64_t startTime; + uint64_t endTime; + uint64_t errorDevices; + std::string owner; + uint64_t expectedDevices; - void to_json(Poco::JSON::Object &Obj) const; - }; + void to_json(Poco::JSON::Object &Obj) const; + }; struct Dashboard { int O;