diff --git a/include/Entities/SensorManager.hpp b/include/Entities/SensorManager.hpp index 84273cf..81d57c4 100644 --- a/include/Entities/SensorManager.hpp +++ b/include/Entities/SensorManager.hpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace Entities { @@ -69,6 +70,20 @@ namespace Entities */ std::shared_ptr getSensorByUUID(std::string uuid); + /** + * @brief Get the Sensor List As Vector of shared pointer of sensorcontrols + * + * @return std::vector> + */ + std::vector> getSensorListAsVector(); + + + /** + * @brief Get the Sensor List As Map of shared pointer of sensorcontrols + * + * @return std::map> + */ + std::map> getSensorListAsMap(); /** diff --git a/src/Entities/SensorManager.cpp b/src/Entities/SensorManager.cpp index 184c7cf..a2e5486 100644 --- a/src/Entities/SensorManager.cpp +++ b/src/Entities/SensorManager.cpp @@ -87,6 +87,26 @@ namespace Entities } + + std::vector> SensorManager::getSensorListAsVector() + { + std::vector> SensorVector; + for (auto [key, value] : SensorStore) + { + SensorVector.push_back(value); + } + + return SensorVector; + + } + + + std::map> SensorManager::getSensorListAsMap() + { + return SensorStore; + } + + size_t SensorManager::getSensorCount() { return SensorStore.size(); @@ -96,6 +116,7 @@ namespace Entities + void SensorManager::handlSensorMessages(std::string Message) { WHISPER::Message msg(Message); @@ -263,6 +284,9 @@ namespace Entities return Update; + + + }