From: bernie Date: Thu, 18 May 2006 02:35:59 +0000 (+0000) Subject: Move PROTOCOL to doc/PROTOCOL. X-Git-Tag: 1.0.0~623 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=595dcb7a4077a8da1dec532894177b870a1102fd;p=bertos.git Move PROTOCOL to doc/PROTOCOL. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@618 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/triface/PROTOCOL b/app/triface/PROTOCOL deleted file mode 100755 index d4dbee74..00000000 --- a/app/triface/PROTOCOL +++ /dev/null @@ -1,84 +0,0 @@ - -Command format: - - ... - -Where: - command - alphanurmeric command name - argN - numeric argument (unsigned base 10, 0-65535) - -Positive response format: - - 0... - -Where: - argN - numeric value (unsigned base 10, 0-65535) - -Negative response format: - - -N"" - -Where: - -N - numeric error code (negative number) - desc - verbose error description - -# Write digital outputs (masked) -> dout 120 240 -< 0 - -# Read digital inputs -> din -< 0 125 - -# Read analog inputs -> ain -< 0 32 121 35 31 - -# Wait specified amount of milliseconds -> sleep 300 -< 0 - -# Return firmware major version, minor version and revision -> vers -< 0 1 42 0 - -# Reset board -< reset -> 0 - -# Ping/nop -< ping -> 0 - -# NOP (empty command) -> -< (ignored) - -# Comments -> # foo bar foobar -< (ignored) - -# Unknown command -> sing -< -1 "Unknown command" - -# Missing parameter -> dout -< -2 "Required parameter missing" - -# Too many parameters -> din 42 666 -< -3 "Too many parameters" - -# Malformed command -> dout %'I! -< -4 "Invalid parameter" - -# Attention -> or -< 1 "Uh?" - - -To recover from a possibly unknown board status, -a client should begin the conversation by issuing -an attention sequence, eventually followed by a reset. diff --git a/app/triface/doc/PROTOCOL b/app/triface/doc/PROTOCOL new file mode 100755 index 00000000..d4dbee74 --- /dev/null +++ b/app/triface/doc/PROTOCOL @@ -0,0 +1,84 @@ + +Command format: + + ... + +Where: + command - alphanurmeric command name + argN - numeric argument (unsigned base 10, 0-65535) + +Positive response format: + + 0... + +Where: + argN - numeric value (unsigned base 10, 0-65535) + +Negative response format: + + -N"" + +Where: + -N - numeric error code (negative number) + desc - verbose error description + +# Write digital outputs (masked) +> dout 120 240 +< 0 + +# Read digital inputs +> din +< 0 125 + +# Read analog inputs +> ain +< 0 32 121 35 31 + +# Wait specified amount of milliseconds +> sleep 300 +< 0 + +# Return firmware major version, minor version and revision +> vers +< 0 1 42 0 + +# Reset board +< reset +> 0 + +# Ping/nop +< ping +> 0 + +# NOP (empty command) +> +< (ignored) + +# Comments +> # foo bar foobar +< (ignored) + +# Unknown command +> sing +< -1 "Unknown command" + +# Missing parameter +> dout +< -2 "Required parameter missing" + +# Too many parameters +> din 42 666 +< -3 "Too many parameters" + +# Malformed command +> dout %'I! +< -4 "Invalid parameter" + +# Attention +> or +< 1 "Uh?" + + +To recover from a possibly unknown board status, +a client should begin the conversation by issuing +an attention sequence, eventually followed by a reset.