NMEA0138 - a graphviz designThe version here is crafted so it can be tested on an Arduino Should be easy portable Jens byteStuff on Ard no 1UDEN GARANTI /Jens digraph finite_state_machine { fontname="Helvetica,Arial,sans-serif" node [fontname="Helvetica,Arial,sans-serif"] edge [fontname="Helvetica,Arial,sans-serif"] rankdir=LR; # draw from left to right as main orientation node [shape = doublecircle]; start ; node [shape = circle]; start -> look4dollar[label = ""]; look4dollar->look4dollar[label= "rdByte: != $ ?"] look4dollar->read5capitals[label="rdByte: = $ :-)"]; read5capitals->read5capitals[label="rdByte: less than 5 read?"]; read5capitals->isItANmeatCmd[label="rdByte: 5 read !"]; isItANmeatCmd->resetRd[label="not GPGGA"]; isItANmeatCmd-> rdUntilEnd[label="yes GPGGA "]; resetRd-> start[label="next telegram"]; rdUntilEnd->rdUntilEnd[label="rdByte: != LF(0x0D)"]; rdUntilEnd->decodeBody[label="rdByte: == LF(0x0D)"]; decodeBody->dumpBody[label="show us pkg"]; dumpBody->resetRd[label="prep 4 next msg"]; } http://vis-js.com https://viz-js.com/ digraph finite_state_machine { fontname="Helvetica,Arial,sans-serif" node [fontname="Helvetica,Arial,sans-serif"] edge [fontname="Helvetica,Arial,sans-serif"] rankdir=LR; node [shape = doublecircle]; start gotTlg; node [shape = circle]; start -> start[label = "!= ["]; start-> rcvTlg [label = "!=]"]; rcvTlg-> rcvTlg [label = "!=[ and !=]"]; rcvTlg-> gotTlg [label = "=]"]; rcvTlg-> start [label = "=["]; gotTlg->start[label = "next tlg"]; } digraph finite_state_machine { fontname="Helvetica,Arial,sans-serif" node [fontname="Helvetica,Arial,sans-serif"] edge [fontname="Helvetica,Arial,sans-serif"] rankdir=LR; node [shape = doublecircle]; msg2Snd; node [shape = circle]; msg2Snd->start[label = "no action"] start -> txMsg[label = "tx: '['"]; txMsg -> txMsgB[label="more2snd"]; txMsgB->txMsg[label="tx MsgByte"] txMsg -> start[label="txMsgDone, tx: ']'"]; } Satellite systemsas for nowPrefix GP means it is a GPS package- $GPGGA
Some links
|