- Fix class diagram: use aggregation (o--) for BleakScanner and MQTTClient - Split sequence diagram into separate files for clarity - Add sequence_startup.puml for gateway initialization - Add sequence_data_collection.puml with error handling - Use collections for BLE broadcaster to reflect multiplicity - Remove loop construct — gateway reacts to packets, ignores intervals - Add discard of unknown UUID packets - Add handling of invalid sensor values
38 lines
603 B
Plaintext
38 lines
603 B
Plaintext
@startuml
|
|
skinparam linestyle ortho
|
|
|
|
class Gateway {
|
|
- gateway_id: str
|
|
- mqtt_broker: str
|
|
- mqtt_port: int
|
|
- service_uuid: str
|
|
- mqttc: MQTTClient
|
|
--
|
|
+ KEY_WINDOW: 0x01
|
|
+ KEY_HUMIDITY: 0x02
|
|
+ KEY_TEMP: 0x03
|
|
+ KEY_CO2: 0x04
|
|
--
|
|
+ decode_payload(data: bytes): dict
|
|
+ publish(mac: str, data: dict)
|
|
+ on_device_found(device, adv_data)
|
|
+ run()
|
|
}
|
|
|
|
class BleakScanner {
|
|
+ start()
|
|
+ stop()
|
|
}
|
|
|
|
class MQTTClient {
|
|
+ connect()
|
|
+ publish()
|
|
+ tls_set()
|
|
+ username_pw_set()
|
|
}
|
|
|
|
Gateway o-- BleakScanner
|
|
Gateway o-- MQTTClient
|
|
|
|
@enduml
|