1
0

外设_seq.svg 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="1348px" preserveAspectRatio="none" style="width:1444px;height:1348px;background:#FFFFFF;" version="1.1" viewBox="0 0 1444 1348" width="1444px" zoomAndPan="magnify"><defs/><g><rect fill="none" height="29.1201" id="_title" style="stroke:none;stroke-width:1.0;" width="115" x="660.75" y="10"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="105" x="665.75" y="31.0439">外设工作时序图</text><rect fill="#FFFFFF" height="983.0718" style="stroke:#181818;stroke-width:1.0;" width="10" x="783.5" y="315.8638"/><rect fill="#FFFFFF" height="95.2632" style="stroke:#181818;stroke-width:1.0;" width="10" x="985.5" y="347.6182"/><rect fill="#FFFFFF" height="887.8086" style="stroke:#181818;stroke-width:1.0;" width="10" x="1157.5" y="411.127"/><rect fill="none" height="222.3037" style="stroke:#000000;stroke-width:1.5;" width="1191.5" x="37" y="775.1338"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="314" x2="314" y1="82.1201" y2="1307.9355"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="618.5" x2="618.5" y1="82.1201" y2="1307.9355"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="788.5" x2="788.5" y1="82.1201" y2="1307.9355"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="990.5" x2="990.5" y1="82.1201" y2="1307.9355"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1162.5" x2="1162.5" y1="82.1201" y2="1307.9355"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1263.5" x2="1263.5" y1="82.1201" y2="1307.9355"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1404.5" x2="1404.5" y1="82.1201" y2="1307.9355"/><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="67" x="281" y="48"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="53" x="288" y="71.0439">frontend</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="67" x="281" y="1306.9355"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="53" x="288" y="1329.9795">frontend</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="124" x="556.5" y="48"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="110" x="563.5" y="71.0439">router_peripheral</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="124" x="556.5" y="1306.9355"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="110" x="563.5" y="1329.9795">router_peripheral</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="196" x="690.5" y="45.1201"/><ellipse cx="708.5" cy="63.1201" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M707.0781,68.4795 Q705.2188,68.4795 704.125,67.0889 Q703.0313,65.6982 703.0313,62.7139 Q703.0313,60.1826 704.1953,58.5264 Q705.3594,56.8701 707.3438,56.8701 Q708.8125,56.8701 709.2813,56.9951 Q709.75,57.1982 709.75,57.1982 Q709.75,57.1982 709.75,57.1279 Q709.75,57.0576 710.3594,56.1357 L711.4063,59.792 L710.0781,60.1982 Q709.6094,58.6514 708.9453,57.9873 Q708.2813,57.3232 707.2188,57.3232 Q706.8281,57.3232 706.0625,58.8545 Q705.2969,60.3857 705.2969,62.6357 Q705.2969,65.1045 705.9609,66.4951 Q706.625,67.8857 707.1563,67.8857 Q708.2188,67.8857 708.9766,67.1201 Q709.7344,66.3545 710.0781,64.6982 L711.4063,65.292 Q711.0781,66.6982 710.1797,67.5889 Q709.2813,68.4795 707.0781,68.4795 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="154" x="725.5" y="68.1641">PeripheralHandManager</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="196" x="690.5" y="1306.9355"/><ellipse cx="708.5" cy="1324.9355" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M707.0781,1330.2949 Q705.2188,1330.2949 704.125,1328.9043 Q703.0313,1327.5137 703.0313,1324.5293 Q703.0313,1321.998 704.1953,1320.3418 Q705.3594,1318.6855 707.3438,1318.6855 Q708.8125,1318.6855 709.2813,1318.8105 Q709.75,1319.0137 709.75,1319.0137 Q709.75,1319.0137 709.75,1318.9434 Q709.75,1318.873 710.3594,1317.9512 L711.4063,1321.6074 L710.0781,1322.0137 Q709.6094,1320.4668 708.9453,1319.8027 Q708.2813,1319.1387 707.2188,1319.1387 Q706.8281,1319.1387 706.0625,1320.6699 Q705.2969,1322.2012 705.2969,1324.4512 Q705.2969,1326.9199 705.9609,1328.3105 Q706.625,1329.7012 707.1563,1329.7012 Q708.2188,1329.7012 708.9766,1328.9355 Q709.7344,1328.1699 710.0781,1326.5137 L711.4063,1327.1074 Q711.0781,1328.5137 710.1797,1329.4043 Q709.2813,1330.2949 707.0781,1330.2949 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="154" x="725.5" y="1329.9795">PeripheralHandManager</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="188" x="896.5" y="45.1201"/><ellipse cx="914.5" cy="63.1201" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M913.0781,68.4795 Q911.2188,68.4795 910.125,67.0889 Q909.0313,65.6982 909.0313,62.7139 Q909.0313,60.1826 910.1953,58.5264 Q911.3594,56.8701 913.3438,56.8701 Q914.8125,56.8701 915.2813,56.9951 Q915.75,57.1982 915.75,57.1982 Q915.75,57.1982 915.75,57.1279 Q915.75,57.0576 916.3594,56.1357 L917.4063,59.792 L916.0781,60.1982 Q915.6094,58.6514 914.9453,57.9873 Q914.2813,57.3232 913.2188,57.3232 Q912.8281,57.3232 912.0625,58.8545 Q911.2969,60.3857 911.2969,62.6357 Q911.2969,65.1045 911.9609,66.4951 Q912.625,67.8857 913.1563,67.8857 Q914.2188,67.8857 914.9766,67.1201 Q915.7344,66.3545 916.0781,64.6982 L917.4063,65.292 Q917.0781,66.6982 916.1797,67.5889 Q915.2813,68.4795 913.0781,68.4795 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="146" x="931.5" y="68.1641">PeripheralHandFactory</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="188" x="896.5" y="1306.9355"/><ellipse cx="914.5" cy="1324.9355" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M913.0781,1330.2949 Q911.2188,1330.2949 910.125,1328.9043 Q909.0313,1327.5137 909.0313,1324.5293 Q909.0313,1321.998 910.1953,1320.3418 Q911.3594,1318.6855 913.3438,1318.6855 Q914.8125,1318.6855 915.2813,1318.8105 Q915.75,1319.0137 915.75,1319.0137 Q915.75,1319.0137 915.75,1318.9434 Q915.75,1318.873 916.3594,1317.9512 L917.4063,1321.6074 L916.0781,1322.0137 Q915.6094,1320.4668 914.9453,1319.8027 Q914.2813,1319.1387 913.2188,1319.1387 Q912.8281,1319.1387 912.0625,1320.6699 Q911.2969,1322.2012 911.2969,1324.4512 Q911.2969,1326.9199 911.9609,1328.3105 Q912.625,1329.7012 913.1563,1329.7012 Q914.2188,1329.7012 914.9766,1328.9355 Q915.7344,1328.1699 916.0781,1326.5137 L917.4063,1327.1074 Q917.0781,1328.5137 916.1797,1329.4043 Q915.2813,1330.2949 913.0781,1330.2949 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="146" x="931.5" y="1329.9795">PeripheralHandFactory</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="112" x="1106.5" y="45.1201"/><ellipse cx="1124.5" cy="63.1201" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M1123.0781,68.4795 Q1121.2188,68.4795 1120.125,67.0889 Q1119.0313,65.6982 1119.0313,62.7139 Q1119.0313,60.1826 1120.1953,58.5264 Q1121.3594,56.8701 1123.3438,56.8701 Q1124.8125,56.8701 1125.2813,56.9951 Q1125.75,57.1982 1125.75,57.1982 Q1125.75,57.1982 1125.75,57.1279 Q1125.75,57.0576 1126.3594,56.1357 L1127.4063,59.792 L1126.0781,60.1982 Q1125.6094,58.6514 1124.9453,57.9873 Q1124.2813,57.3232 1123.2188,57.3232 Q1122.8281,57.3232 1122.0625,58.8545 Q1121.2969,60.3857 1121.2969,62.6357 Q1121.2969,65.1045 1121.9609,66.4951 Q1122.625,67.8857 1123.1563,67.8857 Q1124.2188,67.8857 1124.9766,67.1201 Q1125.7344,66.3545 1126.0781,64.6982 L1127.4063,65.292 Q1127.0781,66.6982 1126.1797,67.5889 Q1125.2813,68.4795 1123.0781,68.4795 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="1141.5" y="68.1641">具体外设类</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="112" x="1106.5" y="1306.9355"/><ellipse cx="1124.5" cy="1324.9355" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M1123.0781,1330.2949 Q1121.2188,1330.2949 1120.125,1328.9043 Q1119.0313,1327.5137 1119.0313,1324.5293 Q1119.0313,1321.998 1120.1953,1320.3418 Q1121.3594,1318.6855 1123.3438,1318.6855 Q1124.8125,1318.6855 1125.2813,1318.8105 Q1125.75,1319.0137 1125.75,1319.0137 Q1125.75,1319.0137 1125.75,1318.9434 Q1125.75,1318.873 1126.3594,1317.9512 L1127.4063,1321.6074 L1126.0781,1322.0137 Q1125.6094,1320.4668 1124.9453,1319.8027 Q1124.2813,1319.1387 1123.2188,1319.1387 Q1122.8281,1319.1387 1122.0625,1320.6699 Q1121.2969,1322.2012 1121.2969,1324.4512 Q1121.2969,1326.9199 1121.9609,1328.3105 Q1122.625,1329.7012 1123.1563,1329.7012 Q1124.2188,1329.7012 1124.9766,1328.9355 Q1125.7344,1328.1699 1126.0781,1326.5137 L1127.4063,1327.1074 Q1127.0781,1328.5137 1126.1797,1329.4043 Q1125.2813,1330.2949 1123.0781,1330.2949 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="1141.5" y="1329.9795">具体外设类</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="70" x="1228.5" y="48"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="56" x="1235.5" y="71.0439">webapps</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="70" x="1228.5" y="1306.9355"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="56" x="1235.5" y="1329.9795">webapps</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="56" x="1376.5" y="48"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="42" x="1383.5" y="71.0439">数据库</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="56" x="1376.5" y="1306.9355"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="42" x="1383.5" y="1329.9795">数据库</text><rect fill="#FFFFFF" height="983.0718" style="stroke:#181818;stroke-width:1.0;" width="10" x="783.5" y="315.8638"/><rect fill="#FFFFFF" height="95.2632" style="stroke:#181818;stroke-width:1.0;" width="10" x="985.5" y="347.6182"/><rect fill="#FFFFFF" height="887.8086" style="stroke:#181818;stroke-width:1.0;" width="10" x="1157.5" y="411.127"/><path d="M1103,97.1201 L1103,124.1201 L1221,124.1201 L1221,107.1201 L1211,97.1201 L1103,97.1201 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1211,97.1201 L1211,107.1201 L1221,107.1201 L1211,97.1201 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="97" x="1109" y="117.0181">如 RuishouClient</text><path d="M1169,134.8745 L1169,179.8745 L1357,179.8745 L1357,144.8745 L1347,134.8745 L1169,134.8745 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1347,134.8745 L1347,144.8745 L1357,144.8745 L1347,134.8745 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="167" x="1175" y="154.7725">webapps/trains/router_trains:</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="68" x="1175" y="172.5269">create_train</text><rect fill="#EEEEEE" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="1437.5" x="0" y="209.9919"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1437.5" y1="209.9919" y2="209.9919"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1437.5" y1="212.9919" y2="212.9919"/><rect fill="#EEEEEE" height="31.2173" style="stroke:#000000;stroke-width:2.0;" width="104" x="666.75" y="195.3833"/><text fill="#000000" font-family="sans-serif" font-size="17" font-weight="bold" lengthAdjust="spacing" textLength="90" x="672.75" y="218.8652">外设初始化</text><polygon fill="#181818" points="606.5,268.2322,616.5,272.2322,606.5,276.2322,610.5,272.2322" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="314.5" x2="612.5" y1="272.2322" y2="272.2322"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="242" x="321.5" y="267.3757">fetch: xxx/peripheral/hand/init (hand_init())</text><path d="M41,241.6006 L41,286.6006 L309,286.6006 L309,251.6006 L299,241.6006 L41,241.6006 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M299,241.6006 L299,251.6006 L309,251.6006 L299,241.6006 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="247" x="47" y="261.4985">新建训练页面:选择设备点击初始化机械手</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="169" x="47" y="279.2529">(部分设备要额外选择参数)</text><polygon fill="#181818" points="771.5,311.8638,781.5,315.8638,771.5,319.8638,775.5,315.8638" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="618.5" x2="777.5" y1="315.8638" y2="315.8638"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="89" x="625.5" y="311.0073">初始化manager</text><polygon fill="#181818" points="973.5,343.6182,983.5,347.6182,973.5,351.6182,977.5,347.6182" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="793.5" x2="979.5" y1="347.6182" y2="347.6182"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="78" x="800.5" y="342.7617">初始化factory</text><polygon fill="#181818" points="973.5,375.3726,983.5,379.3726,973.5,383.3726,977.5,379.3726" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="793.5" x2="979.5" y1="379.3726" y2="379.3726"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="82" x="800.5" y="374.5161">create_client()</text><polygon fill="#181818" points="1145.5,407.127,1155.5,411.127,1145.5,415.127,1149.5,411.127" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="995.5" x2="1151.5" y1="411.127" y2="411.127"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="143" x="1002.5" y="406.2705">初始化具体外设类(client)</text><polygon fill="#181818" points="804.5,438.8813,794.5,442.8813,804.5,446.8813,800.5,442.8813" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="798.5" x2="989.5" y1="442.8813" y2="442.8813"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="31" x="810.5" y="438.0249">client</text><polygon fill="#181818" points="771.5,470.6357,781.5,474.6357,771.5,478.6357,775.5,474.6357" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="618.5" x2="777.5" y1="474.6357" y2="474.6357"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="25" x="625.5" y="469.7793">init()</text><polygon fill="#181818" points="1145.5,502.3901,1155.5,506.3901,1145.5,510.3901,1149.5,506.3901" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="793.5" x2="1151.5" y1="506.3901" y2="506.3901"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="25" x="800.5" y="501.5337">init()</text><polygon fill="#181818" points="804.5,534.1445,794.5,538.1445,804.5,542.1445,800.5,538.1445" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="798.5" x2="1156.5" y1="538.1445" y2="538.1445"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="810.5" y="533.2881">连接状态</text><polygon fill="#181818" points="629.5,565.8989,619.5,569.8989,629.5,573.8989,625.5,569.8989" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="623.5" x2="782.5" y1="569.8989" y2="569.8989"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="635.5" y="565.0425">连接状态</text><polygon fill="#181818" points="325.5,600.6533,315.5,604.6533,325.5,608.6533,321.5,604.6533" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="319.5" x2="617.5" y1="604.6533" y2="604.6533"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="331.5" y="599.7969">连接状态</text><path d="M119,582.8989 L119,609.8989 L309,609.8989 L309,592.8989 L299,582.8989 L119,582.8989 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M299,582.8989 L299,592.8989 L309,592.8989 L299,582.8989 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="169" x="125" y="602.7969">显示连接状态,按钮设置可用</text><rect fill="#EEEEEE" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="1437.5" x="0" y="640.262"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1437.5" y1="640.262" y2="640.262"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1437.5" y1="643.262" y2="643.262"/><rect fill="#EEEEEE" height="31.2173" style="stroke:#000000;stroke-width:2.0;" width="158" x="639.75" y="625.6533"/><text fill="#000000" font-family="sans-serif" font-size="17" font-weight="bold" lengthAdjust="spacing" textLength="144" x="645.75" y="649.1353">外设设备状态更新</text><polygon fill="#181818" points="1251.5,689.625,1261.5,693.625,1251.5,697.625,1255.5,693.625" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="314.5" x2="1257.5" y1="693.625" y2="693.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="141" x="321.5" y="688.7686">form请求post: xxx/trains</text><path d="M5,671.8706 L5,698.8706 L310,698.8706 L310,681.8706 L300,671.8706 L5,671.8706 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M300,671.8706 L300,681.8706 L310,681.8706 L300,671.8706 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="284" x="11" y="691.7686">点击创建训练 (TODO: 选中外设且未连接可提示?)</text><polygon fill="#181818" points="1392.5,724.3794,1402.5,728.3794,1392.5,732.3794,1396.5,728.3794" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="1263.5" x2="1398.5" y1="728.3794" y2="728.3794"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="117" x="1270.5" y="723.5229">为选中设备新增数据</text><polygon fill="#181818" points="325.5,756.1338,315.5,760.1338,325.5,764.1338,321.5,760.1338" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="319.5" x2="1262.5" y1="760.1338" y2="760.1338"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="104" x="331.5" y="755.2773">跳转至准备训练页</text><path d="M37,775.1338 L110,775.1338 L110,784.8882 L100,794.8882 L37,794.8882 L37,775.1338 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="222.3037" style="stroke:#000000;stroke-width:1.5;" width="1191.5" x="37" y="775.1338"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="28" x="52" y="791.0317">loop</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="123" x="125" y="789.7397">[设备状态监听, 1s一次]</text><polygon fill="#181818" points="606.5,817.6655,616.5,821.6655,606.5,825.6655,610.5,821.6655" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="314.5" x2="612.5" y1="821.6655" y2="821.6655"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="280" x="321.5" y="816.8091">fetch: xxx/peripheral/hand/status (hand_status())</text><path d="M210,799.9111 L210,826.9111 L309,826.9111 L309,809.9111 L299,799.9111 L210,799.9111 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M299,799.9111 L299,809.9111 L309,809.9111 L299,799.9111 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="78" x="216" y="819.8091">获取设备状态</text><polygon fill="#181818" points="771.5,852.4199,781.5,856.4199,771.5,860.4199,775.5,856.4199" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="618.5" x2="777.5" y1="856.4199" y2="856.4199"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="44" x="625.5" y="851.5635">status()</text><polygon fill="#181818" points="1145.5,884.1743,1155.5,888.1743,1145.5,892.1743,1149.5,888.1743" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="793.5" x2="1151.5" y1="888.1743" y2="888.1743"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="44" x="800.5" y="883.3179">status()</text><polygon fill="#181818" points="804.5,915.9287,794.5,919.9287,804.5,923.9287,800.5,919.9287" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="798.5" x2="1156.5" y1="919.9287" y2="919.9287"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="810.5" y="915.0723">连接状态</text><polygon fill="#181818" points="629.5,947.6831,619.5,951.6831,629.5,955.6831,625.5,951.6831" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="623.5" x2="782.5" y1="951.6831" y2="951.6831"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="635.5" y="946.8267">连接状态</text><polygon fill="#181818" points="325.5,982.4375,315.5,986.4375,325.5,990.4375,321.5,986.4375" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="319.5" x2="617.5" y1="986.4375" y2="986.4375"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="331.5" y="981.5811">连接状态</text><path d="M47,964.6831 L47,991.6831 L309,991.6831 L309,974.6831 L299,964.6831 L47,964.6831 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M299,964.6831 L299,974.6831 L309,974.6831 L299,964.6831 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="241" x="53" y="984.5811">更新连接状态指示灯(TODO: 断开时弹窗?)</text><rect fill="#EEEEEE" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="1437.5" x="0" y="1029.0461"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1437.5" y1="1029.0461" y2="1029.0461"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1437.5" y1="1032.0461" y2="1032.0461"/><rect fill="#EEEEEE" height="31.2173" style="stroke:#000000;stroke-width:2.0;" width="122" x="657.75" y="1014.4375"/><text fill="#000000" font-family="sans-serif" font-size="17" font-weight="bold" lengthAdjust="spacing" textLength="108" x="663.75" y="1037.9194">外设触发反馈</text><polygon fill="#181818" points="606.5,1078.4092,616.5,1082.4092,606.5,1086.4092,610.5,1082.4092" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="314.5" x2="612.5" y1="1082.4092" y2="1082.4092"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="260" x="321.5" y="1077.5527">fetch: xxx/peripheral/hand/start (hand_start())</text><path d="M171,1060.6548 L171,1087.6548 L309,1087.6548 L309,1070.6548 L299,1060.6548 L171,1060.6548 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M299,1060.6548 L299,1070.6548 L309,1070.6548 L299,1060.6548 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="117" x="177" y="1080.5527">用户被判定想象成功</text><polygon fill="#181818" points="1392.5,1113.1636,1402.5,1117.1636,1392.5,1121.1636,1396.5,1117.1636" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="618.5" x2="1398.5" y1="1117.1636" y2="1117.1636"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="104" x="625.5" y="1112.3071">读取对应设备参数</text><polygon fill="#181818" points="629.5,1127.1636,619.5,1131.1636,629.5,1135.1636,625.5,1131.1636" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="623.5" x2="1403.5" y1="1131.1636" y2="1131.1636"/><polygon fill="#181818" points="771.5,1158.918,781.5,1162.918,771.5,1166.918,775.5,1162.918" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="618.5" x2="777.5" y1="1162.918" y2="1162.918"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="34" x="625.5" y="1158.0615">start()</text><polygon fill="#181818" points="1145.5,1190.6724,1155.5,1194.6724,1145.5,1198.6724,1149.5,1194.6724" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="793.5" x2="1151.5" y1="1194.6724" y2="1194.6724"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="34" x="800.5" y="1189.8159">start()</text><polygon fill="#181818" points="804.5,1222.4268,794.5,1226.4268,804.5,1230.4268,800.5,1226.4268" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="798.5" x2="1156.5" y1="1226.4268" y2="1226.4268"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="810.5" y="1221.5703">设备反馈</text><polygon fill="#181818" points="629.5,1254.1812,619.5,1258.1812,629.5,1262.1812,625.5,1258.1812" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="623.5" x2="782.5" y1="1258.1812" y2="1258.1812"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="635.5" y="1253.3247">设备反馈</text><polygon fill="#181818" points="325.5,1285.9355,315.5,1289.9355,325.5,1293.9355,321.5,1289.9355" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="319.5" x2="617.5" y1="1289.9355" y2="1289.9355"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="331.5" y="1285.0791">设备反馈</text><!--MD5=[b71ce746287e5a45c91a7068e96f5f96]
  2. @startuml
  3. title 外设工作时序图
  4. hide unlinked
  5. participant frontend
  6. participant router_peripheral
  7. participant PeripheralHandManager << (C,#ADD1B2) >>
  8. participant PeripheralHandFactory << (C,#ADD1B2) >>
  9. participant 具体外设类 << (C,#ADD1B2) >>
  10. participant webapps
  11. participant 数据库
  12. note over 具体外设类: 如 RuishouClient
  13. note over webapps: webapps/trains/router_trains:\ncreate_train
  14. === 外设初始化 ==
  15. frontend -> router_peripheral: fetch: xxx/peripheral/hand/init (hand_init())
  16. note left: 新建训练页面:选择设备点击初始化机械手\n(部分设备要额外选择参数)
  17. router_peripheral -> PeripheralHandManager: 初始化manager
  18. activate PeripheralHandManager
  19. PeripheralHandManager -> PeripheralHandFactory: 初始化factory
  20. activate PeripheralHandFactory
  21. PeripheralHandManager -> PeripheralHandFactory: create_client()
  22. PeripheralHandFactory -> 具体外设类: 初始化具体外设类(client)
  23. activate 具体外设类
  24. PeripheralHandFactory - -> PeripheralHandManager: client
  25. deactivate PeripheralHandFactory
  26. router_peripheral -> PeripheralHandManager: init()
  27. PeripheralHandManager -> 具体外设类: init()
  28. 具体外设类 - -> PeripheralHandManager: 连接状态
  29. PeripheralHandManager - -> router_peripheral: 连接状态
  30. router_peripheral - -> frontend: 连接状态
  31. note left: 显示连接状态,按钮设置可用
  32. === 外设设备状态更新 ==
  33. frontend -> webapps: form请求post: xxx/trains
  34. note left: 点击创建训练 (TODO: 选中外设且未连接可提示?)
  35. webapps -> 数据库: 为选中设备新增数据
  36. webapps - -> frontend: 跳转至准备训练页
  37. loop 设备状态监听, 1s一次
  38. frontend -> router_peripheral: fetch: xxx/peripheral/hand/status (hand_status())
  39. note left: 获取设备状态
  40. router_peripheral -> PeripheralHandManager: status()
  41. PeripheralHandManager -> 具体外设类: status()
  42. 具体外设类 - -> PeripheralHandManager: 连接状态
  43. PeripheralHandManager - -> router_peripheral: 连接状态
  44. router_peripheral - -> frontend: 连接状态
  45. note left: 更新连接状态指示灯(TODO: 断开时弹窗?)
  46. end
  47. === 外设触发反馈 ==
  48. frontend -> router_peripheral: fetch: xxx/peripheral/hand/start (hand_start())
  49. note left: 用户被判定想象成功
  50. router_peripheral -> 数据库: 读取对应设备参数
  51. 数据库 - -> router_peripheral :
  52. router_peripheral -> PeripheralHandManager: start()
  53. PeripheralHandManager -> 具体外设类: start()
  54. 具体外设类 - -> PeripheralHandManager: 设备反馈
  55. PeripheralHandManager - -> router_peripheral: 设备反馈
  56. router_peripheral - -> frontend: 设备反馈
  57. @enduml
  58. PlantUML version 1.2022.7(Tue Aug 23 01:01:30 CST 2022)
  59. (GPL source distribution)
  60. Java Runtime: Java(TM) SE Runtime Environment
  61. JVM: Java HotSpot(TM) 64-Bit Server VM
  62. Default Encoding: GBK
  63. Language: zh
  64. Country: CN
  65. --></g></svg>