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

class representing an IoT device extends Writer More...

Inheritance diagram for device_writer.DeviceWriter:
Collaboration diagram for device_writer.DeviceWriter:

Public Member Functions

str address (self)
 Returns the MAC Address of the Device class.
 
None __init__ (self, str device_address, str device_type)
 Device 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

 _device_address
 mac address of the device
 
 _device_type
 Type of the device.
 

Detailed Description

class representing an IoT device extends Writer

A class representing an IoT device

Constructor & Destructor Documentation

◆ __init__()

None device_writer.DeviceWriter.__init__ (   self,
str  device_address,
str  device_type 
)

Device Constructor.

Parameters
device_addressMAC address of the device
device_typeType of the device
Device Constructor

Member Function Documentation

◆ address()

str device_writer.DeviceWriter.address (   self)

Returns the MAC Address of the Device class.

Returns
MAC Adress of device
 Returns the MAC Address of the Device class

◆ sql_query()

str device_writer.DeviceWriter.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: