-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add diagram for the entire state machine
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// vim:ai:et:fenc=utf-8:ff=unix:sw=4:ts=4: | ||
|
||
digraph | ||
{ | ||
"SET RETRY_COUNT=0" -> "TRANSMIT PACKET"; | ||
"TRANSMIT PACKET" -> "WAIT FOR HEADER"; | ||
"WAIT FOR HEADER" -> "ERROR" [label="timeout"]; | ||
"WAIT FOR HEADER" -> "VALID HEADER?" [label="receive byte"]; | ||
"VALID HEADER?" [shape=diamond]; | ||
"VALID HEADER?" -> "ERROR" [label="no"]; | ||
"VALID HEADER?" -> "WAIT FOR LENGTH" [label="yes"]; | ||
"WAIT FOR LENGTH" -> "ERROR" [label="timeout"]; | ||
"WAIT FOR LENGTH" -> "VALID LENGTH?" [label="receive byte"]; | ||
"VALID LENGTH?" [shape=diamond]; | ||
"VALID LENGTH?" -> "ERROR" [label="no"]; | ||
"VALID LENGTH?" -> "WAIT FOR DATA" [label="yes"]; | ||
"WAIT FOR DATA" -> "ERROR" [label="timeout"]; | ||
"WAIT FOR DATA" -> "ENOUGH DATA?" [label="receive byte"]; | ||
"ENOUGH DATA?" [shape=diamond]; | ||
"ENOUGH DATA?" -> "WAIT FOR DATA" [label="no"]; | ||
"ENOUGH DATA?" -> "WAIT FOR CRC" [label="yes"]; | ||
"WAIT FOR CRC" -> "ERROR" [label="timeout"]; | ||
"WAIT FOR CRC" -> "CALCULATE CRC" [label="receive byte"]; | ||
"CALCULATE CRC" -> "VALID CRC?"; | ||
"VALID CRC?" [shape=diamond]; | ||
"VALID CRC?" -> "ERROR" [label="no"]; | ||
"VALID CRC?" -> "EXTRACT PAYLOAD" [label="yes"]; | ||
"ERROR" -> "INCREMENT RETRY_COUNT"; | ||
"INCREMENT RETRY_COUNT" -> "RETRY_COUNT > 4?"; | ||
"RETRY_COUNT > 4?" -> "FAILURE" [label="yes"]; | ||
"RETRY_COUNT > 4?" -> "TRANSMIT PACKET" [label="no"]; | ||
"EXTRACT PAYLOAD" -> "RESPONSE CODE OK?"; | ||
"RESPONSE CODE OK?" [shape=diamond]; | ||
"RESPONSE CODE OK?" -> "ERROR" [label="no"]; | ||
"RESPONSE CODE OK?" -> "SUCCESS" [label="yes"]; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.