esp::sensor::SensorSuite class

Constructors, destructors, conversion operators

SensorSuite(scene::SceneNode& node) explicit

Public functions

auto node() -> scene::SceneNode&
auto node() const -> const scene::SceneNode&
auto object() -> scene::SceneNode&
auto object() const -> const scene::SceneNode&
void add(Sensor& sensor)
Add Sensor sensor to existing sensors_ with key sensor's uuid.
void remove(const Sensor& sensor)
Remove Sensor sensor from existing sensors_.
void remove(const std::string& uuid)
Remove Sensor with key uuid from existing sensors_.
void clear()
Clear all entries of sensors_.
auto get(const std::string& uuid) const -> sensor::Sensor&
Return reference to Sensor with key uuid in existing sensors_.
auto getSensors() -> std::map<std::string, std::reference_wrapper<sensor::Sensor>>&
Return sensors_, map of uuid keys and Sensor values.
auto getSensors() const -> const std::map<std::string, std::reference_wrapper<sensor::Sensor>>&

Protected variables

std::map<std::string, std::reference_wrapper<sensor::Sensor>> sensors_

Function documentation

void esp::sensor::SensorSuite::add(Sensor& sensor)

Add Sensor sensor to existing sensors_ with key sensor's uuid.

Parameters
sensor in to be added to sensors_ Note: it does not update any element whose key already exists.

void esp::sensor::SensorSuite::remove(const Sensor& sensor)

Remove Sensor sensor from existing sensors_.

Parameters
sensor in to be removed from sensors_

void esp::sensor::SensorSuite::remove(const std::string& uuid)

Remove Sensor with key uuid from existing sensors_.

Parameters
uuid in of Sensor to be removed from sensors_

sensor::Sensor& esp::sensor::SensorSuite::get(const std::string& uuid) const

Return reference to Sensor with key uuid in existing sensors_.

Parameters
uuid in of Sensor to be found in sensors_