first command online

第一個版本
Dev
chiyu1468 2 years ago
parent 49752d4626
commit 55d92d4614

@ -0,0 +1,43 @@
FROM ubuntu:20.04
# HOW TO USE THIS FILE
# 切換到這個檔案的目錄處
# 輸入以下指令
# docker build -t mavone_server:0.XX .
COPY mavone /home/mavone/pkg
COPY LibPack/libmavsdk-dev_1.4.18_ubuntu20.04_amd64.deb /home/mavone/pkg/libmavsdk.deb
RUN test -f /home/mavone/pkg/libmavsdk.deb || (echo "File not found: /home/mavone/pkg/libmavsdk.deb" && exit 1)
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
ENV CONFIG_FILE /home/mavone/config.txt
RUN apt-get update
RUN apt-get install -y g++ cmake libmysqlcppconn-dev
WORKDIR /home/mavone/pkg
RUN dpkg -i libmavsdk.deb
RUN cmake -Bbuild -H.
RUN cmake --build build
RUN cp build/mavone /usr/local/bin/mavone
WORKDIR /home/mavone
RUN rm -r /home/mavone/pkg
CMD ["/bin/sh", "-c", "mavone $CONFIG_FILE"]
# 測試語句
# docker run -it --rm -e CONFIG_FILE="/home/mavone/mavone_config.txt" -v C:\_Project\MAVSDK_Dev\configurations:/home/mavone mavone_server:0.42
# docker run -it --rm -e CONFIG_FILE="/home/mavone/mavone_config.txt" -p 14550:14550 -v C:\_Project\MAVSDK_Dev\configurations:/home/mavone mavone_server:0.421
# docker run -it --rm -e CONFIG_FILE="/home/mavone/config1.txt" -p 49304:49304 -v /home/webpage/Mavsdk_DEV/mavone:/home/mavone mavone_server:0.421
# 這個方式會是錯的 因為會去執行 host 的環境變數 而不是 container 的環境變數
# ENTRYPOINT ["mavone"]
# CMD ["$CONFIG_FILE"]

