From a20e732314cb1b30c6f232ff2f2ea734387450bc Mon Sep 17 00:00:00 2001 From: gabbapeople Date: Thu, 13 Sep 2018 12:54:11 +0300 Subject: [PATCH 1/2] feat: add XEN-L005 (xod/core additions) --- XEN-L005/README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 XEN-L005/README.md diff --git a/XEN-L005/README.md b/XEN-L005/README.md new file mode 100644 index 0000000..5ca73f0 --- /dev/null +++ b/XEN-L005/README.md @@ -0,0 +1,41 @@ +# XEN-L005: Nodes addition + +Specific useful nodes were created during the creation of the "uart-example" guide. Suggest to add them into the `xod-core` library. + +## List of nodes + +### throttle + +Slows down a pulse frequency. Passes a pulse through no more than once every T seconds + +- [in] :: Pulse +- [in] T :: Number = 0 — A time between pulses in seconds + +- [out] :: Pulse + +### parse-number + +Transforms a string into a number + +- [in] :: String + +- [out] :: Number + +### parse-tabular + +Splits the incoming string line into parts depending on delimiter character. Outputs the specified part of string line + +- [in] STR :: String - A string line to parse +- [in] D :: Byte - A delimiter character +- [in] IDX :: Number - A part number of the string line to output. The numbering starts with 0 + +- [out] :: String - A parsed part of a string line + +### round-fraction + +Rounds value to decimal places + +- [in] :: Number +- [in] DIG :: Number - Digits after dot + +- [out] :: Number From 07cb7d67eca4fa39ea5b35f5bc289d0e93bad440 Mon Sep 17 00:00:00 2001 From: gabbapeople Date: Thu, 13 Sep 2018 13:31:51 +0300 Subject: [PATCH 2/2] feat: add XEN-L006 (xod/uart additions) --- XEN-L005/README.md | 41 ----------------------------------------- XEN-L006/README.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 41 deletions(-) delete mode 100644 XEN-L005/README.md create mode 100644 XEN-L006/README.md diff --git a/XEN-L005/README.md b/XEN-L005/README.md deleted file mode 100644 index 5ca73f0..0000000 --- a/XEN-L005/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# XEN-L005: Nodes addition - -Specific useful nodes were created during the creation of the "uart-example" guide. Suggest to add them into the `xod-core` library. - -## List of nodes - -### throttle - -Slows down a pulse frequency. Passes a pulse through no more than once every T seconds - -- [in] :: Pulse -- [in] T :: Number = 0 — A time between pulses in seconds - -- [out] :: Pulse - -### parse-number - -Transforms a string into a number - -- [in] :: String - -- [out] :: Number - -### parse-tabular - -Splits the incoming string line into parts depending on delimiter character. Outputs the specified part of string line - -- [in] STR :: String - A string line to parse -- [in] D :: Byte - A delimiter character -- [in] IDX :: Number - A part number of the string line to output. The numbering starts with 0 - -- [out] :: String - A parsed part of a string line - -### round-fraction - -Rounds value to decimal places - -- [in] :: Number -- [in] DIG :: Number - Digits after dot - -- [out] :: Number diff --git a/XEN-L006/README.md b/XEN-L006/README.md new file mode 100644 index 0000000..17dfc75 --- /dev/null +++ b/XEN-L006/README.md @@ -0,0 +1,35 @@ +# XEN-L006: Nodes addition + +The `xod/uart` library has the `print` node. This node "Writes a string bytes per byte into UART.". Also `print` writes bytes for the `\r`, `\n` escape sequences. Obviously the `read` node should be added to the `xod/uart` library. + +On a pulse or true/false bool state, the `read` node should output accumulated string or a group of strings from a UART byte stream. + +## List of nodes + +### accumulate-line + +Utility? +The target library is under consideration + +Accumulates a string from a stream of characters by appending each new character to the end of the string until the end of the line escape sequence if found. Drops the carriage return escape sequence if it is found + +- [in] CHAR :: Byte - A new character to be pushed to the end of the string line +- [in] PUSH :: Pulse - Push new character +- [in] RST :: Pulse - Empty the accumulated string line and start over + +- [out] LINE :: String - Accumulated line +- [out] LINE :: Pulse - Fires on a new accumulated line + +### read + +`xod/uart` + +Streams string lines from UART + +- [in] UART :: uart - An UART object +- [in] READ :: Pulse - Triggers read of a string line ??? +- [in] READ :: Bool - The true value turns on the stream of the string lines ??? + +- [out] LINE :: String - String line that is read ??? +- [OUT] UPD :: Pulse - Fires if a new line is read ??? +