~aleteoryx/muditaos

ref: b232c9770ca1ce8da9f3df4818a3eef168f610da muditaos/module-bluetooth/change_bt_status_flowchart.puml -rw-r--r-- 1.4 KiB
b232c977 — Pawel Olejniczak [CP-1135] Extend messages API by deleteThread method 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@startuml
skinparam BackgroundColor F0F0F0

actor User
participant "Application Settings" as appstgs
participant "Bluetooth Window" as btwndw
participant "Service Bluetooth" as srvbt
participant "Bluetooth Worker" as btwrkr
participant "Service DB" as srvdb

    == Change Bluetooth status flow ==

User ->appstgs : Tries to open Bluetooth Window
activate appstgs
appstgs -> btwndw : Create Bluetooth Window
    activate btwndw
    deactivate appstgs
btwndw -> srvbt : BluetoothMessage::RequestBluetoothStatus
    activate srvbt
    deactivate btwndw
srvbt -> appstgs : BluetoothMessage::ResponseBluetoothStatus
activate appstgs
deactivate srvbt
appstgs ->o btwndw : Recreate Bluetooth Window with new bluetoothStatus
deactivate appstgs

User -> btwndw : Changes bluetoothState
activate btwndw
btwndw -> srvbt : BluetoothMessage::SetBluetoothStatus
deactivate btwndw
activate srvbt
srvbt -> srvbt : Cache received new value of bluetoothStatus
srvbt ->o srvdb : Settings::setValue(bluetoothState)
srvbt ->o srvdb : Settings::setValue(deviceVisibility)
srvbt -> btwrkr : Pass cached Bluetooth settings
activate btwrkr
btwrkr ->o btwrkr : Reload Bluetooth settings
deactivate btwrkr
srvbt -> appstgs : BluetoothMessage::ResponseBluetoothStatus
activate appstgs
deactivate srvbt
appstgs ->o btwndw : Recreate Bluetooth Window with new bluetoothStatus
deactivate appstgs
deactivate btwndw

@enduml