@ -0,0 +1,384 @@
<mxfile host="Electron" modified="2024-01-16T09:06:13.081Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.18 Chrome/120.0.6099.199 Electron/28.1.2 Safari/537.36" etag="rZ2WN5JBLS4L5ICd5Iy6" version="22.1.18" type="device">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="2660" dy="1503" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="qup03jMZmrsR1gBGYmkV-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-1" target="qup03jMZmrsR1gBGYmkV-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-1" value="mavone.cpp" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFCCCC;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="350" y="10" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-2" target="qup03jMZmrsR1gBGYmkV-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-2" value="Input config file name" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="330" y="80" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-4" target="qup03jMZmrsR1gBGYmkV-14">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-4" value="Read config file content and parse into&amp;nbsp;&lt;i&gt;&lt;u&gt;initSetting&lt;/u&gt;&lt;/i&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;&amp;nbsp;&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="330" y="160" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-6" value="subsribe event&lt;br&gt;new MAVSDK::System detect" style="swimlane;whiteSpace=wrap;html=1;startSize=30;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="487" y="270" width="253" height="440" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-7" target="qup03jMZmrsR1gBGYmkV-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-7" value="Get all connect MAVSDK::System list" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="10" y="40" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-8" target="qup03jMZmrsR1gBGYmkV-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-8" value="Contrast the list with &lt;i&gt;&lt;u&gt;systemHandlerInfos &lt;/u&gt;&lt;/i&gt;and pinpoint an object in the list that has a sysid exclusive to it." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="10" y="105" width="120" height="75" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-35" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-10" target="qup03jMZmrsR1gBGYmkV-12">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-36" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-10" target="qup03jMZmrsR1gBGYmkV-18">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-10" value="&lt;font style=&quot;font-size: 11px;&quot;&gt;Has an &lt;br&gt;object been &lt;br&gt;discovered?&lt;/font&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="35" y="208" width="70" height="66" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-37" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-12" target="qup03jMZmrsR1gBGYmkV-16">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-12" value="Start an &lt;u style=&quot;&quot;&gt;&lt;b&gt;systemHandler&lt;/b&gt;&lt;/u&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;&amp;nbsp;&lt;br&gt;thread for this MAVSDK::System object.&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="130" y="204" width="100" height="74" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-46" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-16" target="qup03jMZmrsR1gBGYmkV-45">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-16" value="Record the required information into an&amp;nbsp;&lt;i&gt;&lt;u&gt;handlerInfo&lt;/u&gt;&lt;/i&gt; object." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="120" y="290" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-18" value="END" style="whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="40" y="390" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-23" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="90" y="210" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-24" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="35" y="274" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-47" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-45" target="qup03jMZmrsR1gBGYmkV-18">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-45" value="Add this handlerInfo object in&amp;nbsp;&lt;br&gt;&lt;i style=&quot;border-color: var(--border-color);&quot;&gt;&lt;u style=&quot;border-color: var(--border-color);&quot;&gt;systemHandlerInfos&lt;/u&gt;&lt;/i&gt;&lt;br&gt;&amp;nbsp;for managment." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry x="120" y="370" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-14" value="Initialize MAVSDK and activate its listening connection port." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="330" y="250" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-31" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.001;entryY=0.023;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-14" target="qup03jMZmrsR1gBGYmkV-6">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="520" y="380" as="sourcePoint" />
<mxPoint x="470" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-66" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-32" target="qup03jMZmrsR1gBGYmkV-34">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-32" value="Establish MySQL connection." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="330" y="350" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-33" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" target="qup03jMZmrsR1gBGYmkV-32">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="487" y="330" as="sourcePoint" />
<mxPoint x="570" y="420" as="targetPoint" />
<Array as="points">
<mxPoint x="390" y="330" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-122" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-34" target="qup03jMZmrsR1gBGYmkV-41">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="300" y="470" />
<mxPoint x="300" y="80" />
<mxPoint x="210" y="80" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-124" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-34" target="qup03jMZmrsR1gBGYmkV-123">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-34" value="is &lt;br&gt;terminated&lt;br&gt;be SET" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="350" y="430" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-40" value="" style="endArrow=block;dashed=1;html=1;rounded=0;strokeWidth=1;endFill=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-12">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="750" y="390" as="sourcePoint" />
<mxPoint x="800" y="340" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-115" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-41" target="qup03jMZmrsR1gBGYmkV-114">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-41" value="foreach handlerInfo&amp;nbsp; object&amp;nbsp;in&amp;nbsp;&lt;br&gt;&lt;i style=&quot;border-color: var(--border-color);&quot;&gt;&lt;u style=&quot;border-color: var(--border-color);&quot;&gt;systemHandlerInfos.&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="150" y="100" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-131" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-42" target="qup03jMZmrsR1gBGYmkV-130">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-42" value="State Machine (handlerInfo.handlerState&lt;span style=&quot;background-color: initial;&quot;&gt;)&lt;/span&gt;" style="swimlane;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="-650" y="240" width="930" height="860" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-58" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-43" target="qup03jMZmrsR1gBGYmkV-51">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-63" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-43" target="qup03jMZmrsR1gBGYmkV-49">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-43" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Init." style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="720" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-99" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-49" target="qup03jMZmrsR1gBGYmkV-98">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-49" value="INSERT new row &lt;br&gt;to MySQL" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="700" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-73" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-50" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="760" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-50" value="Change state to&lt;br&gt;Prologue" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="715" y="740" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-59" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-51" target="qup03jMZmrsR1gBGYmkV-54">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-51" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Prologue" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="570" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-60" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-54" target="qup03jMZmrsR1gBGYmkV-55">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-67" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-54" target="qup03jMZmrsR1gBGYmkV-65">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-54" value="&lt;u&gt;mysqlSN&lt;/u&gt;&lt;br&gt;has &lt;br&gt;value?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="570" y="130" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-61" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-55" target="qup03jMZmrsR1gBGYmkV-56">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-76" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-55" target="qup03jMZmrsR1gBGYmkV-86">
<mxGeometry relative="1" as="geometry">
<mxPoint x="550" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-55" value="check connection&lt;br&gt;from&amp;nbsp;&lt;br&gt;&lt;i&gt;&lt;u&gt;gHandlerMask&lt;/u&gt;&lt;/i&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="570" y="240" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-77" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-56" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry">
<mxPoint x="500" y="390" as="targetPoint" />
<Array as="points">
<mxPoint x="430" y="390" />
<mxPoint x="430" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-56" value="&lt;u&gt;&lt;i&gt;gTelemetryInfo&lt;/i&gt;&lt;/u&gt;&lt;br&gt;has any data?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="570" y="350" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-74" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-57" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="610" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-57" value="Change state to&lt;br&gt;Ready" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="560" y="740" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-87" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-65" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="430" y="170" />
<mxPoint x="430" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-65" value="Error Detect!&lt;br&gt;Set terminated" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="450" y="150" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-69" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="610" y="210" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-70" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="610" y="320" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-71" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="610" y="430" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-68" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="540" y="140" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-72" value="Continue" style="whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="40" y="810" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-78" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="540" y="250" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-79" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="540" y="360" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-94" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-80" target="qup03jMZmrsR1gBGYmkV-91">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-80" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Ready" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="270" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-83" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-81" target="qup03jMZmrsR1gBGYmkV-57">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-81" value="UPDATE state in MySQL" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="550" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-82" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-56" target="qup03jMZmrsR1gBGYmkV-81">
<mxGeometry relative="1" as="geometry">
<mxPoint x="570" y="440" as="sourcePoint" />
<mxPoint x="620" y="360" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-105" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-84" target="qup03jMZmrsR1gBGYmkV-97">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-84" value="Parsing &lt;u&gt;&lt;i&gt;gTelemetryInfo&lt;/i&gt;&lt;/u&gt;&lt;br&gt;into MySQL syntax" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="250" y="360" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-89" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-86" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="430" y="280" />
<mxPoint x="430" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-86" value="Change state to&lt;br&gt;Disconnected" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="450" y="260" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-95" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-91" target="qup03jMZmrsR1gBGYmkV-84">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-103" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-91" target="qup03jMZmrsR1gBGYmkV-93">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-91" value="check connection&lt;br&gt;from&amp;nbsp;&lt;br&gt;&lt;i&gt;&lt;u&gt;gHandlerMask&lt;/u&gt;&lt;/i&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="270" y="240" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-92" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="240" y="250" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-111" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-93" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-93" value="Change state to&lt;br&gt;Disconnected" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="160" y="740" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-109" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-96" target="qup03jMZmrsR1gBGYmkV-108">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-96" value="clean gTelemetryInfo" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="250" y="520" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-106" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-97" target="qup03jMZmrsR1gBGYmkV-96">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-97" value="UPDATE data into&lt;br&gt;MySQL" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="250" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-100" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-98" target="qup03jMZmrsR1gBGYmkV-50">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-98" value="Get mysqlSN&lt;br&gt;from MySQL" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="700" y="570" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-104" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-101" target="qup03jMZmrsR1gBGYmkV-102">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-101" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Disconnected" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="50" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-107" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-102" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-102" value="UPDATE state in MySQL" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="30" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-113" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-108" target="qup03jMZmrsR1gBGYmkV-110">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-108" value="Get &lt;br&gt;Vehicle command &lt;br&gt;from MySQL" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BFFBFF;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="250" y="580" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-112" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-110" target="qup03jMZmrsR1gBGYmkV-72">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="310" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-110" value="Parsing&lt;br&gt;Vehicle command&lt;br&gt;into&amp;nbsp;&lt;i&gt;&lt;u&gt;gVehicleCommand&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BFFBFF;" vertex="1" parent="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry x="250" y="660" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-116" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-114" target="qup03jMZmrsR1gBGYmkV-42">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-114" value="Operate the handlerInfo object" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="150" y="180" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-119" value="No" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="320" y="430" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-127" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-123" target="qup03jMZmrsR1gBGYmkV-126">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-123" value="Close MySQL connection." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="330" y="550" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-125" value="Yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="390" y="510" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-129" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-126" target="qup03jMZmrsR1gBGYmkV-128">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-126" value="Join &amp;amp; Tell &lt;br&gt;all thread to cutoff" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="330" y="640" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-128" value="STOP" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFCCCC;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="350" y="750" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-133" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-130" target="qup03jMZmrsR1gBGYmkV-132">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-130" value="foreach handlerInfo&amp;nbsp; object&amp;nbsp;in&amp;nbsp;&lt;br&gt;&lt;i style=&quot;border-color: var(--border-color);&quot;&gt;&lt;u style=&quot;border-color: var(--border-color);&quot;&gt;systemHandlerInfos.&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="150" y="1140" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-134" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-132" target="qup03jMZmrsR1gBGYmkV-34">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="470" y="1260" />
<mxPoint x="470" y="470" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-132" value="Remove handlerInfo object if the state is disconnected." style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="150" y="1230" width="120" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

