diff --git a/doc_resources/gateway/class_diagram.puml b/doc_resources/gateway/class_diagram.puml index 78c6ad2..ee8ea84 100644 --- a/doc_resources/gateway/class_diagram.puml +++ b/doc_resources/gateway/class_diagram.puml @@ -1,6 +1,5 @@ @startuml skinparam linestyle ortho - class Gateway { - gateway_id: str - mqtt_broker: str @@ -11,8 +10,9 @@ class Gateway { + KEY_HUMIDITY: 0x02 + KEY_TEMP: 0x03 + KEY_CO2: 0x04 + + KEY_BATTERY: 0x05 + INVALID_VALUE: 0xFFFFFFFF - + EXPECTED_PAYLOAD_SIZE: 12 + + EXPECTED_PAYLOAD_SIZE: 14 -- + decode_payload(data: bytes): dict + publish(mac: str, data: dict) @@ -21,12 +21,10 @@ class Gateway { + on_publish(client, userdata, mid, reason_code, properties) + run() } - class BleakScanner { + start() + stop() } - class MQTTClient { + connect() + publish() @@ -34,8 +32,6 @@ class MQTTClient { + username_pw_set() + loop_start() } - Gateway o-- BleakScanner Gateway o-- MQTTClient - @enduml diff --git a/doc_resources/gateway/sequence_data_collection.puml b/doc_resources/gateway/sequence_data_collection.puml index 984c9c4..0198ea8 100644 --- a/doc_resources/gateway/sequence_data_collection.puml +++ b/doc_resources/gateway/sequence_data_collection.puml @@ -14,7 +14,7 @@ alt company_id != 0xffff else company_id == 0xffff gw -> gw : check payload size - alt payload size != 12 bytes + alt payload size != 14 bytes gw -> gw : discard packet\n(non-Thingy device) else gw -> gw : decode_payload()