|
ESP32 MQTT IoT Communication
|
Class Representing readings recieved on a topic. More...


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. | |
Class Representing readings recieved on a topic.
Class Representing readings recieved on a topic
| None device_writer.ReadingsWriter.__init__ | ( | self, | |
| SensorWriter | sensor, | ||
| float | data_value | ||
| ) |
ReadingsWriter Constructor.
| sensor | Sensor that creates the readings object |
| data_value | Sensor Value |
ReadingsWriter Constructor
| str device_writer.ReadingsWriter.sql_query | ( | self | ) |
Returns The Object encoded into an "INSERT" SQL statement.
Returns The Object encoded into an "INSERT" SQL statement
Reimplemented from device_writer.Writer.