From 381006b9f5bb64e5e618131b713e68a37d9f64da Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Thu, 26 Oct 2023 14:01:28 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-7831 Signed-off-by: stephb9959 --- src/RESTObjects/RESTAPI_OWLSobjects.cpp | 31 ++++++++++++----------- src/RESTObjects/RESTAPI_OWLSobjects.h | 33 +++++++++++++------------ 2 files changed, 33 insertions(+), 31 deletions(-) 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;