外设_ruishou_seq.svg 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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="1625px" preserveAspectRatio="none" style="width:787px;height:1625px;background:#FFFFFF;" version="1.1" viewBox="0 0 787 1625" width="787px" zoomAndPan="magnify"><defs/><g><rect fill="none" height="29.1201" id="_title" style="stroke:none;stroke-width:1.0;" width="115" x="337.5" y="10"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="105" x="342.5" y="31.0439">睿手工作时序图</text><rect fill="#FFFFFF" height="1459.2446" style="stroke:#181818;stroke-width:1.0;" width="10" x="286" y="115.8745"/><rect fill="#FFFFFF" height="1427.4902" style="stroke:#181818;stroke-width:1.0;" width="10" x="441" y="147.6289"/><rect fill="#FFFFFF" height="1395.7358" style="stroke:#181818;stroke-width:1.0;" width="10" x="657" y="179.3833"/><rect fill="none" height="533.6304" style="stroke:#000000;stroke-width:1.5;" width="771" x="10" y="194.3833"/><rect fill="none" height="237.5952" style="stroke:#000000;stroke-width:1.5;" width="425" x="346" y="483.4185"/><rect fill="none" height="126.3091" style="stroke:#000000;stroke-width:1.5;" width="239" x="356" y="587.7046"/><rect fill="none" height="111.2632" style="stroke:#000000;stroke-width:1.5;" width="526" x="10" y="742.0137"/><rect fill="none" height="256.0352" style="stroke:#000000;stroke-width:1.5;" width="761" x="10" y="867.2769"/><rect fill="none" height="256.0352" style="stroke:#000000;stroke-width:1.5;" width="761" x="10" y="1137.312"/><rect fill="none" height="159.772" style="stroke:#000000;stroke-width:1.5;" width="761" x="10" y="1407.3472"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="118" x2="118" y1="82.1201" y2="1584.1191"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="291" x2="291" y1="82.1201" y2="1584.1191"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="446" x2="446" y1="82.1201" y2="1584.1191"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="662" x2="662" y1="82.1201" y2="1584.1191"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="740" x2="740" y1="82.1201" y2="1584.1191"/><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="196" x="20" y="45.1201"/><ellipse cx="38" cy="63.1201" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M36.5781,68.4795 Q34.7188,68.4795 33.625,67.0889 Q32.5313,65.6982 32.5313,62.7139 Q32.5313,60.1826 33.6953,58.5264 Q34.8594,56.8701 36.8438,56.8701 Q38.3125,56.8701 38.7813,56.9951 Q39.25,57.1982 39.25,57.1982 Q39.25,57.1982 39.25,57.1279 Q39.25,57.0576 39.8594,56.1357 L40.9063,59.792 L39.5781,60.1982 Q39.1094,58.6514 38.4453,57.9873 Q37.7813,57.3232 36.7188,57.3232 Q36.3281,57.3232 35.5625,58.8545 Q34.7969,60.3857 34.7969,62.6357 Q34.7969,65.1045 35.4609,66.4951 Q36.125,67.8857 36.6563,67.8857 Q37.7188,67.8857 38.4766,67.1201 Q39.2344,66.3545 39.5781,64.6982 L40.9063,65.292 Q40.5781,66.6982 39.6797,67.5889 Q38.7813,68.4795 36.5781,68.4795 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="154" x="55" 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="20" y="1583.1191"/><ellipse cx="38" cy="1601.1191" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M36.5781,1606.4785 Q34.7188,1606.4785 33.625,1605.0879 Q32.5313,1603.6973 32.5313,1600.7129 Q32.5313,1598.1816 33.6953,1596.5254 Q34.8594,1594.8691 36.8438,1594.8691 Q38.3125,1594.8691 38.7813,1594.9941 Q39.25,1595.1973 39.25,1595.1973 Q39.25,1595.1973 39.25,1595.127 Q39.25,1595.0566 39.8594,1594.1348 L40.9063,1597.791 L39.5781,1598.1973 Q39.1094,1596.6504 38.4453,1595.9863 Q37.7813,1595.3223 36.7188,1595.3223 Q36.3281,1595.3223 35.5625,1596.8535 Q34.7969,1598.3848 34.7969,1600.6348 Q34.7969,1603.1035 35.4609,1604.4941 Q36.125,1605.8848 36.6563,1605.8848 Q37.7188,1605.8848 38.4766,1605.1191 Q39.2344,1604.3535 39.5781,1602.6973 L40.9063,1603.291 Q40.5781,1604.6973 39.6797,1605.5879 Q38.7813,1606.4785 36.5781,1606.4785 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="154" x="55" y="1606.1631">PeripheralHandManager</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="130" x="226" y="45.1201"/><ellipse cx="244" cy="63.1201" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M242.5781,68.4795 Q240.7188,68.4795 239.625,67.0889 Q238.5313,65.6982 238.5313,62.7139 Q238.5313,60.1826 239.6953,58.5264 Q240.8594,56.8701 242.8438,56.8701 Q244.3125,56.8701 244.7813,56.9951 Q245.25,57.1982 245.25,57.1982 Q245.25,57.1982 245.25,57.1279 Q245.25,57.0576 245.8594,56.1357 L246.9063,59.792 L245.5781,60.1982 Q245.1094,58.6514 244.4453,57.9873 Q243.7813,57.3232 242.7188,57.3232 Q242.3281,57.3232 241.5625,58.8545 Q240.7969,60.3857 240.7969,62.6357 Q240.7969,65.1045 241.4609,66.4951 Q242.125,67.8857 242.6563,67.8857 Q243.7188,67.8857 244.4766,67.1201 Q245.2344,66.3545 245.5781,64.6982 L246.9063,65.292 Q246.5781,66.6982 245.6797,67.5889 Q244.7813,68.4795 242.5781,68.4795 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="88" x="261" y="68.1641">RuishouClient</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="130" x="226" y="1583.1191"/><ellipse cx="244" cy="1601.1191" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M242.5781,1606.4785 Q240.7188,1606.4785 239.625,1605.0879 Q238.5313,1603.6973 238.5313,1600.7129 Q238.5313,1598.1816 239.6953,1596.5254 Q240.8594,1594.8691 242.8438,1594.8691 Q244.3125,1594.8691 244.7813,1594.9941 Q245.25,1595.1973 245.25,1595.1973 Q245.25,1595.1973 245.25,1595.127 Q245.25,1595.0566 245.8594,1594.1348 L246.9063,1597.791 L245.5781,1598.1973 Q245.1094,1596.6504 244.4453,1595.9863 Q243.7813,1595.3223 242.7188,1595.3223 Q242.3281,1595.3223 241.5625,1596.8535 Q240.7969,1598.3848 240.7969,1600.6348 Q240.7969,1603.1035 241.4609,1604.4941 Q242.125,1605.8848 242.6563,1605.8848 Q243.7188,1605.8848 244.4766,1605.1191 Q245.2344,1604.3535 245.5781,1602.6973 L246.9063,1603.291 Q246.5781,1604.6973 245.6797,1605.5879 Q244.7813,1606.4785 242.5781,1606.4785 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="88" x="261" y="1606.1631">RuishouClient</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="160" x="366" y="45.1201"/><ellipse cx="384" cy="63.1201" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M382.5781,68.4795 Q380.7188,68.4795 379.625,67.0889 Q378.5313,65.6982 378.5313,62.7139 Q378.5313,60.1826 379.6953,58.5264 Q380.8594,56.8701 382.8438,56.8701 Q384.3125,56.8701 384.7813,56.9951 Q385.25,57.1982 385.25,57.1982 Q385.25,57.1982 385.25,57.1279 Q385.25,57.0576 385.8594,56.1357 L386.9063,59.792 L385.5781,60.1982 Q385.1094,58.6514 384.4453,57.9873 Q383.7813,57.3232 382.7188,57.3232 Q382.3281,57.3232 381.5625,58.8545 Q380.7969,60.3857 380.7969,62.6357 Q380.7969,65.1045 381.4609,66.4951 Q382.125,67.8857 382.6563,67.8857 Q383.7188,67.8857 384.4766,67.1201 Q385.2344,66.3545 385.5781,64.6982 L386.9063,65.292 Q386.5781,66.6982 385.6797,67.5889 Q384.7813,68.4795 382.5781,68.4795 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="118" x="401" y="68.1641">RuishouConnector</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="160" x="366" y="1583.1191"/><ellipse cx="384" cy="1601.1191" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M382.5781,1606.4785 Q380.7188,1606.4785 379.625,1605.0879 Q378.5313,1603.6973 378.5313,1600.7129 Q378.5313,1598.1816 379.6953,1596.5254 Q380.8594,1594.8691 382.8438,1594.8691 Q384.3125,1594.8691 384.7813,1594.9941 Q385.25,1595.1973 385.25,1595.1973 Q385.25,1595.1973 385.25,1595.127 Q385.25,1595.0566 385.8594,1594.1348 L386.9063,1597.791 L385.5781,1598.1973 Q385.1094,1596.6504 384.4453,1595.9863 Q383.7813,1595.3223 382.7188,1595.3223 Q382.3281,1595.3223 381.5625,1596.8535 Q380.7969,1598.3848 380.7969,1600.6348 Q380.7969,1603.1035 381.4609,1604.4941 Q382.125,1605.8848 382.6563,1605.8848 Q383.7188,1605.8848 384.4766,1605.1191 Q385.2344,1604.3535 385.5781,1602.6973 L386.9063,1603.291 Q386.5781,1604.6973 385.6797,1605.5879 Q384.7813,1606.4785 382.5781,1606.4785 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="118" x="401" y="1606.1631">RuishouConnector</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="94" x="615" y="45.1201"/><ellipse cx="633" cy="63.1201" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M631.5781,68.4795 Q629.7188,68.4795 628.625,67.0889 Q627.5313,65.6982 627.5313,62.7139 Q627.5313,60.1826 628.6953,58.5264 Q629.8594,56.8701 631.8438,56.8701 Q633.3125,56.8701 633.7813,56.9951 Q634.25,57.1982 634.25,57.1982 Q634.25,57.1982 634.25,57.1279 Q634.25,57.0576 634.8594,56.1357 L635.9063,59.792 L634.5781,60.1982 Q634.1094,58.6514 633.4453,57.9873 Q632.7813,57.3232 631.7188,57.3232 Q631.3281,57.3232 630.5625,58.8545 Q629.7969,60.3857 629.7969,62.6357 Q629.7969,65.1045 630.4609,66.4951 Q631.125,67.8857 631.6563,67.8857 Q632.7188,67.8857 633.4766,67.1201 Q634.2344,66.3545 634.5781,64.6982 L635.9063,65.292 Q635.5781,66.6982 634.6797,67.5889 Q633.7813,68.4795 631.5781,68.4795 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="52" x="650" y="68.1641">Protocal</text><rect fill="#E2E2F0" height="36" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="94" x="615" y="1583.1191"/><ellipse cx="633" cy="1601.1191" fill="#ADD1B2" rx="11" ry="11" style="stroke:#181818;stroke-width:1.0;"/><path d="M631.5781,1606.4785 Q629.7188,1606.4785 628.625,1605.0879 Q627.5313,1603.6973 627.5313,1600.7129 Q627.5313,1598.1816 628.6953,1596.5254 Q629.8594,1594.8691 631.8438,1594.8691 Q633.3125,1594.8691 633.7813,1594.9941 Q634.25,1595.1973 634.25,1595.1973 Q634.25,1595.1973 634.25,1595.127 Q634.25,1595.0566 634.8594,1594.1348 L635.9063,1597.791 L634.5781,1598.1973 Q634.1094,1596.6504 633.4453,1595.9863 Q632.7813,1595.3223 631.7188,1595.3223 Q631.3281,1595.3223 630.5625,1596.8535 Q629.7969,1598.3848 629.7969,1600.6348 Q629.7969,1603.1035 630.4609,1604.4941 Q631.125,1605.8848 631.6563,1605.8848 Q632.7188,1605.8848 633.4766,1605.1191 Q634.2344,1604.3535 634.5781,1602.6973 L635.9063,1603.291 Q635.5781,1604.6973 634.6797,1605.5879 Q633.7813,1606.4785 631.5781,1606.4785 Z " fill="#000000"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="52" x="650" y="1606.1631">Protocal</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="42" x="719" y="48"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="28" x="726" y="71.0439">设备</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="42" x="719" y="1583.1191"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="28" x="726" y="1606.1631">设备</text><rect fill="#FFFFFF" height="1459.2446" style="stroke:#181818;stroke-width:1.0;" width="10" x="286" y="115.8745"/><rect fill="#FFFFFF" height="1427.4902" style="stroke:#181818;stroke-width:1.0;" width="10" x="441" y="147.6289"/><rect fill="#FFFFFF" height="1395.7358" style="stroke:#181818;stroke-width:1.0;" width="10" x="657" y="179.3833"/><polygon fill="#181818" points="274,111.8745,284,115.8745,274,119.8745,278,115.8745" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="118" x2="280" y1="115.8745" y2="115.8745"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="125" y="111.0181">初始化client</text><polygon fill="#181818" points="429,143.6289,439,147.6289,429,151.6289,433,147.6289" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="296" x2="435" y1="147.6289" y2="147.6289"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="96" x="303" y="142.7725">初始化connector</text><polygon fill="#181818" points="645,175.3833,655,179.3833,645,183.3833,649,179.3833" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="651" y1="179.3833" y2="179.3833"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="85" x="458" y="174.5269">初始化protocal</text><path d="M10,194.3833 L111,194.3833 L111,204.1377 L101,214.1377 L10,214.1377 L10,194.3833 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="533.6304" style="stroke:#000000;stroke-width:1.5;" width="771" x="10" y="194.3833"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="56" x="25" y="210.2813">进行连接</text><polygon fill="#181818" points="274,233.8921,284,237.8921,274,241.8921,278,237.8921" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="118" x2="280" y1="237.8921" y2="237.8921"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="25" x="125" y="233.0356">init()</text><polygon fill="#181818" points="429,265.6465,439,269.6465,429,273.6465,433,269.6465" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="296" x2="435" y1="269.6465" y2="269.6465"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="72" x="303" y="264.79">start_client()</text><polygon fill="#181818" points="728,297.4009,738,301.4009,728,305.4009,732,301.4009" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="734" y1="301.4009" y2="301.4009"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="99" x="458" y="296.5444">建立 socket 连接</text><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="493" y1="333.1553" y2="333.1553"/><line style="stroke:#181818;stroke-width:1.0;" x1="493" x2="493" y1="333.1553" y2="346.1553"/><line style="stroke:#181818;stroke-width:1.0;" x1="452" x2="493" y1="346.1553" y2="346.1553"/><polygon fill="#181818" points="462,342.1553,452,346.1553,462,350.1553,458,346.1553" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="103" x="458" y="328.2988">sync_send_data()</text><polygon fill="#181818" points="645,373.9097,655,377.9097,645,381.9097,649,377.9097" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="651" y1="377.9097" y2="377.9097"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="156" x="458" y="373.0532">获取【握手】命令的数据包</text><polygon fill="#181818" points="462,387.9097,452,391.9097,462,395.9097,458,391.9097" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456" x2="656" y1="391.9097" y2="391.9097"/><polygon fill="#181818" points="728,419.6641,738,423.6641,728,427.6641,732,423.6641" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="734" y1="423.6641" y2="423.6641"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="104" x="458" y="418.8076">发送【握手】命令</text><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="493" y1="455.4185" y2="455.4185"/><line style="stroke:#181818;stroke-width:1.0;" x1="493" x2="493" y1="455.4185" y2="468.4185"/><line style="stroke:#181818;stroke-width:1.0;" x1="452" x2="493" y1="468.4185" y2="468.4185"/><polygon fill="#181818" points="462,464.4185,452,468.4185,462,472.4185,458,468.4185" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="118" x="458" y="450.562">is_connected = True</text><path d="M346,483.4185 L419,483.4185 L419,493.1729 L409,503.1729 L346,503.1729 L346,483.4185 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="237.5952" style="stroke:#000000;stroke-width:1.5;" width="425" x="346" y="483.4185"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="28" x="361" y="499.3164">loop</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="186" x="434" y="498.0244">[保持连接状态,每0.5s发送心跳包]</text><polygon fill="#181818" points="645,522.9502,655,526.9502,645,530.9502,649,526.9502" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="651" y1="526.9502" y2="526.9502"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="156" x="458" y="522.0938">获取【心跳】命令的数据包</text><polygon fill="#181818" points="462,536.9502,452,540.9502,462,544.9502,458,540.9502" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456" x2="656" y1="540.9502" y2="540.9502"/><polygon fill="#181818" points="728,568.7046,738,572.7046,728,576.7046,732,572.7046" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="734" y1="572.7046" y2="572.7046"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="91" x="458" y="567.8481">发送【心跳】包</text><path d="M356,587.7046 L417,587.7046 L417,597.459 L407,607.459 L356,607.459 L356,587.7046 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="126.3091" style="stroke:#000000;stroke-width:1.5;" width="239" x="356" y="587.7046"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="16" x="371" y="603.6025">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="56" x="432" y="602.3105">[发送成功]</text><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="493" y1="631.2363" y2="631.2363"/><line style="stroke:#181818;stroke-width:1.0;" x1="493" x2="493" y1="631.2363" y2="644.2363"/><line style="stroke:#181818;stroke-width:1.0;" x1="452" x2="493" y1="644.2363" y2="644.2363"/><polygon fill="#181818" points="462,640.2363,452,644.2363,462,648.2363,458,644.2363" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="118" x="458" y="626.3799">is_connected = True</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="356" x2="595" y1="653.2363" y2="653.2363"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="56" x="361" y="665.8423">[发送失败]</text><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="493" y1="693.0137" y2="693.0137"/><line style="stroke:#181818;stroke-width:1.0;" x1="493" x2="493" y1="693.0137" y2="706.0137"/><line style="stroke:#181818;stroke-width:1.0;" x1="452" x2="493" y1="706.0137" y2="706.0137"/><polygon fill="#181818" points="462,702.0137,452,706.0137,462,710.0137,458,706.0137" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="125" x="458" y="688.1572">is_connected = False</text><path d="M10,742.0137 L139,742.0137 L139,751.7681 L129,761.7681 L10,761.7681 L10,742.0137 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="111.2632" style="stroke:#000000;stroke-width:1.5;" width="526" x="10" y="742.0137"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="84" x="25" y="757.9116">获取连接状态</text><polygon fill="#181818" points="274,781.5225,284,785.5225,274,789.5225,278,785.5225" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="118" x2="280" y1="785.5225" y2="785.5225"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="44" x="125" y="780.666">status()</text><polygon fill="#181818" points="429,795.5225,439,799.5225,429,803.5225,433,799.5225" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="296" x2="435" y1="799.5225" y2="799.5225"/><polygon fill="#181818" points="307,827.2769,297,831.2769,307,835.2769,303,831.2769" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="301" x2="440" y1="831.2769" y2="831.2769"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="77" x="313" y="826.4204">is_connected</text><polygon fill="#181818" points="129,841.2769,119,845.2769,129,849.2769,125,845.2769" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="123" x2="285" y1="845.2769" y2="845.2769"/><path d="M10,867.2769 L139,867.2769 L139,877.0313 L129,887.0313 L10,887.0313 L10,867.2769 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="256.0352" style="stroke:#000000;stroke-width:1.5;" width="761" x="10" y="867.2769"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="84" x="25" y="883.1748">发送控制指令</text><polygon fill="#181818" points="274,906.7856,284,910.7856,274,914.7856,278,910.7856" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="118" x2="280" y1="910.7856" y2="910.7856"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="34" x="125" y="905.9292">start()</text><polygon fill="#181818" points="429,938.54,439,942.54,429,946.54,433,942.54" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="296" x2="435" y1="942.54" y2="942.54"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="103" x="303" y="937.6836">sync_send_data()</text><polygon fill="#181818" points="645,970.2944,655,974.2944,645,978.2944,649,974.2944" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="651" y1="974.2944" y2="974.2944"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="182" x="458" y="969.438">获取【运动控制】命令的数据包</text><polygon fill="#181818" points="462,984.2944,452,988.2944,462,992.2944,458,988.2944" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456" x2="656" y1="988.2944" y2="988.2944"/><polygon fill="#181818" points="728,1016.0488,738,1020.0488,728,1024.0488,732,1020.0488" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="734" y1="1020.0488" y2="1020.0488"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="130" x="458" y="1015.1924">发送【运动控制】命令</text><polygon fill="#181818" points="462,1047.8032,452,1051.8032,462,1055.8032,458,1051.8032" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456" x2="739" y1="1051.8032" y2="1051.8032"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="468" y="1046.9468">设备反馈</text><polygon fill="#181818" points="307,1079.5576,297,1083.5576,307,1087.5576,303,1083.5576" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="301" x2="440" y1="1083.5576" y2="1083.5576"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="313" y="1078.7012">设备反馈</text><polygon fill="#181818" points="129,1111.312,119,1115.312,129,1119.312,125,1115.312" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="123" x2="285" y1="1115.312" y2="1115.312"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="135" y="1110.4556">设备反馈</text><path d="M10,1137.312 L111,1137.312 L111,1147.0664 L101,1157.0664 L10,1157.0664 L10,1137.312 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="256.0352" style="stroke:#000000;stroke-width:1.5;" width="761" x="10" y="1137.312"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="56" x="25" y="1153.21">中止动作</text><polygon fill="#181818" points="274,1176.8208,284,1180.8208,274,1184.8208,278,1180.8208" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="118" x2="280" y1="1180.8208" y2="1180.8208"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="33" x="125" y="1175.9644">stop()</text><polygon fill="#181818" points="429,1208.5752,439,1212.5752,429,1216.5752,433,1212.5752" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="296" x2="435" y1="1212.5752" y2="1212.5752"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="103" x="303" y="1207.7188">sync_send_data()</text><polygon fill="#181818" points="645,1240.3296,655,1244.3296,645,1248.3296,649,1244.3296" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="651" y1="1244.3296" y2="1244.3296"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="182" x="458" y="1239.4731">获取【中止动作】命令的数据包</text><polygon fill="#181818" points="462,1254.3296,452,1258.3296,462,1262.3296,458,1258.3296" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456" x2="656" y1="1258.3296" y2="1258.3296"/><polygon fill="#181818" points="728,1286.084,738,1290.084,728,1294.084,732,1290.084" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="734" y1="1290.084" y2="1290.084"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="130" x="458" y="1285.2275">发送【中止动作】命令</text><polygon fill="#181818" points="462,1317.8384,452,1321.8384,462,1325.8384,458,1321.8384" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456" x2="739" y1="1321.8384" y2="1321.8384"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="468" y="1316.9819">设备反馈</text><polygon fill="#181818" points="307,1349.5928,297,1353.5928,307,1357.5928,303,1353.5928" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="301" x2="440" y1="1353.5928" y2="1353.5928"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="313" y="1348.7363">设备反馈</text><polygon fill="#181818" points="129,1381.3472,119,1385.3472,129,1389.3472,125,1385.3472" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="123" x2="285" y1="1385.3472" y2="1385.3472"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="135" y="1380.4907">设备反馈</text><path d="M10,1407.3472 L111,1407.3472 L111,1417.1016 L101,1427.1016 L10,1427.1016 L10,1407.3472 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="159.772" style="stroke:#000000;stroke-width:1.5;" width="761" x="10" y="1407.3472"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="56" x="25" y="1423.2451">关闭连接</text><polygon fill="#181818" points="274,1446.856,284,1450.856,274,1454.856,278,1450.856" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="118" x2="280" y1="1450.856" y2="1450.856"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="39" x="125" y="1445.9995">close()</text><polygon fill="#181818" points="429,1478.6104,439,1482.6104,429,1486.6104,433,1482.6104" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="296" x2="435" y1="1482.6104" y2="1482.6104"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="77" x="303" y="1477.7539">close_client()</text><polygon fill="#181818" points="728,1510.3647,738,1514.3647,728,1518.3647,732,1514.3647" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="734" y1="1514.3647" y2="1514.3647"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="99" x="458" y="1509.5083">断开 socket 连接</text><line style="stroke:#181818;stroke-width:1.0;" x1="451" x2="493" y1="1546.1191" y2="1546.1191"/><line style="stroke:#181818;stroke-width:1.0;" x1="493" x2="493" y1="1546.1191" y2="1559.1191"/><line style="stroke:#181818;stroke-width:1.0;" x1="452" x2="493" y1="1559.1191" y2="1559.1191"/><polygon fill="#181818" points="462,1555.1191,452,1559.1191,462,1563.1191,458,1559.1191" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="125" x="458" y="1541.2627">is_connected = False</text><!--MD5=[639740930aa6af69b1f38ec49ef8ccb0]
  2. @startuml
  3. title 睿手工作时序图
  4. ' hide unlinked
  5. participant PeripheralHandManager << (C,#ADD1B2) >>
  6. participant RuishouClient << (C,#ADD1B2) >>
  7. participant RuishouConnector << (C,#ADD1B2) >>
  8. participant Protocal << (C,#ADD1B2) >>
  9. participant 设备
  10. PeripheralHandManager -> RuishouClient: 初始化client
  11. activate RuishouClient
  12. RuishouClient -> RuishouConnector: 初始化connector
  13. activate RuishouConnector
  14. RuishouConnector -> Protocal: 初始化protocal
  15. activate Protocal
  16. group 进行连接
  17. PeripheralHandManager -> RuishouClient: init()
  18. RuishouClient -> RuishouConnector: start_client()
  19. RuishouConnector -> 设备: 建立 socket 连接
  20. RuishouConnector -> RuishouConnector: sync_send_data()
  21. RuishouConnector -> Protocal: 获取【握手】命令的数据包
  22. Protocal - -> RuishouConnector:
  23. RuishouConnector -> 设备: 发送【握手】命令
  24. RuishouConnector -> RuishouConnector: is_connected = True
  25. loop 保持连接状态,每0.5s发送心跳包
  26. RuishouConnector -> Protocal: 获取【心跳】命令的数据包
  27. Protocal - -> RuishouConnector :
  28. RuishouConnector -> 设备: 发送【心跳】包
  29. alt 发送成功
  30. RuishouConnector -> RuishouConnector: is_connected = True
  31. else 发送失败
  32. RuishouConnector -> RuishouConnector: is_connected = False
  33. end
  34. end
  35. end
  36. group 获取连接状态
  37. PeripheralHandManager -> RuishouClient: status()
  38. RuishouClient -> RuishouConnector:
  39. RuishouConnector - -> RuishouClient : is_connected
  40. RuishouClient - -> PeripheralHandManager :
  41. end
  42. group 发送控制指令
  43. PeripheralHandManager -> RuishouClient: start()
  44. RuishouClient -> RuishouConnector: sync_send_data()
  45. RuishouConnector -> Protocal: 获取【运动控制】命令的数据包
  46. Protocal - -> RuishouConnector:
  47. RuishouConnector -> 设备: 发送【运动控制】命令
  48. 设备 - -> RuishouConnector : 设备反馈
  49. RuishouConnector - -> RuishouClient : 设备反馈
  50. RuishouClient - -> PeripheralHandManager : 设备反馈
  51. end
  52. group 中止动作
  53. PeripheralHandManager -> RuishouClient: stop()
  54. RuishouClient -> RuishouConnector: sync_send_data()
  55. RuishouConnector -> Protocal: 获取【中止动作】命令的数据包
  56. Protocal - -> RuishouConnector:
  57. RuishouConnector -> 设备: 发送【中止动作】命令
  58. 设备 - -> RuishouConnector : 设备反馈
  59. RuishouConnector - -> RuishouClient : 设备反馈
  60. RuishouClient - -> PeripheralHandManager : 设备反馈
  61. end
  62. group 关闭连接
  63. PeripheralHandManager -> RuishouClient: close()
  64. RuishouClient -> RuishouConnector: close_client()
  65. RuishouConnector -> 设备: 断开 socket 连接
  66. RuishouConnector -> RuishouConnector: is_connected = False
  67. ' RuishouConnector - -> RuishouClient : is_connected
  68. ' RuishouClient - -> PeripheralHandManager :
  69. end
  70. @enduml
  71. @startuml
  72. title 睿手工作时序图
  73. participant PeripheralHandManager << (C,#ADD1B2) >>
  74. participant RuishouClient << (C,#ADD1B2) >>
  75. participant RuishouConnector << (C,#ADD1B2) >>
  76. participant Protocal << (C,#ADD1B2) >>
  77. participant 设备
  78. PeripheralHandManager -> RuishouClient: 初始化client
  79. activate RuishouClient
  80. RuishouClient -> RuishouConnector: 初始化connector
  81. activate RuishouConnector
  82. RuishouConnector -> Protocal: 初始化protocal
  83. activate Protocal
  84. group 进行连接
  85. PeripheralHandManager -> RuishouClient: init()
  86. RuishouClient -> RuishouConnector: start_client()
  87. RuishouConnector -> 设备: 建立 socket 连接
  88. RuishouConnector -> RuishouConnector: sync_send_data()
  89. RuishouConnector -> Protocal: 获取【握手】命令的数据包
  90. Protocal - -> RuishouConnector:
  91. RuishouConnector -> 设备: 发送【握手】命令
  92. RuishouConnector -> RuishouConnector: is_connected = True
  93. loop 保持连接状态,每0.5s发送心跳包
  94. RuishouConnector -> Protocal: 获取【心跳】命令的数据包
  95. Protocal - -> RuishouConnector :
  96. RuishouConnector -> 设备: 发送【心跳】包
  97. alt 发送成功
  98. RuishouConnector -> RuishouConnector: is_connected = True
  99. else 发送失败
  100. RuishouConnector -> RuishouConnector: is_connected = False
  101. end
  102. end
  103. end
  104. group 获取连接状态
  105. PeripheralHandManager -> RuishouClient: status()
  106. RuishouClient -> RuishouConnector:
  107. RuishouConnector - -> RuishouClient : is_connected
  108. RuishouClient - -> PeripheralHandManager :
  109. end
  110. group 发送控制指令
  111. PeripheralHandManager -> RuishouClient: start()
  112. RuishouClient -> RuishouConnector: sync_send_data()
  113. RuishouConnector -> Protocal: 获取【运动控制】命令的数据包
  114. Protocal - -> RuishouConnector:
  115. RuishouConnector -> 设备: 发送【运动控制】命令
  116. 设备 - -> RuishouConnector : 设备反馈
  117. RuishouConnector - -> RuishouClient : 设备反馈
  118. RuishouClient - -> PeripheralHandManager : 设备反馈
  119. end
  120. group 中止动作
  121. PeripheralHandManager -> RuishouClient: stop()
  122. RuishouClient -> RuishouConnector: sync_send_data()
  123. RuishouConnector -> Protocal: 获取【中止动作】命令的数据包
  124. Protocal - -> RuishouConnector:
  125. RuishouConnector -> 设备: 发送【中止动作】命令
  126. 设备 - -> RuishouConnector : 设备反馈
  127. RuishouConnector - -> RuishouClient : 设备反馈
  128. RuishouClient - -> PeripheralHandManager : 设备反馈
  129. end
  130. group 关闭连接
  131. PeripheralHandManager -> RuishouClient: close()
  132. RuishouClient -> RuishouConnector: close_client()
  133. RuishouConnector -> 设备: 断开 socket 连接
  134. RuishouConnector -> RuishouConnector: is_connected = False
  135. end
  136. @enduml
  137. PlantUML version 1.2022.7(Tue Aug 23 01:01:30 CST 2022)
  138. (GPL source distribution)
  139. Java Runtime: Java(TM) SE Runtime Environment
  140. JVM: Java HotSpot(TM) 64-Bit Server VM
  141. Default Encoding: GBK
  142. Language: zh
  143. Country: CN
  144. --></g></svg>