~aleteoryx/muditaos

ref: 71fa4c5578eb2ea57899e63c3aa5c42461502483 muditaos/module-bluetooth/doc/bt_on_off_state_diagram.svg -rw-r--r-- 10.1 KiB
71fa4c55 — Paweł Joński [BH-721] Fix and add new rrule generator methods 4 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
47
48
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="519px" preserveAspectRatio="none" style="width:784px;height:519px;" version="1.1" viewBox="0 0 784 519" width="784px" zoomAndPan="magnify"><defs><filter height="300%" id="fig7e04263nij" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--MD5=[533c208fec6a0d647a17271f098caca5]
cluster Init--><rect fill="#FEFECE" filter="url(#fig7e04263nij)" height="379" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="218" x="554" y="128"/><rect fill="#FFFFFF" height="313.7656" rx="12.5" ry="12.5" style="stroke:#FFFFFF;stroke-width:1.0;" width="212" x="557" y="190.2344"/><line style="stroke:#A80036;stroke-width:1.5;" x1="554" x2="772" y1="187.2344" y2="187.2344"/><line style="stroke:#A80036;stroke-width:1.5;" x1="554" x2="772" y1="154.2969" y2="154.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="20" x="582" y="144.9951">Init</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="146" x="559" y="167.9355">Initialization of BT stack</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="162" x="559" y="181.9043">Creating BluetoothWorker</text><ellipse cx="667" cy="214" fill="#000000" filter="url(#fig7e04263nij)" rx="10" ry="10" style="stroke:none;stroke-width:1.0;"/><g id="Init.WorkerSetup"><rect fill="#FEFECE" filter="url(#fig7e04263nij)" height="64.2344" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="162" x="586" y="285"/><line style="stroke:#A80036;stroke-width:1.5;" x1="586" x2="748" y1="311.2969" y2="311.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="90" x="622" y="302.9951">WorkerSetup</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="142" x="591" y="327.4355">Settings fetch &amp; setup</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="94" x="591" y="341.4043">BT driver setup</text></g><g id="Init.DriverRun"><rect fill="#FEFECE" filter="url(#fig7e04263nij)" height="50.2656" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="144" x="586" y="433"/><line style="stroke:#A80036;stroke-width:1.5;" x1="586" x2="730" y1="459.2969" y2="459.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="68" x="624" y="450.9951">DriverRun</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="124" x="591" y="475.4355">Turning on BT stack</text></g><ellipse cx="16" cy="317" fill="#000000" filter="url(#fig7e04263nij)" rx="10" ry="10" style="stroke:none;stroke-width:1.0;"/><g id="Off"><rect fill="#FEFECE" filter="url(#fig7e04263nij)" height="64.2344" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="147" x="51.5" y="426"/><line style="stroke:#A80036;stroke-width:1.5;" x1="51.5" x2="198.5" y1="452.2969" y2="452.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="19" x="115.5" y="443.9951">Off</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="127" x="56.5" y="468.4355">Bluetooth turned off</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="70" x="56.5" y="482.4043">Initial state</text></g><g id="Restart"><rect fill="#FEFECE" filter="url(#fig7e04263nij)" height="50.2656" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="303" x="410.5" y="7"/><line style="stroke:#A80036;stroke-width:1.5;" x1="410.5" x2="713.5" y1="33.2969" y2="33.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="50" x="537" y="24.9951">Restart</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="283" x="415.5" y="49.4355">Restart Bluetooth Stack in case of hard error</text></g><g id="Init.On"><rect fill="#FEFECE" filter="url(#fig7e04263nij)" height="50.2656" rx="12.5" ry="12.5" style="stroke:#A80036;stroke-width:1.5;" width="166" x="349" y="292"/><line style="stroke:#A80036;stroke-width:1.5;" x1="349" x2="515" y1="318.2969" y2="318.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="20" x="422" y="309.9951">On</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="146" x="354" y="334.4355">BT stack fully operating</text></g><!--MD5=[79cb27a3a0f2a433e2384f6da7fb5477]
link *start to Off--><path d="M21.04,325.99 C30.24,340.38 50.58,371.46 70,396 C76.77,404.55 84.4,413.44 91.78,421.7 " fill="none" id="*start-to-Off" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="95.38,425.69,92.3504,416.3187,92.0423,421.9672,86.3938,421.6591,95.38,425.69" style="stroke:#A80036;stroke-width:1.0;"/><!--MD5=[cbd16985e98923477b086a370bc489ce]
link Off to Init--><path d="M111.03,425.9 C96.34,387.94 79.61,324 113,285 C145.58,246.945 256.3375,229.42 359.6875,221.4213 C411.3625,217.4219 461.1856,215.8041 498.4588,215.1923 C517.0953,214.8865 532.5944,214.8321 543.6187,214.8574 C546.3747,214.8637 548.8511,214.875 551.027,214.8886 C551.5709,214.892 552.0961,214.8955 552.6022,214.8991 C552.8552,214.901 553.1035,214.9028 553.3469,214.9047 " fill="none" id="Off-to-Init" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="553.3469,214.9047,544.3778,210.8359,548.347,214.8664,544.3165,218.8356,553.3469,214.9047" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="216" x="114" y="321.5669">Command::TurnOn /worker-&gt;init()</text><!--MD5=[155566f13e7efec7d105709a16fe3d4a]
link *start*Init to WorkerSetup--><path d="M667,224.32 C667,236.78 667,259.6 667,279.35 " fill="none" id="*start*Init-to-WorkerSetup" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="667,284.56,671,275.56,667,279.56,663,275.56,667,284.56" style="stroke:#A80036;stroke-width:1.0;"/><!--MD5=[c80e218129ccf8c5829d329afa97d946]
link WorkerSetup to DriverRun--><path d="M664.98,349.19 C663.46,372.71 661.38,404.73 659.89,427.76 " fill="none" id="WorkerSetup-to-DriverRun" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="659.57,432.82,664.1267,424.0887,659.8837,427.8298,656.1425,423.5868,659.57,432.82" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="88" x="664" y="392.0669">/ initDone = 1</text><!--MD5=[55403775e581799a7dec5eedc8d92082]
link DriverRun to Off--><path d="M585.63,458 C485.85,458 306.72,458 203.7,458 " fill="none" id="DriverRun-to-Off" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="198.55,458,207.55,462,203.55,458,207.55,454,198.55,458" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="293" x="245.75" y="451.0669">Turned on [error != 0]/ send status to appMgr</text><!--MD5=[daf29d706684f08af01db28327c260dd]
link DriverRun to On--><path d="M585.7,452.89 C504.72,446.59 380.99,431.34 352,396 C337.06,377.79 354.29,359.31 376.53,344.91 " fill="none" id="DriverRun-to-On" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="381.03,342.09,371.2759,343.4532,376.786,344.7336,375.5057,350.2436,381.03,342.09" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="299" x="353" y="392.0669">Turned on [error == 0]/ send status to appMgr</text><!--MD5=[2ee57ebca22bdc8713f173619aa2ce0d]
link On to Off--><path d="M348.7,341.47 C288.04,358.57 216.4,378.79 216,379 C195.03,390.23 174.65,406.99 158.5,422.09 " fill="none" id="On-to-Off" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="154.49,425.89,163.772,422.597,158.1171,422.4485,158.2656,416.7936,154.49,425.89" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="121" x="217" y="392.0669">Command::TurnOff</text><!--MD5=[15b5b872ee5848af43a946556c76c324]
link Restart to Init--><path d="M562,57.28 C562,69.37 562,84.94 562,101.545 C562,109.8475 562,118.4088 562,126.9231 C562,127.1892 562,127.4552 562,127.7212 " fill="none" id="Restart-to-Init" style="stroke:#A80036;stroke-width:1.0;"/><polygon fill="#A80036" points="562,127.7212,566,118.7212,562,122.7212,558,118.7212,562,127.7212" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="91" x="563" y="100.0669">/worker-&gt;Init()</text><!--MD5=[a5b2c1c4be5d5c46b07cf1e23aa28fb7]
@startuml

[*] - -> Off
Off: Bluetooth turned off
Off: Initial state

Off - -> Init : Command::TurnOn /worker->init()


state Init{
Init: Initialization of BT stack
Init: Creating BluetoothWorker

[*] - -> WorkerSetup
WorkerSetup: Settings fetch & setup
WorkerSetup: BT driver setup

state DriverRun{
DriverRun: Turning on BT stack
}
WorkerSetup - -> DriverRun : / initDone = 1

DriverRun -r-> Off: Turned on [error != 0]/ send status to appMgr
DriverRun - -> On: Turned on [error == 0]/ send status to appMgr
}
state Restart {
Restart: Restart Bluetooth Stack in case of hard error
}
state On{
On: BT stack fully operating
}
On - -> Off : Command::TurnOff
Restart - -> Init :/worker->Init()
@enduml

PlantUML version 1.2021.00(Sun Jan 10 11:25:05 CET 2021)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>