ESP32 MQTT IoT Communication
Loading...
Searching...
No Matches
device_writer.ReadingsWriter Class Reference

Class Representing readings recieved on a topic. More...

Inheritance diagram for device_writer.ReadingsWriter:
Collaboration diagram for device_writer.ReadingsWriter:

Public Member Functions

None __init__ (self, SensorWriter sensor, float data_value)
 ReadingsWriter Constructor.
 
str sql_query (self)
 Returns The Object encoded into an "INSERT" SQL statement.
 
- Public Member Functions inherited from device_writer.Writer
str __str__ (self)
 Returns an SQL insert query as a str.
 
None insert (self, sqlite3.Connection db_connection)
 Inserts the object into the provided database.
 

Protected Attributes

 _sensor
 The Sensor that the readings are given by.
 
 _data_value
 Data value recieved from sensor.
 

Detailed Description

Class Representing readings recieved on a topic.

Class Representing readings recieved on a topic

Constructor & Destructor Documentation

◆ __init__()

None device_writer.ReadingsWriter.__init__ (   self,
SensorWriter  sensor,
float  data_value 
)

ReadingsWriter Constructor.

Parameters
sensorSensor that creates the readings object
data_valueSensor Value
ReadingsWriter Constructor

Member Function Documentation

◆ sql_query()

str device_writer.ReadingsWriter.sql_query (   self)

Returns The Object encoded into an "INSERT" SQL statement.

Returns
INSERT Statement
Returns The Object encoded into an "INSERT" SQL statement

Reimplemented from device_writer.Writer.


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