@ -0,0 +1,578 @@
<mxfile host="Electron" modified="2024-03-19T15:39:55.572Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.18 Chrome/120.0.6099.199 Electron/28.1.2 Safari/537.36" etag="dIUk3_SABq-_l_q8tnzb" version="22.1.18" type="device">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="1927" dy="902" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="qup03jMZmrsR1gBGYmkV-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-1" target="qup03jMZmrsR1gBGYmkV-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-1" value="mavone.cpp" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFCCCC;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="350" y="10" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-2" target="qup03jMZmrsR1gBGYmkV-4" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-2" value="Input config file name" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="330" y="80" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-4" target="qup03jMZmrsR1gBGYmkV-14" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-4" value="Read config file content and parse into&amp;nbsp;&lt;i&gt;&lt;u&gt;initSetting&lt;/u&gt;&lt;/i&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;&amp;nbsp;&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="330" y="160" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-6" value="subscribe event&lt;br&gt;new MAVSDK::System detect" style="swimlane;whiteSpace=wrap;html=1;startSize=30;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="487" y="270" width="253" height="440" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-7" target="qup03jMZmrsR1gBGYmkV-8" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-7" value="Get all connect MAVSDK::System list" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="10" y="40" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-8" target="qup03jMZmrsR1gBGYmkV-10" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-8" value="Contrast the list with &lt;i&gt;&lt;u&gt;systemHandlerInfos &lt;/u&gt;&lt;/i&gt;and pinpoint an object in the list that has a sysid exclusive to it." style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="10" y="105" width="120" height="75" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-35" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-10" target="qup03jMZmrsR1gBGYmkV-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-36" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-10" target="qup03jMZmrsR1gBGYmkV-18" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-10" value="&lt;font style=&quot;font-size: 11px;&quot;&gt;Has an &lt;br&gt;object been &lt;br&gt;discovered?&lt;/font&gt;" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="35" y="208" width="70" height="66" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-37" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-12" target="qup03jMZmrsR1gBGYmkV-16" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-12" value="Start an &lt;u style=&quot;&quot;&gt;&lt;b&gt;systemHandler&lt;/b&gt;&lt;/u&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;&amp;nbsp;&lt;br&gt;thread for this MAVSDK::System object.&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="130" y="204" width="100" height="74" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-46" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-16" target="qup03jMZmrsR1gBGYmkV-45" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-16" value="Record the required information into an&amp;nbsp;&lt;i&gt;&lt;u&gt;handlerInfo&lt;/u&gt;&lt;/i&gt; object." style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="120" y="290" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-18" value="END" style="whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="40" y="390" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-23" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="90" y="210" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-24" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="35" y="274" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-47" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" source="qup03jMZmrsR1gBGYmkV-45" target="qup03jMZmrsR1gBGYmkV-18" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-45" value="Add this handlerInfo object in&amp;nbsp;&lt;br&gt;&lt;i style=&quot;border-color: var(--border-color);&quot;&gt;&lt;u style=&quot;border-color: var(--border-color);&quot;&gt;systemHandlerInfos&lt;/u&gt;&lt;/i&gt;&lt;br&gt;&amp;nbsp;for managment." style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-6" vertex="1">
<mxGeometry x="120" y="370" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-14" value="Initialize MAVSDK and activate its listening connection port." style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="330" y="250" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-31" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.001;entryY=0.023;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-14" target="qup03jMZmrsR1gBGYmkV-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="520" y="380" as="sourcePoint" />
<mxPoint x="470" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-66" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-32" target="qup03jMZmrsR1gBGYmkV-34" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-32" value="Establish MySQL connection." style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="330" y="350" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-33" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" target="qup03jMZmrsR1gBGYmkV-32" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="487" y="330" as="sourcePoint" />
<mxPoint x="570" y="420" as="targetPoint" />
<Array as="points">
<mxPoint x="390" y="330" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-122" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-34" target="qup03jMZmrsR1gBGYmkV-41" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="300" y="470" />
<mxPoint x="300" y="80" />
<mxPoint x="210" y="80" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-124" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-34" target="qup03jMZmrsR1gBGYmkV-123" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-34" value="is &lt;br&gt;terminated&lt;br&gt;be SET" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="350" y="430" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-40" value="" style="endArrow=block;dashed=1;html=1;rounded=0;strokeWidth=1;endFill=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.004;entryY=0.778;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-12" target="qup03jMZmrsR1gBGYmkV-135" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="750" y="390" as="sourcePoint" />
<mxPoint x="800" y="340" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-115" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-41" target="qup03jMZmrsR1gBGYmkV-114" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-41" value="foreach handlerInfo&amp;nbsp; object&amp;nbsp;in&amp;nbsp;&lt;br&gt;&lt;i style=&quot;border-color: var(--border-color);&quot;&gt;&lt;u style=&quot;border-color: var(--border-color);&quot;&gt;systemHandlerInfos.&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="150" y="100" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-131" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-42" target="qup03jMZmrsR1gBGYmkV-130" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-42" value="State Machine (handlerInfo.handlerState&lt;span style=&quot;background-color: initial;&quot;&gt;)&lt;/span&gt;" style="swimlane;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-650" y="240" width="930" height="860" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-58" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-43" target="qup03jMZmrsR1gBGYmkV-51" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-63" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-43" target="qup03jMZmrsR1gBGYmkV-49" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-43" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Init." style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="720" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-99" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-49" target="qup03jMZmrsR1gBGYmkV-98" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-49" value="INSERT new row &lt;br&gt;to MySQL" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="700" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-73" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-50" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="760" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-50" value="Change state to&lt;br&gt;Prologue" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="715" y="740" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-59" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-51" target="qup03jMZmrsR1gBGYmkV-54" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-51" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Prologue" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="570" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-60" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-54" target="qup03jMZmrsR1gBGYmkV-55" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-67" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-54" target="qup03jMZmrsR1gBGYmkV-65" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-54" value="&lt;u&gt;mysqlSN&lt;/u&gt;&lt;br&gt;has &lt;br&gt;value?" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="570" y="130" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-61" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-55" target="qup03jMZmrsR1gBGYmkV-56" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-76" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-55" target="qup03jMZmrsR1gBGYmkV-86" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="550" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-55" value="check connection&lt;br&gt;from&amp;nbsp;&lt;br&gt;&lt;i&gt;&lt;u&gt;gHandlerMask&lt;/u&gt;&lt;/i&gt;" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="570" y="240" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-77" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-56" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="500" y="390" as="targetPoint" />
<Array as="points">
<mxPoint x="430" y="390" />
<mxPoint x="430" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-56" value="&lt;u&gt;&lt;i&gt;gTelemetryInfo&lt;/i&gt;&lt;/u&gt;&lt;br&gt;has any data?" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="570" y="350" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-74" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-57" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="610" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-57" value="Change state to&lt;br&gt;Ready" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="560" y="740" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-87" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-65" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="430" y="170" />
<mxPoint x="430" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-65" value="Error Detect!&lt;br&gt;Set terminated" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="450" y="150" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-69" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="610" y="210" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-70" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="610" y="320" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-71" value="Yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="610" y="430" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-68" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="540" y="140" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-72" value="Continue" style="whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="40" y="810" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-78" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="540" y="250" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-79" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="540" y="360" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-94" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-80" target="qup03jMZmrsR1gBGYmkV-91" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-80" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Ready" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="270" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-83" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-81" target="qup03jMZmrsR1gBGYmkV-57" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-81" value="UPDATE state in MySQL" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="550" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-82" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-56" target="qup03jMZmrsR1gBGYmkV-81" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="570" y="440" as="sourcePoint" />
<mxPoint x="620" y="360" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-105" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-84" target="qup03jMZmrsR1gBGYmkV-97" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-84" value="Parsing &lt;u&gt;&lt;i&gt;gTelemetryInfo&lt;/i&gt;&lt;/u&gt;&lt;br&gt;into MySQL syntax" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="250" y="360" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-89" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-86" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="430" y="280" />
<mxPoint x="430" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-86" value="Change state to&lt;br&gt;Disconnected" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="450" y="260" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-95" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-91" target="qup03jMZmrsR1gBGYmkV-84" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-103" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-91" target="qup03jMZmrsR1gBGYmkV-93" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-91" value="check connection&lt;br&gt;from&amp;nbsp;&lt;br&gt;&lt;i&gt;&lt;u&gt;gHandlerMask&lt;/u&gt;&lt;/i&gt;" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="270" y="240" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-92" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="240" y="250" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-111" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-93" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-93" value="Change state to&lt;br&gt;Disconnected" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="160" y="740" width="90" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-109" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-96" target="qup03jMZmrsR1gBGYmkV-108" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-96" value="clean gTelemetryInfo" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="250" y="520" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-106" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-97" target="qup03jMZmrsR1gBGYmkV-96" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-97" value="UPDATE data into&lt;br&gt;MySQL" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="250" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-100" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-98" target="qup03jMZmrsR1gBGYmkV-50" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-98" value="Get mysqlSN&lt;br&gt;from MySQL" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="700" y="570" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-104" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-101" target="qup03jMZmrsR1gBGYmkV-102" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-101" value="Case :&amp;nbsp;&lt;br&gt;&lt;font style=&quot;font-size: 12px;&quot;&gt;State &lt;/font&gt;is &lt;br&gt;Disconnected" style="rhombus;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="50" y="40" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-107" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-102" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-102" value="UPDATE state in MySQL" style="rounded=1;whiteSpace=wrap;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="30" y="460" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-113" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-108" target="qup03jMZmrsR1gBGYmkV-110" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-108" value="Get &lt;br&gt;Vehicle command &lt;br&gt;from MySQL" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BFFBFF;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="250" y="580" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-112" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="qup03jMZmrsR1gBGYmkV-42" source="qup03jMZmrsR1gBGYmkV-110" target="qup03jMZmrsR1gBGYmkV-72" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="310" y="825" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-110" value="Parsing&lt;br&gt;Vehicle command&lt;br&gt;into&amp;nbsp;&lt;i&gt;&lt;u&gt;gVehicleCommand&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BFFBFF;" parent="qup03jMZmrsR1gBGYmkV-42" vertex="1">
<mxGeometry x="250" y="660" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-116" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-114" target="qup03jMZmrsR1gBGYmkV-42" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-114" value="Operate the handlerInfo object" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="150" y="180" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-119" value="No" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="320" y="430" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-127" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-123" target="qup03jMZmrsR1gBGYmkV-126" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-123" value="Close MySQL connection." style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="330" y="550" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-125" value="Yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="390" y="510" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-129" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-126" target="qup03jMZmrsR1gBGYmkV-128" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-126" value="Join &amp;amp; Tell &lt;br&gt;all thread to cutoff" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="330" y="640" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-128" value="STOP" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFCCCC;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="350" y="750" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-133" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-130" target="qup03jMZmrsR1gBGYmkV-132" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-130" value="foreach handlerInfo&amp;nbsp; object&amp;nbsp;in&amp;nbsp;&lt;br&gt;&lt;i style=&quot;border-color: var(--border-color);&quot;&gt;&lt;u style=&quot;border-color: var(--border-color);&quot;&gt;systemHandlerInfos.&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="150" y="1140" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-134" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-132" target="qup03jMZmrsR1gBGYmkV-34" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="470" y="1260" />
<mxPoint x="470" y="470" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-132" value="Remove handlerInfo object if the state is disconnected." style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="150" y="1230" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="qup03jMZmrsR1gBGYmkV-135" target="jvLHa8hEhrjO4LWS7YWt-0" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qup03jMZmrsR1gBGYmkV-135" value="systemHandler.cpp" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFCCCC;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1025" y="10" width="110" height="50" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-0" target="jvLHa8hEhrjO4LWS7YWt-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-0" value="Init variables &amp;amp; &lt;br&gt;set parameter" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1020" y="100" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-1" value="handlerInfo" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="600" y="70" width="140" height="120" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-2" value="Item 1" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-1" vertex="1">
<mxGeometry y="30" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-3" value="Item 2" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-1" vertex="1">
<mxGeometry y="60" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-4" value="Item 3" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-1" vertex="1">
<mxGeometry y="90" width="140" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-5" target="jvLHa8hEhrjO4LWS7YWt-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-39" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;endArrow=none;endFill=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="1080" y="349.9999999999999" as="targetPoint" />
<Array as="points">
<mxPoint x="990" y="215" />
<mxPoint x="990" y="350" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-5" value="does this system have autopilot?" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1037.5" y="170" width="85" height="90" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-6" value="subscribe event&lt;br&gt;telemetry data recieved" style="swimlane;whiteSpace=wrap;html=1;startSize=35;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1190" y="290" width="500" height="365" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-18" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" source="jvLHa8hEhrjO4LWS7YWt-10" target="jvLHa8hEhrjO4LWS7YWt-12" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-10" value="for&amp;nbsp;latitude,&amp;nbsp;longitude" style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="21.25" y="115" width="137.5" height="45" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-11" value="Read data &lt;br&gt;from buffer" style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="195" y="50" width="110" height="40" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="jvLHa8hEhrjO4LWS7YWt-6" source="jvLHa8hEhrjO4LWS7YWt-12" target="jvLHa8hEhrjO4LWS7YWt-13" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="90" y="275" />
<mxPoint x="250" y="275" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-12" value="Convert a DOUBLE into a string with precision to &lt;br&gt;8 decimal places." style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="30" y="205" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-13" value="Compose t&lt;i&gt;&lt;u&gt;elemetryInfo&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="195" y="295" width="110" height="40" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-19" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" source="jvLHa8hEhrjO4LWS7YWt-14" target="jvLHa8hEhrjO4LWS7YWt-15" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-14" value="for&amp;nbsp;latitude,&amp;nbsp;longitude&lt;br&gt;heading,&amp;nbsp;velocity,&lt;br&gt;eulerAngle(pitch, yaw, roll)&lt;br&gt;battery remain percent" style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="170" y="105" width="160" height="75" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-22" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" source="jvLHa8hEhrjO4LWS7YWt-15" target="jvLHa8hEhrjO4LWS7YWt-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-15" value="Convert a FLOAT &lt;br&gt;into a string with precision to &lt;br&gt;4 decimal places." style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="190" y="205" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" source="jvLHa8hEhrjO4LWS7YWt-16" target="jvLHa8hEhrjO4LWS7YWt-17" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-16" value="for&amp;nbsp;armed, inair" style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="350" y="120" width="137.5" height="45" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="jvLHa8hEhrjO4LWS7YWt-6" source="jvLHa8hEhrjO4LWS7YWt-17" target="jvLHa8hEhrjO4LWS7YWt-13" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="419" y="275" />
<mxPoint x="250" y="275" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-17" value="Convert BOOL to &lt;br&gt;a &#39;0&#39; or &#39;1&#39; string." style="rounded=1;whiteSpace=wrap;html=1;" parent="jvLHa8hEhrjO4LWS7YWt-6" vertex="1">
<mxGeometry x="358.75" y="205" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-7" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="1185" y="310" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-7" value="Set telemetry data transmission rate" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFFFF;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1020" y="290" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-24" target="jvLHa8hEhrjO4LWS7YWt-26" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1160" y="610" />
<mxPoint x="1160" y="440" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-47" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-24" target="jvLHa8hEhrjO4LWS7YWt-42" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-24" value="Does &lt;i&gt;&lt;u&gt;gTelemetryInfo&lt;/u&gt;&lt;/i&gt;&lt;br&gt;have any&lt;br&gt;content?" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="570" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-28" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-25" target="jvLHa8hEhrjO4LWS7YWt-24" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-25" value="Sleep 1 sec" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="510" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-27" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-26" target="jvLHa8hEhrjO4LWS7YWt-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-26" value="Retry count&lt;br&gt;less than&lt;br&gt;10?" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="400" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-31" value="Yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="470" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-32" value="Yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="640" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-33" value="Yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1037.5" y="250" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-38" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" target="jvLHa8hEhrjO4LWS7YWt-26" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="1190" y="350" as="sourcePoint" />
<mxPoint x="1000" y="350" as="targetPoint" />
<Array as="points">
<mxPoint x="1080" y="350" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-40" value="No" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1000" y="185" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-41" value="No" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1120" y="580" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-46" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-42" target="jvLHa8hEhrjO4LWS7YWt-45" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-54" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-42" target="jvLHa8hEhrjO4LWS7YWt-53" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-42" value="is diccon-nect?&lt;br&gt;or cutoff ?" style="rhombus;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1040" y="710" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-49" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-45" target="jvLHa8hEhrjO4LWS7YWt-48" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-45" value="Put telemetry into&amp;nbsp;&lt;i style=&quot;border-color: var(--border-color);&quot;&gt;&lt;u style=&quot;border-color: var(--border-color);&quot;&gt;gTelemetryInfo&lt;/u&gt;&lt;/i&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1190" y="720" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-51" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-48" target="jvLHa8hEhrjO4LWS7YWt-50" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-48" value="check cutoff flag" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1190" y="810" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-52" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-50" target="jvLHa8hEhrjO4LWS7YWt-42" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1340" y="875" />
<mxPoint x="1340" y="690" />
<mxPoint x="1080" y="690" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-50" value="sleep 100 ms" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1190" y="860" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-56" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jvLHa8hEhrjO4LWS7YWt-53" target="jvLHa8hEhrjO4LWS7YWt-55" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-53" value="set disconnect flag" style="rounded=1;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1020" y="810" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="jvLHa8hEhrjO4LWS7YWt-55" value="END" style="rounded=0;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="1042.5" y="860" width="75" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

