docs(gateway): update class diagram to reflect final implementation - Update class diagram: add INVALID_VALUE and EXPECTED_PAYLOAD_SIZE constants, add on_connect and on_publish callbacks, remove service_uuid - Update sequence diagram: replace UUID filter with company_id 0xffff filter, add payload size check, add CO2 0xFFFFFFFF handling
This commit is contained in:
@@ -5,17 +5,20 @@ class Gateway {
|
|||||||
- gateway_id: str
|
- gateway_id: str
|
||||||
- mqtt_broker: str
|
- mqtt_broker: str
|
||||||
- mqtt_port: int
|
- mqtt_port: int
|
||||||
- service_uuid: str
|
|
||||||
- mqttc: MQTTClient
|
- mqttc: MQTTClient
|
||||||
--
|
--
|
||||||
+ KEY_WINDOW: 0x01
|
+ KEY_WINDOW: 0x01
|
||||||
+ KEY_HUMIDITY: 0x02
|
+ KEY_HUMIDITY: 0x02
|
||||||
+ KEY_TEMP: 0x03
|
+ KEY_TEMP: 0x03
|
||||||
+ KEY_CO2: 0x04
|
+ KEY_CO2: 0x04
|
||||||
|
+ INVALID_VALUE: 0xFFFFFFFF
|
||||||
|
+ EXPECTED_PAYLOAD_SIZE: 12
|
||||||
--
|
--
|
||||||
+ decode_payload(data: bytes): dict
|
+ decode_payload(data: bytes): dict
|
||||||
+ publish(mac: str, data: dict)
|
+ publish(mac: str, data: dict)
|
||||||
+ on_device_found(device, adv_data)
|
+ on_device_found(device, adv_data)
|
||||||
|
+ on_connect(client, userdata, flags, reason_code, properties)
|
||||||
|
+ on_publish(client, userdata, mid, reason_code, properties)
|
||||||
+ run()
|
+ run()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,6 +32,7 @@ class MQTTClient {
|
|||||||
+ publish()
|
+ publish()
|
||||||
+ tls_set()
|
+ tls_set()
|
||||||
+ username_pw_set()
|
+ username_pw_set()
|
||||||
|
+ loop_start()
|
||||||
}
|
}
|
||||||
|
|
||||||
Gateway o-- BleakScanner
|
Gateway o-- BleakScanner
|
||||||
|
|||||||
Reference in New Issue
Block a user