ESP32 MQTT IoT Communication
Loading...
Searching...
No Matches
device::Sensor Class Reference

Class encapsulating logic for handling sensors connected to the Board. More...

#include <device.hh>

Inheritance diagram for device::Sensor:
Collaboration diagram for device::Sensor:

Public Member Functions

 Sensor (String _sensor_name, String _sensor_description, String _unit, String _sensor_address)
 Sensor Constructor.
 
JsonDocument parse ()
 Encodes data readings/id object into a JSON object.
 
String get_address ()
 Returns the IP address of the Board.
 

Detailed Description

Class encapsulating logic for handling sensors connected to the Board.

Constructor & Destructor Documentation

◆ Sensor()

device::Sensor::Sensor ( String  _sensor_name,
String  _sensor_description,
String  _unit,
String  _sensor_address 
)

Sensor Constructor.

Parameters
_sensor_nameName of sensor
_sensor_descriptionShort Description of Sensor
_unitUnit of the sensor readings
_sensor_addressthe address of the sensor the board

Member Function Documentation

◆ get_address()

String device::Sensor::get_address ( )
virtual

Returns the IP address of the Board.

Returns
Arduino String object containing the IP Address of the

Implements device::Parser.

◆ parse()

JsonDocument device::Sensor::parse ( )
virtual

Encodes data readings/id object into a JSON object.

Returns
JsonDocument Object

Implements device::Parser.


The documentation for this class was generated from the following files: