增加了相关文档说明
This commit is contained in:
93
docs/绘图/.$软件架构.drawio.bkp
Normal file
93
docs/绘图/.$软件架构.drawio.bkp
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mxfile host="app.diagrams.net" modified="2026-05-10T00:00:00.000Z"
|
||||
agent="AI-Drawio-Replicator" version="24.0.0" type="device">
|
||||
<diagram id="page-1" name="传感器OPS架构">
|
||||
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10"
|
||||
guides="1" tooltips="1" connect="1" arrows="1"
|
||||
fold="1" page="1" pageScale="1"
|
||||
pageWidth="1169" pageHeight="827"
|
||||
background="#ffffff">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
|
||||
<!-- 调用者/上层 -->
|
||||
<mxCell id="2" value="<div style="display:flex;align-items:center;justify-content:center;gap:20px;font-size:24px;font-weight:bold;"><div style="font-size:48px;color:#2b579a;">👤</div><div>调用者 / 上层<br><span style="font-size:18px;font-weight:normal;">(只认识 sensor_ops)</span></div></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f7ff;strokeColor=#2b579a;strokeWidth=2;fontSize=14;" vertex="1" parent="1">
|
||||
<mxGeometry x="220" y="50" width="620" height="120" as="geometry"/>
|
||||
</mxCell>
|
||||
|
||||
<!-- OPS句柄 -->
|
||||
<mxCell id="3" value="<div style="display:flex;align-items:center;justify-content:center;gap:20px;font-size:28px;font-weight:bold;"><div style="font-size:48px;color:#2385bb;">🏷️</div><div>ops 句柄<br><span style="font-size:22px;font-weight:normal;font-family:monospace;">{ init, read, close }</span></div></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f9f9;strokeColor=#2385bb;strokeWidth=3;fontSize=14;" vertex="1" parent="1">
|
||||
<mxGeometry x="270" y="300" width="520" height="120" as="geometry"/>
|
||||
</mxCell>
|
||||
|
||||
<!-- 温度传感器 -->
|
||||
<mxCell id="4" value="<div style="display:flex;align-items:center;justify-content:center;gap:15px;font-size:22px;font-weight:bold;"><div style="font-size:48px;color:#2b579a;">🌡️</div><div>温度传感器<br><span style="font-size:18px;font-weight:normal;font-family:monospace;">temp_read()</span></div></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f7ff;strokeColor=#2b579a;strokeWidth=2;fontSize=14;" vertex="1" parent="1">
|
||||
<mxGeometry x="100" y="580" width="350" height="100" as="geometry"/>
|
||||
</mxCell>
|
||||
|
||||
<!-- 加速度传感器 -->
|
||||
<mxCell id="5" value="<div style="display:flex;align-items:center;justify-content:center;gap:15px;font-size:22px;font-weight:bold;"><div style="font-size:48px;color:#2b579a;">🔲</div><div>加速度传感器<br><span style="font-size:18px;font-weight:normal;font-family:monospace;">accel_read()</span></div></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0f7ff;strokeColor=#2b579a;strokeWidth=2;fontSize=14;" vertex="1" parent="1">
|
||||
<mxGeometry x="610" y="580" width="350" height="100" as="geometry"/>
|
||||
</mxCell>
|
||||
|
||||
<!-- 接口边界标注 -->
|
||||
<mxCell id="6" value="<div style="font-size:20px;color:#2b579a;font-weight:bold;">接口边界</div>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="880" y="350" width="120" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
|
||||
<!-- 虚线箭头 -->
|
||||
<mxCell id="7" value="" style="endArrow=block;html=1;strokeColor=#2b579a;strokeWidth=2;dashed=1;dashPattern=4 4;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="790" y="360" as="sourcePoint"/>
|
||||
<mxPoint x="870" y="360" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
|
||||
<!-- 连线1:上层到OPS句柄 -->
|
||||
<mxCell id="8" value="<div style="font-size:20px;font-family:monospace;">ops->read(ctx, &v)</div>" style="endArrow=classic;html=1;strokeColor=#1a365d;strokeWidth=3;labelPosition=top;verticalAlign=bottom;labelBackgroundColor=#ffffff;" edge="1" parent="1" source="2" target="3">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="530" y="170" as="sourcePoint"/>
|
||||
<mxPoint x="530" y="300" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
|
||||
<!-- 连线2:OPS句柄到分支点 -->
|
||||
<mxCell id="9" value="" style="html=1;strokeColor=#1a365d;strokeWidth=3;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="530" y="420" as="sourcePoint"/>
|
||||
<mxPoint x="530" y="500" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
|
||||
<!-- 分支点 -->
|
||||
<mxCell id="10" value="" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1a365d;strokeColor=#1a365d;strokeWidth=2;" vertex="1" parent="1">
|
||||
<mxGeometry x="520" y="495" width="20" height="20" as="geometry"/>
|
||||
</mxCell>
|
||||
|
||||
<!-- 连线3:分支点到温度传感器 -->
|
||||
<mxCell id="11" value="" style="endArrow=classic;html=1;strokeColor=#1a365d;strokeWidth=3;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="530" y="505" as="sourcePoint"/>
|
||||
<mxPoint x="275" y="505" as="targetPoint"/>
|
||||
<mxPoint x="275" y="580" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
|
||||
<!-- 连线4:分支点到加速度传感器 -->
|
||||
<mxCell id="12" value="" style="endArrow=classic;html=1;strokeColor=#1a365d;strokeWidth=3;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="530" y="505" as="sourcePoint"/>
|
||||
<mxPoint x="785" y="505" as="targetPoint"/>
|
||||
<mxPoint x="785" y="580" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
|
||||
<!-- 连线标注:函数指针实际指向 -->
|
||||
<mxCell id="13" value="<div style="font-size:18px;">函数指针实际指向</div>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=#ffffff;" vertex="1" parent="1">
|
||||
<mxGeometry x="580" y="460" width="200" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
Reference in New Issue
Block a user