1
0

sig_chain sequence.svg 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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="1444px" preserveAspectRatio="none" style="width:1664px;height:1444px;background:#FFFFFF;" version="1.1" viewBox="0 0 1664 1444" width="1664px" zoomAndPan="magnify"><defs/><g><rect fill="none" height="29.1201" id="_title" style="stroke:none;stroke-width:1.0;" width="122" x="767.25" y="10"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="112" x="772.25" y="31.0439">sig_chain时序图</text><rect fill="none" height="769.4146" style="stroke:#000000;stroke-width:1.5;" width="1370.5" x="10" y="236.0864"/><rect fill="none" height="212.9609" style="stroke:#000000;stroke-width:1.5;" width="914" x="456.5" y="383.3955"/><rect fill="none" height="106.3091" style="stroke:#000000;stroke-width:1.5;" width="482" x="456.5" y="673.8652"/><rect fill="none" height="172.5723" style="stroke:#000000;stroke-width:1.5;" width="763" x="20" y="825.9287"/><rect fill="none" height="107.0405" style="stroke:#000000;stroke-width:1.5;" width="461.5" x="311.5" y="852.7061"/><rect fill="none" height="299.6128" style="stroke:#000000;stroke-width:1.5;" width="858" x="789.5" y="1070.7183"/><rect fill="none" height="154.8179" style="stroke:#000000;stroke-width:1.5;" width="424" x="1032.5" y="1097.4956"/><rect fill="none" height="51.5317" style="stroke:#000000;stroke-width:1.5;" width="404" x="1042.5" y="1193.7817"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="63" x2="63" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="63" x2="63" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="63" x2="63" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="363.5" x2="363.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="363.5" x2="363.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="363.5" x2="363.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="507.5" x2="507.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="507.5" x2="507.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="507.5" x2="507.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="609.5" x2="609.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="609.5" x2="609.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="609.5" x2="609.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="840.5" x2="840.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="840.5" x2="840.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="840.5" x2="840.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="966.5" x2="966.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="966.5" x2="966.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="966.5" x2="966.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1100.5" x2="1100.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="1100.5" x2="1100.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1100.5" x2="1100.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1202.5" x2="1202.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="1202.5" x2="1202.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1202.5" x2="1202.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1308.5" x2="1308.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="1308.5" x2="1308.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1308.5" x2="1308.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1403.5" x2="1403.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="1403.5" x2="1403.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1403.5" x2="1403.5" y1="298.8867" y2="1387.3311"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1493.5" x2="1493.5" y1="98.3604" y2="255.8638"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="1493.5" x2="1493.5" y1="255.8638" y2="298.8867"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="1493.5" x2="1493.5" y1="298.8867" y2="1387.3311"/><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="67" x="30" y="64.2402"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="53" x="37" y="87.2842">frontend</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="67" x="30" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="53" x="37" y="1409.375">frontend</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="84" x="321.5" y="64.2402"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="328.5" y="87.2842">router_eeg</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="84" x="321.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="328.5" y="1409.375">router_eeg</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="82" x="466.5" y="45.1201"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="68" x="473.5" y="68.1641">«Recriver»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="482" y="87.2842">receiver</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="82" x="466.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="68" x="473.5" y="1409.375">«Recriver»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="51" x="482" y="1428.4951">receiver</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="102" x="558.5" y="45.1201"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="88" x="565.5" y="68.1641">«Preprocess»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="71" x="574" y="87.2842">preprocess</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="102" x="558.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="88" x="565.5" y="1409.375">«Preprocess»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="71" x="574" y="1428.4951">preprocess</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="82" x="799.5" y="45.1201"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="54" x="813.5" y="68.1641">«Buffer»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="68" x="806.5" y="87.2842">buffer_plot</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="82" x="799.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="54" x="813.5" y="1409.375">«Buffer»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="68" x="806.5" y="1428.4951">buffer_plot</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="151" x="891.5" y="45.1201"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="54" x="940" y="68.1641">«Buffer»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="137" x="898.5" y="87.2842">buffer_classify_online</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="151" x="891.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="54" x="940" y="1409.375">«Buffer»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="137" x="898.5" y="1428.4951">buffer_classify_online</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="96" x="1052.5" y="45.1201"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="82" x="1059.5" y="68.1641">«Connecter»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="1069" y="87.2842">connecter</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="96" x="1052.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="82" x="1059.5" y="1409.375">«Connecter»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="1069" y="1428.4951">connecter</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="89" x="1158.5" y="45.1201"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="54" x="1176" y="68.1641">«Buffer»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="75" x="1165.5" y="87.2842">buffer_save</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="89" x="1158.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="54" x="1176" y="1409.375">«Buffer»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="75" x="1165.5" y="1428.4951">buffer_save</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="103" x="1257.5" y="64.2402"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="89" x="1264.5" y="87.2842">hardware_sdk</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="103" x="1257.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="89" x="1264.5" y="1409.375">hardware_sdk</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="66" x="1370.5" y="45.1201"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="52" x="1377.5" y="68.1641">«Saver»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="35" x="1386" y="87.2842">saver</text><rect fill="#E2E2F0" height="52.2402" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="66" x="1370.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" font-style="italic" lengthAdjust="spacing" textLength="52" x="1377.5" y="1409.375">«Saver»</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="35" x="1386" y="1428.4951">saver</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="94" x="1446.5" y="64.2402"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="80" x="1453.5" y="87.2842">buffer_saver</text><rect fill="#E2E2F0" height="33.1201" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="94" x="1446.5" y="1386.3311"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="80" x="1453.5" y="1409.375">buffer_saver</text><path d="M823,113.3604 L823,140.3604 L858,140.3604 L858,123.3604 L848,113.3604 L823,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M848,113.3604 L848,123.3604 L858,123.3604 L848,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="14" x="829" y="133.2583">1s</text><path d="M1476,113.3604 L1476,140.3604 L1511,140.3604 L1511,123.3604 L1501,113.3604 L1476,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1501,113.3604 L1501,123.3604 L1511,123.3604 L1501,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="14" x="1482" y="133.2583">1s</text><path d="M949,113.3604 L949,140.3604 L984,140.3604 L984,123.3604 L974,113.3604 L949,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M974,113.3604 L974,123.3604 L984,123.3604 L974,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="14" x="955" y="133.2583">1s</text><path d="M1014,113.3604 L1014,140.3604 L1186,140.3604 L1186,123.3604 L1176,113.3604 L1014,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1176,113.3604 L1176,123.3604 L1186,123.3604 L1176,113.3604 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="151" x="1020" y="133.2583">delay_milliseconds = 0.5s</text><rect fill="#EEEEEE" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="1657.5" x="0" y="170.7234"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1657.5" y1="170.7234" y2="170.7234"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1657.5" y1="173.7234" y2="173.7234"/><rect fill="#EEEEEE" height="31.2173" style="stroke:#000000;stroke-width:2.0;" width="86" x="785.75" y="156.1147"/><text fill="#000000" font-family="sans-serif" font-size="17" font-weight="bold" lengthAdjust="spacing" textLength="72" x="791.75" y="179.5967">主要逻辑</text><polygon fill="#181818" points="351.5,217.0864,361.5,221.0864,351.5,225.0864,355.5,221.0864" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="63.5" x2="357.5" y1="221.0864" y2="221.0864"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="276" x="70.5" y="216.23">websocket: xxx/eeg/data(get_wave_from_buffer)</text><path d="M10,236.0864 L83,236.0864 L83,245.8408 L73,255.8408 L10,255.8408 L10,236.0864 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="769.4146" style="stroke:#000000;stroke-width:1.5;" width="1370.5" x="10" y="236.0864"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="28" x="25" y="251.9844">loop</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="123" x="98" y="250.6924">[直到 is_ready==False]</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="106" x="724" y="282.4697">buffer数据时长/2 s 后</text><polygon fill="#181818" points="495.5,300.8867,505.5,304.8867,495.5,308.8867,499.5,304.8867" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="363.5" x2="501.5" y1="304.8867" y2="304.8867"/><polygon fill="#181818" points="1088.5,332.6411,1098.5,336.6411,1088.5,340.6411,1092.5,336.6411" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="507.5" x2="1094.5" y1="336.6411" y2="336.6411"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="75" x="514.5" y="331.7847">receive_wave</text><polygon fill="#181818" points="1297,364.3955,1307,368.3955,1297,372.3955,1301,368.3955" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="1100.5" x2="1303" y1="368.3955" y2="368.3955"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="163" x="1107.5" y="363.5391">NeuracleControllerReadData</text><path d="M456.5,383.3955 L517.5,383.3955 L517.5,393.1499 L507.5,403.1499 L456.5,403.1499 L456.5,383.3955 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="212.9609" style="stroke:#000000;stroke-width:1.5;" width="914" x="456.5" y="383.3955"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="16" x="471.5" y="399.2935">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="32" x="532.5" y="398.0015">[成功]</text><polygon fill="#181818" points="1111.5,422.9272,1101.5,426.9272,1111.5,430.9272,1107.5,426.9272" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="1105.5" x2="1308" y1="426.9272" y2="426.9272"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="146" x="1117.5" y="422.0708">NeuracleResult_Succeed</text><rect fill="none" height="44.1431" style="stroke:#000000;stroke-width:1.5;" width="140" x="1049.5" y="434.9272"/><path d="M1049.5,434.9272 L1111.5,434.9272 L1111.5,443.9272 L1101.5,453.9272 L1049.5,453.9272 L1049.5,434.9272 " fill="#EEEEEE" style="stroke:#000000;stroke-width:2.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="1062.5" y="451.8252">ref</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="132" x="1053.5" y="471.6792">保存数据,并通知观察者</text><polygon fill="#181818" points="518.5,503.8247,508.5,507.8247,518.5,511.8247,514.5,507.8247" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="512.5" x2="1099.5" y1="507.8247" y2="507.8247"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="25" x="524.5" y="502.9683">True</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456.5" x2="1370.5" y1="516.8247" y2="516.8247"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="32" x="461.5" y="529.4307">[失败]</text><polygon fill="#181818" points="1111.5,552.6021,1101.5,556.6021,1111.5,560.6021,1107.5,556.6021" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="1105.5" x2="1308" y1="556.6021" y2="556.6021"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="52" x="1117.5" y="551.7456">其它标志</text><polygon fill="#181818" points="518.5,584.3564,508.5,588.3564,518.5,592.3564,514.5,588.3564" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="512.5" x2="1099.5" y1="588.3564" y2="588.3564"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="32" x="524.5" y="583.5">False</text><polygon fill="#181818" points="495.5,623.1108,505.5,627.1108,495.5,631.1108,499.5,627.1108" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="363.5" x2="501.5" y1="627.1108" y2="627.1108"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="120" x="370.5" y="622.2544">get_data_from_buffer</text><polygon fill="#181818" points="828.5,654.8652,838.5,658.8652,828.5,662.8652,832.5,658.8652" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="507.5" x2="834.5" y1="658.8652" y2="658.8652"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="42" x="514.5" y="654.0088">get_sig</text><path d="M456.5,673.8652 L517.5,673.8652 L517.5,683.6196 L507.5,693.6196 L456.5,693.6196 L456.5,673.8652 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="106.3091" style="stroke:#000000;stroke-width:1.5;" width="482" x="456.5" y="673.8652"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="16" x="471.5" y="689.7632">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="56" x="532.5" y="688.4712">[数据够了]</text><polygon fill="#181818" points="518.5,716.397,508.5,720.397,518.5,724.397,514.5,720.397" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="512.5" x2="839.5" y1="720.397" y2="720.397"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="309" x="524.5" y="715.5405">ret = {'data':data, 'status': 'ok', 'timestamp':timestamp}</text><path d="M845,698.6426 L845,725.6426 L923,725.6426 L923,708.6426 L913,698.6426 L845,698.6426 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M913,698.6426 L913,708.6426 L923,708.6426 L913,698.6426 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="57" x="851" y="718.5405">清空buffer</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="456.5" x2="938.5" y1="732.397" y2="732.397"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="56" x="461.5" y="745.0029">[数据不够]</text><polygon fill="#181818" points="518.5,768.1743,508.5,772.1743,518.5,776.1743,514.5,772.1743" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="512.5" x2="839.5" y1="772.1743" y2="772.1743"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="296" x="524.5" y="767.3179">ret = {'data':None, 'status': 'warn', 'timestamp':None}</text><polygon fill="#181818" points="374.5,806.9287,364.5,810.9287,374.5,814.9287,370.5,810.9287" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="368.5" x2="506.5" y1="810.9287" y2="810.9287"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="15" x="380.5" y="806.0723">ret</text><path d="M20,825.9287 L81,825.9287 L81,835.6831 L71,845.6831 L20,845.6831 L20,825.9287 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="172.5723" style="stroke:#000000;stroke-width:1.5;" width="763" x="20" y="825.9287"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="16" x="35" y="841.8267">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="81" x="96" y="840.5347">[status == 'ok']</text><path d="M311.5,852.7061 L376.5,852.7061 L376.5,862.4604 L366.5,872.4604 L311.5,872.4604 L311.5,852.7061 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="107.0405" style="stroke:#000000;stroke-width:1.5;" width="461.5" x="311.5" y="852.7061"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="20" x="326.5" y="868.604">opt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="44" x="391.5" y="867.312">[预处理]</text><polygon fill="#181818" points="597.5,892.2378,607.5,896.2378,597.5,900.2378,601.5,896.2378" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="363.5" x2="603.5" y1="896.2378" y2="896.2378"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="104" x="370.5" y="891.3813">滤波、降采样之类</text><path d="M456,909.2378 L456,954.2378 L763,954.2378 L763,919.2378 L753,909.2378 L456,909.2378 " fill="#FFAAAA" style="stroke:#181818;stroke-width:0.5;"/><path d="M753,909.2378 L753,919.2378 L763,919.2378 L753,909.2378 " fill="#FFAAAA" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="284" x="462" y="929.1357">目前已知问题是,如果buffer_plot 返回的数据长度</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="286" x="462" y="946.8901">不能被降采样率整除,返回的数据长度就不对!!</text><polygon fill="#181818" points="74.5,986.501,64.5,990.501,74.5,994.501,70.5,990.501" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="68.5" x2="362.5" y1="990.501" y2="990.501"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="87" x="80.5" y="985.6445">{'eegdata':data}</text><rect fill="#EEEEEE" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="1657.5" x="0" y="1037.1096"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1657.5" y1="1037.1096" y2="1037.1096"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="1657.5" y1="1040.1096" y2="1040.1096"/><rect fill="#EEEEEE" height="31.2173" style="stroke:#000000;stroke-width:2.0;" width="104" x="776.75" y="1022.501"/><text fill="#000000" font-family="sans-serif" font-size="17" font-weight="bold" lengthAdjust="spacing" textLength="90" x="782.75" y="1045.9829">子模块详情</text><path d="M789.5,1070.7183 L988.5,1070.7183 L988.5,1080.4727 L978.5,1090.4727 L789.5,1090.4727 L789.5,1070.7183 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="299.6128" style="stroke:#000000;stroke-width:1.5;" width="858" x="789.5" y="1070.7183"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="154" x="804.5" y="1086.6162">保存数据,并通知观察者</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="168" x="1003.5" y="1085.3242">[_add_a_data_block_to_buffer]</text><path d="M1032.5,1097.4956 L1093.5,1097.4956 L1093.5,1107.25 L1083.5,1117.25 L1032.5,1117.25 L1032.5,1097.4956 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="154.8179" style="stroke:#000000;stroke-width:1.5;" width="424" x="1032.5" y="1097.4956"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="16" x="1047.5" y="1113.3936">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="328" x="1108.5" y="1112.1016">[满足保存条件(有buffer_save, 有saver, 且saver准备好了)]</text><polygon fill="#181818" points="1191,1137.0273,1201,1141.0273,1191,1145.0273,1195,1141.0273" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="1100.5" x2="1197" y1="1141.0273" y2="1141.0273"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="39" x="1107.5" y="1136.1709">update</text><polygon fill="#181818" points="1191,1171.7817,1201,1175.7817,1191,1179.7817,1195,1175.7817" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="1100.5" x2="1197" y1="1175.7817" y2="1175.7817"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="42" x="1107.5" y="1170.9253">get_sig</text><path d="M1208,1154.0273 L1208,1181.0273 L1286,1181.0273 L1286,1164.0273 L1276,1154.0273 L1208,1154.0273 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1276,1154.0273 L1276,1164.0273 L1286,1164.0273 L1276,1154.0273 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="57" x="1214" y="1173.9253">清空buffer</text><path d="M1042.5,1193.7817 L1103.5,1193.7817 L1103.5,1203.5361 L1093.5,1213.5361 L1042.5,1213.5361 L1042.5,1193.7817 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="51.5317" style="stroke:#000000;stroke-width:1.5;" width="404" x="1042.5" y="1193.7817"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="16" x="1057.5" y="1209.6797">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="81" x="1118.5" y="1208.3877">[status == 'ok']</text><polygon fill="#181818" points="1391.5,1233.3135,1401.5,1237.3135,1391.5,1241.3135,1395.5,1237.3135" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="1100.5" x2="1397.5" y1="1237.3135" y2="1237.3135"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="85" x="1107.5" y="1232.457">save_raw_data</text><polygon fill="#181818" points="851.5,1290.9451,841.5,1294.9451,851.5,1298.9451,847.5,1294.9451" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="845.5" x2="1099.5" y1="1294.9451" y2="1294.9451"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="39" x="857.5" y="1290.0886">update</text><path d="M1105,1264.3135 L1105,1309.3135 L1632,1309.3135 L1632,1274.3135 L1622,1264.3135 L1105,1264.3135 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1622,1264.3135 L1622,1274.3135 L1632,1274.3135 L1622,1264.3135 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="276" x="1111" y="1284.2114">前提是buffer_plot已加入connector的观察者列表,</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="506" x="1111" y="1301.9658">注意:buffer的长度不能低于每次取包的长度(即delay_millisecond), 否则一定丢失数据</text><polygon fill="#181818" points="978,1346.4539,968,1350.4539,978,1354.4539,974,1350.4539" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="972" x2="1099.5" y1="1350.4539" y2="1350.4539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="39" x="984" y="1345.5974">update</text><path d="M1105,1319.8223 L1105,1364.8223 L1632,1364.8223 L1632,1329.8223 L1622,1319.8223 L1105,1319.8223 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1622,1319.8223 L1622,1329.8223 L1632,1329.8223 L1622,1319.8223 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="340" x="1111" y="1339.7202">前提是buffer_classify_online已加入connector的观察者列表,</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="506" x="1111" y="1357.4746">注意:buffer的长度不能低于每次取包的长度(即delay_millisecond), 否则一定丢失数据</text><!--MD5=[c0ca954bf22861eac2edfa63190b909c]
  2. @startuml
  3. title sig_chain时序图
  4. participant frontend
  5. participant router_eeg
  6. participant receiver <<Recriver>>
  7. participant preprocess <<Preprocess>>
  8. participant buffer_plot <<Buffer>>
  9. participant buffer_classify_online <<Buffer>>
  10. participant connecter <<Connecter>>
  11. participant buffer_save <<Buffer>>
  12. participant hardware_sdk
  13. participant saver <<Saver>>
  14. note over buffer_plot : 1s
  15. / note over buffer_saver : 1s
  16. / note over buffer_classify_online : 1s
  17. / note over connecter : delay_milliseconds = 0.5s
  18. === 主要逻辑 ==
  19. frontend -> router_eeg: websocket: xxx/eeg/data(get_wave_from_buffer)
  20. loop 直到 is_ready==False
  21. ...buffer数据时长/2 s 后 ...
  22. router_eeg - -> receiver:
  23. receiver - -> connecter: receive_wave
  24. connecter - -> hardware_sdk: NeuracleControllerReadData
  25. alt 成功
  26. hardware_sdk - -> connecter: NeuracleResult_Succeed
  27. ref over connecter: 保存数据,并通知观察者
  28. connecter - -> receiver: True
  29. else 失败
  30. hardware_sdk - -> connecter: 其它标志
  31. connecter - -> receiver: False
  32. end
  33. router_eeg - -> receiver: get_data_from_buffer
  34. receiver - -> buffer_plot: get_sig
  35. alt 数据够了
  36. buffer_plot - -> receiver: ret = {'data':data, 'status': 'ok', 'timestamp':timestamp}
  37. note right: 清空buffer
  38. else 数据不够
  39. buffer_plot - -> receiver: ret = {'data':None, 'status': 'warn', 'timestamp':None}
  40. end
  41. receiver - -> router_eeg: ret
  42. alt status == 'ok'
  43. opt 预处理
  44. router_eeg - -> preprocess: 滤波、降采样之类
  45. note over preprocess #FFAAAA: 目前已知问题是,如果buffer_plot 返回的数据长度\n不能被降采样率整除,返回的数据长度就不对!!
  46. end
  47. router_eeg - -> frontend: {'eegdata':data}
  48. end
  49. end
  50. === 子模块详情 ==
  51. group 保存数据,并通知观察者[_add_a_data_block_to_buffer]
  52. alt 满足保存条件(有buffer_save, 有saver, 且saver准备好了)
  53. connecter - -> buffer_save: update
  54. connecter - -> buffer_save: get_sig
  55. note right: 清空buffer
  56. alt status == 'ok'
  57. connecter - -> saver: save_raw_data
  58. end
  59. end
  60. connecter - -> buffer_plot: update
  61. note right: 前提是buffer_plot已加入connector的观察者列表, \n注意:buffer的长度不能低于每次取包的长度(即delay_millisecond), 否则一定丢失数据
  62. connecter - -> buffer_classify_online: update
  63. note right: 前提是buffer_classify_online已加入connector的观察者列表, \n注意:buffer的长度不能低于每次取包的长度(即delay_millisecond), 否则一定丢失数据
  64. end
  65. @enduml
  66. PlantUML version 1.2022.7(Tue Aug 23 01:01:30 CST 2022)
  67. (GPL source distribution)
  68. Java Runtime: Java(TM) SE Runtime Environment
  69. JVM: Java HotSpot(TM) 64-Bit Server VM
  70. Default Encoding: GBK
  71. Language: zh
  72. Country: CN
  73. --></g></svg>