@ -0,0 +1,9 @@
root --- RCrVpHd2
webInterface --- w23FgwXnQ5
mavoneServer --- T7DVVh2Sue
GUIDev --- pwnUxXCGE5
GUIDev2 --- c7gDdUddvB

@ -2,9 +2,10 @@ MAVSDKListeningPort=udp://:14550
mysqlHost=140.120.108.238 mysqlHost=140.120.108.238
mysqlPort=1880 mysqlPort=1880
mysqlUser=root mysqlUser=root
mysqlPW=wp21qpck57 mysqlPW=RCrVpHd2
mysqlDatabase=Mav_one mysqlDatabase=Mav_one
C=3.14 C=3.14
EOC EOC
EOC 就是結尾了 所以這邊可以打註解 EOC 就是結尾了 所以這邊可以打註解

@ -47,7 +47,7 @@ CREATE TABLE `NodeRed_one` (
`command_para1` double DEFAULT NULL, `command_para1` double DEFAULT NULL,
`command_para2` double DEFAULT NULL, `command_para2` double DEFAULT NULL,
PRIMARY KEY (`SerialNo`) PRIMARY KEY (`SerialNo`)
) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

File diff suppressed because one or more lines are too long

@ -34,6 +34,7 @@ gHandlerMask
std::map<int, std::map<std::string, std::string>> gTelemetryInfo; std::map<int, std::map<std::string, std::string>> gTelemetryInfo;
std::map<int, std::map<std::string, std::array<double, 2>>> gVehicleCommand; std::map<int, std::map<int, std::array<double, 2>>> gVehicleCommand;
std::map<int, std::map<std::string, int>> gHandlerMask; std::map<int, std::map<std::string, int>> gHandlerMask;
std::mutex gTeleMtx; std::mutex gTeleMtx;
std::mutex gComMtx;

