以下就是状态转换关系图,咋一看有点复杂,仔细一看思路还是比较清晰的。一般编程之前都需要在草纸上画出状态图,方便转化为代码。正确绘制状态循环图方可使程序在状态之间顺利切换,且当任意一个数据有误时也能以最高的效率自动归位,尤其是状态1的转换关系。
<svg id="mermaid-svg-iI0rJepVOntV9JhI" width="100%" xmlns="http://www.w3.org/2000/svg" height="1224.8890380859375" style="max-width: 997.6103515625px;"><style>#mermaid-svg-iI0rJepVOntV9JhI {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-iI0rJepVOntV9JhI .error-icon{fill:#552222;}#mermaid-svg-iI0rJepVOntV9JhI .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-iI0rJepVOntV9JhI .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-iI0rJepVOntV9JhI .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-iI0rJepVOntV9JhI .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-iI0rJepVOntV9JhI .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-iI0rJepVOntV9JhI .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-iI0rJepVOntV9JhI .marker{fill:#333333;stroke:#333333;}#mermaid-svg-iI0rJepVOntV9JhI .marker.cross{stroke:#333333;}#mermaid-svg-iI0rJepVOntV9JhI svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-iI0rJepVOntV9JhI .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-iI0rJepVOntV9JhI .cluster-label text{fill:#333;}#mermaid-svg-iI0rJepVOntV9JhI .cluster-label span{color:#333;}#mermaid-svg-iI0rJepVOntV9JhI .label text,#mermaid-svg-iI0rJepVOntV9JhI span{fill:#333;color:#333;}#mermaid-svg-iI0rJepVOntV9JhI .node rect,#mermaid-svg-iI0rJepVOntV9JhI .node circle,#mermaid-svg-iI0rJepVOntV9JhI .node ellipse,#mermaid-svg-iI0rJepVOntV9JhI .node polygon,#mermaid-svg-iI0rJepVOntV9JhI .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-iI0rJepVOntV9JhI .node .label{text-align:center;}#mermaid-svg-iI0rJepVOntV9JhI .node.clickable{cursor:pointer;}#mermaid-svg-iI0rJepVOntV9JhI .arrowheadPath{fill:#333333;}#mermaid-svg-iI0rJepVOntV9JhI .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-iI0rJepVOntV9JhI .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-iI0rJepVOntV9JhI .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-iI0rJepVOntV9JhI .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-iI0rJepVOntV9JhI .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-iI0rJepVOntV9JhI .cluster text{fill:#333;}#mermaid-svg-iI0rJepVOntV9JhI .cluster span{color:#333;}#mermaid-svg-iI0rJepVOntV9JhI div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-iI0rJepVOntV9JhI :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g transform="translate(0, 0)"><marker id="flowchart-pointEnd" class="marker flowchart" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker><marker id="flowchart-pointStart" class="marker flowchart" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></path></marker><marker id="flowchart-circleEnd" class="marker flowchart" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></circle></marker><marker id="flowchart-circleStart" class="marker flowchart" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"></circle></marker><marker id="flowchart-crossEnd" class="marker cross flowchart" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"></path></marker><marker id="flowchart-crossStart" class="marker cross flowchart" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"></path></marker><g class="root"><g class="clusters"></g><g class="edgePaths"><path d="M690.456554227567,40.77350956739126L636.2399881726307,50.87549445481051C582.0234221176944,60.97747934222975,473.5902900078218,81.18144911706825,437.7796588571144,100.21550015876615C401.96902770640696,119.24955120046407,438.78089751486476,137.1136835090214,457.18683241909366,146.04574966330006L475.5927673233225,154.97781581757872" id="L-A-B-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-A LE-B" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M473.49382426387797,173.1729398682189L429.5197400024097,183.10360812763966C385.5456557409414,193.0342763870605,297.5974872180049,212.89561290590208,253.62340295653664,229.15729977214457C209.64931869506836,245.41898663838705,209.64931869506836,258.08102385203046,209.64931869506836,264.4120424588521L209.64931869506836,270.7430610656738" id="L-B-C-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-C" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M526.6322366904594,157.8484026451412L535.3534051735681,154.76892395975713C544.0745736566768,151.6894452743731,561.516910622894,145.530487903605,572.3525177987314,142.45100921822095C583.1881249745687,139.3715305328369,587.417002360026,139.3715305328369,591.6458797454834,143.9881394704183C595.8747571309408,148.60474840799967,600.1036345163981,157.83796628316244,600.1036345163981,167.0711841583252C600.1036345163981,176.30440203348795,595.8747571309408,185.53761990865073,591.6458797454834,190.1542288462321C587.417002360026,194.77083778381348,583.1881249745687,194.77083778381348,572.3525177987314,191.69135909842942C561.516910622894,188.61188041304538,544.0745736566768,182.45292304227732,535.3534051735681,179.37344435689326L526.6322366904594,176.2939656715092" id="L-B-B-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-B" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M513.6403718570596,142.67969723091093L517.3444145205721,135.79731750774357C521.0484571840847,128.9149377845762,528.4565425111097,115.15017833824147,558.1224447230823,98.88875746115151C587.7883469350548,82.62733658406155,639.7120660319749,63.869254276216374,665.6739255804349,54.49021312229379L691.635785128895,45.111171968371195" id="L-B-A-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-A" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M209.64931869506836,326.1423683166504L209.64931869506836,332.4733869234721C209.64931869506836,338.80440553029376,209.64931869506836,351.4664427439372,209.64931869506836,364.12847995758057C209.64931869506836,376.79051717122394,209.64931869506836,389.45255438486737,209.64931869506836,395.783572991689L209.64931869506836,402.11459159851074" id="L-C-D-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-C LE-D" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M187.68818698187522,446.69558121519975L177.1064761103843,454.8296527610694C166.52476523889337,462.963724306939,145.36134349591154,479.2318673986783,134.7796326244206,493.6969575513695C124.19792175292969,508.16204770406085,124.19792175292969,520.8240849177042,124.19792175292969,527.155103524526L124.19792175292969,533.4861221313477" id="L-D-E-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-D LE-E" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M124.19792175292969,588.8854293823242L124.19792175292969,595.2164479891459C124.19792175292969,601.5474665959676,124.19792175292969,614.209503809611,134.7796326244206,628.6745939623023C145.36134349591154,643.1396841149937,166.52476523889337,659.4078272067329,177.1064761103843,667.5418987526026L187.68818698187522,675.6759702984722" id="L-E-F-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-E LE-F" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M231.6104504082615,446.69558121519975L242.1921612797524,454.8296527610694C252.77387215124335,462.963724306939,273.9372938942252,479.2318673986783,284.5190047657161,498.3135664889509C295.10071563720703,517.3952655792236,295.10071563720703,539.2905206680298,295.10071563720703,561.1857757568359C295.10071563720703,583.0810308456421,295.10071563720703,604.9762859344482,284.5190047657161,624.057985024721C273.9372938942252,643.1396841149937,252.77387215124335,659.4078272067329,242.1921612797524,667.5418987526026L231.6104504082615,675.6759702984722" id="L-D-F-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-D LE-F" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M209.64931869506836,720.2569599151611L209.64931869506836,726.5879785219828C209.64931869506836,732.9189971288046,209.64931869506836,745.5810343424479,209.64931869506836,758.2430715560913C209.64931869506836,770.9051087697347,209.64931869506836,783.567145983378,209.64931869506836,789.8981645901998L209.64931869506836,796.2291831970215" id="L-F-G-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-F LE-G" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M209.64931869506836,851.628490447998L209.64931869506836,857.9595090548197C209.64931869506836,864.2905276616415,209.64931869506836,876.9525648752848,254.86054929097494,891.7901289773125C300.07177988688153,906.6276930793401,390.49424107869464,923.640784069752,435.70547167460126,932.147329564958L480.9167022705078,940.653875060164" id="L-G-I-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-G LE-I" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M520.4219131469727,968.5729389190674L520.4219131469727,974.903957525889C520.4219131469727,981.2349761327108,520.4219131469727,993.8970133463541,560.9613239629962,1010.0849379094813C601.5007347790197,1026.2728624726085,682.5795564110668,1045.9866743852192,723.1189672270904,1055.8435803415246L763.6583780431139,1065.70048629783" id="L-I-H-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-I LE-H" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M520.4219131469727,927.6007137298584L520.4219131469727,921.2696951230367C520.4219131469727,914.938676516215,520.4219131469727,902.2766393025717,520.4219131469727,884.9979931513468C520.4219131469727,867.7193470001221,520.4219131469727,845.8240919113159,520.4219131469727,823.9288368225098C520.4219131469727,802.0335817337036,520.4219131469727,780.1383266448975,520.4219131469727,758.2430715560913C520.4219131469727,736.3478164672852,520.4219131469727,714.452561378479,520.4219131469727,692.5573062896729C520.4219131469727,670.6620512008667,520.4219131469727,648.7667961120605,520.4219131469727,626.8715410232544C520.4219131469727,604.9762859344482,520.4219131469727,583.0810308456421,520.4219131469727,561.1857757568359C520.4219131469727,539.2905206680298,520.4219131469727,517.3952655792236,520.4219131469727,495.5000104904175C520.4219131469727,473.6047554016113,520.4219131469727,451.7095003128052,520.4219131469727,429.814245223999C520.4219131469727,407.91899013519287,520.4219131469727,386.0237350463867,520.4219131469727,364.12847995758057C520.4219131469727,342.2332248687744,520.4219131469727,320.33796977996826,520.4219131469727,298.4427146911621C520.4219131469727,276.54745960235596,520.4219131469727,254.6522045135498,518.4428733352904,237.17508084906737C516.4638335236082,219.6979571845849,512.5057539002436,206.63896494442614,510.5267140885614,200.10946882434678L508.5476742768791,193.5799727042674" id="L-I-B-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-I LE-B" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M559.9271240234375,932.1594229583559L577.5146541595459,925.068619480118C595.1021842956543,917.97781600188,630.2772445678711,903.7962090454042,647.8647747039795,885.7577780227631C665.4523048400879,867.7193470001221,665.4523048400879,845.8240919113159,665.4523048400879,823.9288368225098C665.4523048400879,802.0335817337036,665.4523048400879,780.1383266448975,665.4523048400879,758.2430715560913C665.4523048400879,736.3478164672852,665.4523048400879,714.452561378479,665.4523048400879,692.5573062896729C665.4523048400879,670.6620512008667,665.4523048400879,648.7667961120605,665.4523048400879,626.8715410232544C665.4523048400879,604.9762859344482,665.4523048400879,583.0810308456421,665.4523048400879,561.1857757568359C665.4523048400879,539.2905206680298,665.4523048400879,517.3952655792236,665.4523048400879,495.5000104904175C665.4523048400879,473.6047554016113,665.4523048400879,451.7095003128052,665.4523048400879,429.814245223999C665.4523048400879,407.91899013519287,665.4523048400879,386.0237350463867,665.4523048400879,364.12847995758057C665.4523048400879,342.2332248687744,665.4523048400879,320.33796977996826,665.4523048400879,298.4427146911621C665.4523048400879,276.54745960235596,665.4523048400879,254.6522045135498,665.4523048400879,232.75694942474365C665.4523048400879,210.8616943359375,665.4523048400879,188.96643924713135,665.4523048400879,167.0711841583252C665.4523048400879,145.17592906951904,665.4523048400879,123.28067398071289,671.2847288671727,104.99877856084122C677.1171528942574,86.71688314096951,688.782000948427,72.04834739003229,694.614424975512,64.71407951456368L700.4468490025967,57.37981163909507" id="L-I-A-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-I LE-A" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M790.5738487243652,1099.9444694519043L790.5738487243652,1106.275488058726C790.5738487243652,1112.6065066655476,790.5738487243652,1125.2685438791912,798.0580983240944,1137.9305810928345C805.5423479238237,1150.5926183064778,820.510847123282,1163.2546555201213,827.9950967230112,1169.5856741269429L835.4793463227404,1175.9166927337646" id="L-H-J-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-H LE-J" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M883.9148950102674,1175.9166927337646L891.3991446099966,1169.5856741269429C898.8833942097258,1163.2546555201213,913.8518934091841,1150.5926183064778,921.3361430089134,1133.3139721552532C928.8203926086426,1116.0353260040283,928.8203926086426,1094.1400709152222,928.8203926086426,1072.244815826416C928.8203926086426,1050.3495607376099,928.8203926086426,1028.4543056488037,928.8203926086426,1007.7613073984782C928.8203926086426,987.0683091481527,928.8203926086426,967.5775677363077,928.8203926086426,948.0868263244629C928.8203926086426,928.596084912618,928.8203926086426,909.1053435007731,928.8203926086426,888.4123452504476C928.8203926086426,867.7193470001221,928.8203926086426,845.8240919113159,928.8203926086426,823.9288368225098C928.8203926086426,802.0335817337036,928.8203926086426,780.1383266448975,928.8203926086426,758.2430715560913C928.8203926086426,736.3478164672852,928.8203926086426,714.452561378479,928.8203926086426,692.5573062896729C928.8203926086426,670.6620512008667,928.8203926086426,648.7667961120605,928.8203926086426,626.8715410232544C928.8203926086426,604.9762859344482,928.8203926086426,583.0810308456421,928.8203926086426,561.1857757568359C928.8203926086426,539.2905206680298,928.8203926086426,517.3952655792236,928.8203926086426,495.5000104904175C928.8203926086426,473.6047554016113,928.8203926086426,451.7095003128052,928.8203926086426,429.814245223999C928.8203926086426,407.91899013519287,928.8203926086426,386.0237350463867,928.8203926086426,364.12847995758057C928.8203926086426,342.2332248687744,928.8203926086426,320.33796977996826,928.8203926086426,298.4427146911621C928.8203926086426,276.54745960235596,928.8203926086426,254.6522045135498,928.8203926086426,232.75694942474365C928.8203926086426,210.8616943359375,928.8203926086426,188.96643924713135,928.8203926086426,167.0711841583252C928.8203926086426,145.17592906951904,928.8203926086426,123.28067398071289,898.0397848717048,102.7568588054613C867.259177134767,82.23304363020972,805.6979616608916,63.080668368512704,774.9173539239538,53.50448073766419L744.1367461870161,43.92829310681569" id="L-J-A-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-J LE-A" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M790.5738487243652,1044.5451622009277L790.5738487243652,1038.214143594106C790.5738487243652,1031.8831249872844,790.5738487243652,1019.221087773641,790.5738487243652,1003.1446984608968C790.5738487243652,987.0683091481527,790.5738487243652,967.5775677363077,790.5738487243652,948.0868263244629C790.5738487243652,928.596084912618,790.5738487243652,909.1053435007731,790.5738487243652,888.4123452504476C790.5738487243652,867.7193470001221,790.5738487243652,845.8240919113159,790.5738487243652,823.9288368225098C790.5738487243652,802.0335817337036,790.5738487243652,780.1383266448975,790.5738487243652,758.2430715560913C790.5738487243652,736.3478164672852,790.5738487243652,714.452561378479,790.5738487243652,692.5573062896729C790.5738487243652,670.6620512008667,790.5738487243652,648.7667961120605,790.5738487243652,626.8715410232544C790.5738487243652,604.9762859344482,790.5738487243652,583.0810308456421,790.5738487243652,561.1857757568359C790.5738487243652,539.2905206680298,790.5738487243652,517.3952655792236,790.5738487243652,495.5000104904175C790.5738487243652,473.6047554016113,790.5738487243652,451.7095003128052,790.5738487243652,429.814245223999C790.5738487243652,407.91899013519287,790.5738487243652,386.0237350463867,790.5738487243652,364.12847995758057C790.5738487243652,342.2332248687744,790.5738487243652,320.33796977996826,790.5738487243652,298.4427146911621C790.5738487243652,276.54745960235596,790.5738487243652,254.6522045135498,746.7329860490418,233.7765867694716C702.8921233737183,212.90096902539344,615.2103980230714,193.0449886260432,571.369535347748,183.11699842636804L527.5286726724245,173.18900822669295" id="L-H-B-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-H LE-B" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path><path d="M810.6533754603586,1053.1638458031034L818.8273329947161,1045.3963799292524C827.0012905290737,1037.6289140554015,843.3492055977889,1022.0939823076995,851.5231631321464,1004.581145727926C859.6971206665039,987.0683091481527,859.6971206665039,967.5775677363077,859.6971206665039,948.0868263244629C859.6971206665039,928.596084912618,859.6971206665039,909.1053435007731,859.6971206665039,888.4123452504476C859.6971206665039,867.7193470001221,859.6971206665039,845.8240919113159,859.6971206665039,823.9288368225098C859.6971206665039,802.0335817337036,859.6971206665039,780.1383266448975,859.6971206665039,758.2430715560913C859.6971206665039,736.3478164672852,859.6971206665039,714.452561378479,859.6971206665039,692.5573062896729C859.6971206665039,670.6620512008667,859.6971206665039,648.7667961120605,859.6971206665039,626.8715410232544C859.6971206665039,604.9762859344482,859.6971206665039,583.0810308456421,859.6971206665039,561.1857757568359C859.6971206665039,539.2905206680298,859.6971206665039,517.3952655792236,859.6971206665039,495.5000104904175C859.6971206665039,473.6047554016113,859.6971206665039,451.7095003128052,859.6971206665039,429.814245223999C859.6971206665039,407.91899013519287,859.6971206665039,386.0237350463867,859.6971206665039,364.12847995758057C859.6971206665039,342.2332248687744,859.6971206665039,320.33796977996826,859.6971206665039,298.4427146911621C859.6971206665039,276.54745960235596,859.6971206665039,254.6522045135498,859.6971206665039,232.75694942474365C859.6971206665039,210.8616943359375,859.6971206665039,188.96643924713135,859.6971206665039,167.0711841583252C859.6971206665039,145.17592906951904,859.6971206665039,123.28067398071289,840.2189457451453,103.32352148344584C820.7407708237869,83.36636898617878,781.7844209810697,65.34731908045084,762.3062460597112,56.33779412758687L742.8280711383526,47.328269174722884" id="L-H-A-0" class=" edge-thickness-normal edge-pattern-solid flowchart-link LS-H LE-A" style="fill:none;" marker-end="url(#flowchart-pointEnd)"></path></g><g class="edgeLabels"><g class="edgeLabel" transform="translate(365.1571578979492, 101.38541889190674)"><g class="label" transform="translate(-41.11979293823242, -12.986111640930176)"><foreignObject width="82.23958587646484" height="25.97222328186035">
接收到0xA5
</foreignObject></g></g><g class="edgeLabel" transform="translate(209.64931869506836, 232.75694942474365)"><g class="label" transform="translate(-41.11979293823242, -12.986111640930176)"><foreignObject width="82.23958587646484" height="25.97222328186035">
接收到0x5A
</foreignObject></g></g><g class="edgeLabel" transform="translate(604.3325119018555, 167.0711841583252)"><g class="label" transform="translate(-41.11979293823242, -12.986111640930176)"><foreignObject width="82.23958587646484" height="25.97222328186035">
接收到0xA5
</foreignObject></g></g><g class="edgeLabel" transform="translate(535.8646278381348, 101.38541889190674)"><g class="label" transform="translate(-74.23611450195312, -12.986111640930176)"><foreignObject width="148.47222900390625" height="25.97222328186035">
接收到非0x5A非0x5A
</foreignObject></g></g><g class="edgeLabel" transform="translate(209.64931869506836, 364.12847995758057)"><g class="label" transform="translate(-56.0069465637207, -12.986111640930176)"><foreignObject width="112.0138931274414" height="25.97222328186035">
接收到长度字节
</foreignObject></g></g><g class="edgeLabel" transform="translate(124.19792175292969, 495.5000104904175)"><g class="label" transform="translate(-116.19792175292969, -12.986111640930176)"><foreignObject width="232.39584350585938" height="25.97222328186035">
接收到命令字节且长度字节大于0
</foreignObject></g></g><g class="edgeLabel" transform="translate(124.19792175292969, 626.8715410232544)"><g class="label" transform="translate(-60.37327194213867, -12.986111640930176)"><foreignObject width="120.74654388427734" height="25.97222328186035">
接收到n字节数据
</foreignObject></g></g><g class="edgeLabel" transform="translate(295.10071563720703, 561.1857757568359)"><g class="label" transform="translate(-108.20314025878906, -12.986111640930176)"><foreignObject width="216.40628051757812" height="25.97222328186035">
接收到命令字节且长度字节为0
</foreignObject></g></g><g class="edgeLabel" transform="translate(209.64931869506836, 758.2430715560913)"><g class="label" transform="translate(-76.19792175292969, -12.986111640930176)"><foreignObject width="152.39584350585938" height="25.97222328186035">
接收到校验字节高8位
</foreignObject></g></g><g class="edgeLabel" transform="translate(209.64931869506836, 889.6146020889282)"><g class="label" transform="translate(-76.19792175292969, -12.986111640930176)"><foreignObject width="152.39584350585938" height="25.97222328186035">
接收到校验字节低8位
</foreignObject></g></g><g class="edgeLabel" transform="translate(520.4219131469727, 1006.5590505599976)"><g class="label" transform="translate(-32.005210876464844, -12.986111640930176)"><foreignObject width="64.01042175292969" height="25.97222328186035">
校验正确
</foreignObject></g></g><g class="edgeLabel" transform="translate(520.4219131469727, 561.1857757568359)"><g class="label" transform="translate(-97.11805725097656, -12.986111640930176)"><foreignObject width="194.23611450195312" height="25.97222328186035">
校验错误但本次接收为0xA5
</foreignObject></g></g><g class="edgeLabel" transform="translate(665.4523048400879, 495.5000104904175)"><g class="label" transform="translate(-105.12154388427734, -12.986111640930176)"><foreignObject width="210.2430877685547" height="25.97222328186035">
校验错误且本次接收为非0xA5
</foreignObject></g></g><g class="edgeLabel" transform="translate(790.5738487243652, 1137.9305810928345)"><g class="label" transform="translate(-40.60763931274414, -12.986111640930176)"><foreignObject width="81.21527862548828" height="25.97222328186035">
接收到0xFF
</foreignObject></g></g><g class="edgeLabel"><g class="label" transform="translate(0, 0)"><foreignObject width="0" height="0">
</foreignObject></g></g><g class="edgeLabel" transform="translate(790.5738487243652, 626.8715410232544)"><g class="label" transform="translate(-41.11979293823242, -12.986111640930176)"><foreignObject width="82.23958587646484" height="25.97222328186035">
接收到0xA5
</foreignObject></g></g><g class="edgeLabel" transform="translate(859.6971206665039, 561.1857757568359)"><g class="label" transform="translate(-49.12327194213867, -12.986111640930176)"><foreignObject width="98.24654388427734" height="25.97222328186035">
接收到非0xA5
</foreignObject></g></g></g><g class="nodes"><g class="node default default" id="flowchart-A-25384" transform="translate(717.6875438690186, 35.69965362548828)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态0
</foreignObject></g></g><g class="node default default" id="flowchart-B-25385" transform="translate(500.51306533813477, 167.0711841583252)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态1
</foreignObject></g></g><g class="node default default" id="flowchart-C-25386" transform="translate(209.64931869506836, 298.4427146911621)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态2
</foreignObject></g></g><g class="node default default" id="flowchart-D-25387" transform="translate(209.64931869506836, 429.814245223999)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态3
</foreignObject></g></g><g class="node default default" id="flowchart-E-25388" transform="translate(124.19792175292969, 561.1857757568359)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态4
</foreignObject></g></g><g class="node default default" id="flowchart-F-25389" transform="translate(209.64931869506836, 692.5573062896729)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态5
</foreignObject></g></g><g class="node default default" id="flowchart-G-25390" transform="translate(209.64931869506836, 823.9288368225098)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态6
</foreignObject></g></g><g class="node default default" id="flowchart-H-25391" transform="translate(790.5738487243652, 1072.244815826416)"><circle style="" rx="0" ry="0" r="27.69965362548828" width="55.39930725097656" height="40.97222328186035"></circle><g class="label" style="" transform="translate(-20.19965362548828, -12.986111640930176)"><foreignObject width="40.39930725097656" height="25.97222328186035">
状态1
</foreignObject></g></g><g class="node default default" id="flowchart-I-25411" transform="translate(520.4219131469727, 948.0868263244629)"><rect class="basic label-container" style="" rx="0" ry="0" x="-39.505210876464844" y="-20.486111640930176" width="79.01042175292969" height="40.97222328186035"></rect><g class="label" style="" transform="translate(-32.005210876464844, -12.986111640930176)"><foreignObject width="64.01042175292969" height="25.97222328186035">
校验数据
</foreignObject></g></g><g class="node default default" id="flowchart-J-25418" transform="translate(859.6971206665039, 1196.4028053283691)"><rect class="basic label-container" style="" rx="0" ry="0" x="-129.91320037841797" y="-20.486111640930176" width="259.82640075683594" height="40.97222328186035"></rect><g class="label" style="" transform="translate(-122.41320037841797, -12.986111640930176)"><foreignObject width="244.82640075683594" height="25.97222328186035">
接收数据帧成功 调用数据处理函数
</foreignObject></g></g></g></g></g></svg>