@ -7,8 +7,9 @@
#include <mutex> #include <mutex>
extern std::map<int, std::map<std::string, std::string>> gTelemetryInfo; extern std::map<int, std::map<std::string, std::string>> gTelemetryInfo;
extern std::map<int, std::map<std::string, std::array<double, 2>>> gVehicleCommand; extern std::map<int, std::map<int, std::array<double, 2>>> gVehicleCommand;
extern std::map<int, std::map<std::string, int>> gHandlerMask; extern std::map<int, std::map<std::string, int>> gHandlerMask;
extern std::mutex gTeleMtx; extern std::mutex gTeleMtx;
extern std::mutex gComMtx;
#endif #endif

@ -52,6 +52,44 @@ int initializeParameters(const std::string& filePath, MavInitParameter& initSett
return 0; return 0;
} }
// 這裡會對 mysql 上的指令 做第一次轉換,再放給 systemHandler 做第二次轉換
std::map<std::string, int> commandTypeMap = {
{"aGuided", 101},
{"aLand", 102},
{"aArm", 103},
{"aSetHeight", 104},
{"aTakeoff", 105},
{"aGoto", 106},
};
std::map<int, std::array<double, 2>> decodeMysqlCommand(std::string commandType, std::string Para1, std::string Para2) {
// std::cout << commandType << ", " << Para1 << ", " << Para2 <<std::endl; // for Dev
std::map<std::string, std::function<void()>> commandMapFunc;
std::map<int, std::array<double, 2>> result;
switch (commandTypeMap[commandType]) {
case 101: // aGuided
result[1] = {4,0}; // means change mode to 4
break;
case 102: // aLand
result[1] = {9,0}; // means change mode to 9
break;
case 103: // aArm
result[11] = {0,0}; // means action arm
break;
case 104: // aSetHeight
result[13] = {std::stof(Para1),0}; // means change height to Para1
break;
case 105: // aTakeoff
result[12] = {0,0}; // means action takeoff
break;
case 106: // aGoto
result[21] = {std::stof(Para1),std::stof(Para2)}; // means goto
break;
}
return result;
}
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
@ -226,8 +264,24 @@ int main(int argc, char** argv)
break; break;
} }
// 把 MAVSDK 從無人機接到的 telemetry 放到 mysql
aTelemetryInfo = gTelemetryInfo[handlerInfo.systemID]; aTelemetryInfo = gTelemetryInfo[handlerInfo.systemID];
// TODO: 把 mysql 的指令放給 MAVSDK 準備傳到無人機
sqlString = "SELECT command_type,command_para1,command_para2 FROM NodeRed_one WHERE SerialNo = " \
+ std::to_string(handlerInfo.mysqlSN) + " AND command_type IS NOT NULL;";
res = stmt->executeQuery(sqlString);
if (res->next()) {
// 有讀到資料的話 就直接更新 gVehicleCommand
gComMtx.lock();
gVehicleCommand[handlerInfo.systemID] = decodeMysqlCommand(res->getString(1), res->getString(2), res->getString(3));
gComMtx.unlock();
// 本來想要把清空 mysql 的 command 欄位跟下面更新 telemetry 放一起 但是這樣會把程式複雜度弄上去 所以算了
sqlString = "UPDATE NodeRed_one SET command_type = NULL, command_para1 = NULL, command_para2 = NULL WHERE SerialNo = " \
+ std::to_string(handlerInfo.mysqlSN) + ";";
stmt->execute(sqlString);
}
// 把 MAVSDK 從無人機接到的 telemetry 放到 mysql
if(aTelemetryInfo.size() != 0) { if(aTelemetryInfo.size() != 0) {
sqlString = "UPDATE NodeRed_one SET "; sqlString = "UPDATE NodeRed_one SET ";
for(const auto& pair : aTelemetryInfo) { for(const auto& pair : aTelemetryInfo) {
@ -242,7 +296,7 @@ int main(int argc, char** argv)
} }
// TODO: 把 mysql 的指令放給 MAVSDK 準備傳到無人機
// reset = true; //debug // reset = true; //debug

@ -45,7 +45,10 @@ struct MavInitParameter {
enum class systemHandlerState { enum class systemHandlerState {
Init, // 剛剛交給 systemHandler 去處理 Init, // 剛剛交給 systemHandler 去處理
Prologue, // 建立了 mysql row 並取得 serialNo Prologue, // 建立了 mysql row 並取得 serialNo
Transmit, // 正在傳送指令到載具
Ready, // 收到第一筆並放到 telemetryInfo 後 Ready, // 收到第一筆並放到 telemetryInfo 後
Busy, // 載具正在執行上一次指令
Disconnected, // mavsdk 判斷該系統斷線了 Disconnected, // mavsdk 判斷該系統斷線了
Terminate, // 準備要從管理列表中刪除 Terminate, // 準備要從管理列表中刪除
// Void // Void

@ -26,30 +26,60 @@ using std::chrono::seconds;
using std::chrono::milliseconds; using std::chrono::milliseconds;
using std::this_thread::sleep_for; using std::this_thread::sleep_for;
std::map<Telemetry::FlightMode, std::string> flightModeMap = {
{Telemetry::FlightMode::Unknown, "Unknown"},
{Telemetry::FlightMode::Takeoff, "Takeoff"},
{Telemetry::FlightMode::Ready, "Ready"},
{Telemetry::FlightMode::Hold, "Hold"},
{Telemetry::FlightMode::ReturnToLaunch, "Return To Launch"},
{Telemetry::FlightMode::Land, "Land"},
{Telemetry::FlightMode::Offboard, "Offboard"},
{Telemetry::FlightMode::FollowMe, "FollowMe"},
{Telemetry::FlightMode::Manual, "Manual"},
{Telemetry::FlightMode::Altctl, "Altctl"},
{Telemetry::FlightMode::Posctl, "Posctl"},
{Telemetry::FlightMode::Acro, "Acro"},
{Telemetry::FlightMode::Stabilized, "Stabilized"},
{Telemetry::FlightMode::Rattitude, "Rattitude"}
};
#define VEHICLE_CONTROL_ACTIVE
/* /*
* Important multi-threaded functions, * Important multi-threaded functions,
* handling system initialization, receiving messages and sending messages. * handling system initialization, receiving messages and sending messages.
*/ */
void systemHandler(System& system) { void systemHandler(System& system) {
int sysid = static_cast<int>(system.get_system_id());
std::cout << "(systemHandler.cpp:systemHandler) System " << sysid << " get in Thread. (debug)" << std::endl; // debug
// Initialization // Initialization
auto mavlink_passthrough = MavlinkPassthrough{system};
auto telemetry = Telemetry{system}; auto telemetry = Telemetry{system};
auto action = Action{system}; auto action = Action{system};
auto param = Param{system}; auto param = Param{system};
int sysid = static_cast<int>(system.get_system_id());
std::cout << "(systemHandler.cpp:systemHandler) System " << sysid << " get in Thread. (debug)" << std::endl; // debug
// Store telemetry information
std::map<std::string,std::string> telemetryInfo; // Store telemetry information that will pass to main thread.
std::map<std::string,std::string> telemetryInfo;
// 控制指令 已經被主迴圈轉換過一次
std::map<int, std::array<double, 2>> vehicleCommand;
// 這些變數監控 handler 的行為 // 這些變數監控 handler 的行為
gHandlerMask[sysid]["cutoff"] = 0; gHandlerMask[sysid]["cutoff"] = 0;
gHandlerMask[sysid]["is_connected"] = 1; gHandlerMask[sysid]["is_connected"] = 1;
bool reset = false; bool reset = false;
// // 程序執行時會用到的變數
int _counter; int _counter;
mavlink_message_t mav_message;
mavlink_set_position_target_global_int_t set_position_target_global_int;
MavlinkPassthrough::CommandLong mav_command_long;
MavlinkPassthrough::Result result_mavpass;
Action::Result result_action;
// //
std::cout << "Dev Test Start" << std::endl; std::cout << "Dev Test Start" << std::endl;
@ -75,18 +105,46 @@ void systemHandler(System& system) {
const Telemetry::FlightMode mode_result = telemetry.flight_mode(); const Telemetry::FlightMode mode_result = telemetry.flight_mode();
std::cerr << "Vehicle Mode: " << mode_result << '\n'; std::cerr << "Vehicle Mode: " << mode_result << '\n';
// auto mavlink_passthrough = MavlinkPassthrough{system};
// mavlink_command_long_t command; std::cout << " Set Mode Test " << std::endl;
// command.target_system = sysid; sleep_for(milliseconds(1500));
// command.target_component = MAV_COMP_ID_AUTOPILOT1;
// command.command = MAV_CMD_REQUEST_MESSAGE;
// command.param1 = 1; // sleep_for(milliseconds(1500));
// action.set_takeoff_altitude(10);
// std::cout << "ARM...\n";
// action.arm();
// sleep_for(seconds(1));
// std::cout << "Taking off...\n";
// action.takeoff();
// sleep_for(seconds(10));
// std::cout << "GoTo...\n";
// // auto result_ackFromAction = action.goto_location(24.119289235158828, 120.67216137689361,30,180);
// 測試GOTO
// mavlink_message_t message; // mavlink_message_t message;
// MavlinkPassthrough::CommandLong command;
// command.target_sysid = sysid;
// command.target_compid = MAV_COMP_ID_AUTOPILOT1; // 這行指 component id = 1
// command.command = MAV_CMD_DO_REPOSITION;
// command.param1 = 5; // Speed
// command.param2 = 0; // IF change to GUILDED mode ?
// command.param3 = 0; // Radius
// command.param4 = 0; // Yaw
// command.param5 = 24.119289235158828; // Latitude
// command.param6 = 120.67216137689361; // Longitude
// command.param5 = 24.11928923; // Latitude
// command.param6 = 120.67216137; // Longitude
// command.param7 = 25; // Altitude
// mavlink_msg_command_long_encode(mavlink_passthrough.get_our_sysid(), // mavlink_msg_command_long_encode(mavlink_passthrough.get_our_sysid(),
// mavlink_passthrough.get_our_compid(), // mavlink_passthrough.get_our_compid(),
// &message, // &message,
// &command); // &command);
// mavlink_passthrough.send_command_long(command);
// auto result_ackFromSendMessage = mavlink_passthrough.send_message(message); // auto result_ackFromSendMessage = mavlink_passthrough.send_message(message);
// std::cout << " ACK REL: " << result_ackFromSendMessage << std::endl;
// // 演示一下 如何抓到 parameter // // 演示一下 如何抓到 parameter
// auto get_result_i = param.get_param_int("VISO_TYPE"); // This function is blocking. // auto get_result_i = param.get_param_int("VISO_TYPE"); // This function is blocking.
@ -130,7 +188,7 @@ void systemHandler(System& system) {
// std::cout << "Has AutoPilot : " << system.has_autopilot() << std::endl; // debug // std::cout << "Has AutoPilot : " << system.has_autopilot() << std::endl; // debug
// std::cout << "Dev Test End" << std::endl; std::cout << "Dev Test End" << std::endl;
// Put all the subscriber init in this section // Put all the subscriber init in this section
if (system.has_autopilot()) { if (system.has_autopilot()) {
@ -236,6 +294,10 @@ void systemHandler(System& system) {
telemetryInfo["drone_arm"] = "0"; telemetryInfo["drone_arm"] = "0";
} }
}); });
telemetry.subscribe_flight_mode([&system, &telemetryInfo](Telemetry::FlightMode fightMode) {
telemetryInfo["vehicle_mode"] = flightModeMap[fightMode];
});
} }
// Wait Until telemetryInfo get something. and if nothing get from System for 10 sec will cut off this connection. // Wait Until telemetryInfo get something. and if nothing get from System for 10 sec will cut off this connection.
@ -257,10 +319,101 @@ void systemHandler(System& system) {
gTelemetryInfo[sysid] = telemetryInfo; gTelemetryInfo[sysid] = telemetryInfo;
gTeleMtx.unlock(); gTeleMtx.unlock();
// 取得來自主迴圈的指令 並清空
vehicleCommand = gVehicleCommand[sysid];
gComMtx.lock();
gVehicleCommand[sysid].clear();
gComMtx.unlock();
// Handler Command // Handler Command
reset = (gHandlerMask[sysid]["cutoff"] != 0); reset = (gHandlerMask[sysid]["cutoff"] != 0);
// Vehicle Command // Vehicle Command
for ( auto& oneVehicleCommand : vehicleCommand) {
switch (oneVehicleCommand.first) {
// Here deal with the function of Change Mode
case 1 :
std::cout << "(systemHandler.cpp:systemHandler) System " << sysid << " Get Command Change Mode , " \
<< "Para1 : " << std::to_string(oneVehicleCommand.second[0]) \
<< ", Para2 : " << std::to_string(oneVehicleCommand.second[1]) << std::endl; // debug
#ifdef VEHICLE_CONTROL_ACTIVE
mav_command_long.target_sysid = sysid;
mav_command_long.target_compid = MAV_COMP_ID_AUTOPILOT1; // 這行指 component id = 1
mav_command_long.command = 176; // MAV_CMD_DO_SET_MODE
mav_command_long.param1 = 1; // 固定是 1
mav_command_long.param2 = static_cast<int>(oneVehicleCommand.second[0]); // mode
result_mavpass = mavlink_passthrough.send_command_long(mav_command_long); // 送出指令
std::cout << " ACK REL: " << result_mavpass << std::endl; // dev
#endif
break;
// Here deal with the function of Action Arm
case 11 :
std::cout << "(systemHandler.cpp:systemHandler) System " << sysid << " Get Command Arm, " \
<< "Para1 : " << std::to_string(oneVehicleCommand.second[0]) \
<< ", Para2 : " << std::to_string(oneVehicleCommand.second[1]) << std::endl; // debug
#ifdef VEHICLE_CONTROL_ACTIVE
result_action = action.arm();
std::cout << " ACK REL: " << result_action << std::endl; // dev
#endif
break;
// Here deal with the function of Action Takeoff
case 12 :
std::cout << "(systemHandler.cpp:systemHandler) System " << sysid << " Get Command Takeoff, " \
<< "Para1 : " << std::to_string(oneVehicleCommand.second[0]) \
<< ", Para2 : " << std::to_string(oneVehicleCommand.second[1]) << std::endl; // debug
#ifdef VEHICLE_CONTROL_ACTIVE
result_action = action.takeoff();
std::cout << " ACK REL: " << result_action << std::endl; // dev
#endif
break;
// Here deal with the function of change height
case 13 :
std::cout << "(systemHandler.cpp:systemHandler) System " << sysid << " Get Command Change Height, " \
<< "Para1 : " << std::to_string(oneVehicleCommand.second[0]) \
<< ", Para2 : " << std::to_string(oneVehicleCommand.second[1]) << std::endl; // debug
#ifdef VEHICLE_CONTROL_ACTIVE
#endif
break;
// Here deal with the function of GOTO
case 21 :
std::cout << "(systemHandler.cpp:systemHandler) System " << sysid << " Get Command GoTo, " \
<< "Para1 : " << std::to_string(oneVehicleCommand.second[0]) \
<< ", Para2 : " << std::to_string(oneVehicleCommand.second[1]) << std::endl; // debug
#ifdef VEHICLE_CONTROL_ACTIVE
set_position_target_global_int.time_boot_ms = 0;
set_position_target_global_int.target_system = sysid;
set_position_target_global_int.target_component = MAV_COMP_ID_AUTOPILOT1;
set_position_target_global_int.coordinate_frame = MAV_FRAME_GLOBAL_RELATIVE_ALT; // 對於 home 點指定相對高度
set_position_target_global_int.type_mask = 0b110111111000; // Only latitude, longitude and altitude
set_position_target_global_int.lat_int = oneVehicleCommand.second[0] * 1E7; // Latitude in degrees * 1E7
set_position_target_global_int.lon_int = oneVehicleCommand.second[1] * 1E7; // Longitude in degrees * 1E7
set_position_target_global_int.alt = 30; // Altitude in meters
mavlink_msg_set_position_target_global_int_pack(
mavlink_passthrough.get_our_sysid(),
mavlink_passthrough.get_our_compid(),
&mav_message,
set_position_target_global_int.time_boot_ms,
set_position_target_global_int.target_system,
set_position_target_global_int.target_component,
set_position_target_global_int.coordinate_frame,
set_position_target_global_int.type_mask,
set_position_target_global_int.lat_int,
set_position_target_global_int.lon_int,
set_position_target_global_int.alt,
0, 0, 0, 0, 0, 0, 0, 0); // vx, vy, vz, afx, afy, afz, yaw, yaw_rate are all 0
result_mavpass = mavlink_passthrough.send_message(mav_message);
std::cout << " ACK REL: " << result_mavpass << std::endl; // dev
#endif
break;
}
}
// for purpose // for purpose
sleep_for(milliseconds(100)); sleep_for(milliseconds(100));

Loading…
Cancel
Save