From ffbd71799311a85279c568e341f5b62e8c94abc1 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Sun, 8 Feb 2026 15:16:49 -0600 Subject: [PATCH] add more processor documentation --- astro.config.mjs | 20 ++++++++++++++++++++ package-lock.json | 10 ++++++++++ src/content/docs/processors/float/parse.md | 18 ++++++++++++++++++ src/content/docs/processors/int/parse.md | 19 +++++++++++++++++++ src/content/docs/processors/int/random.md | 20 ++++++++++++++++++++ src/content/docs/processors/time/sleep.md | 18 ++++++++++++++++++ src/content/docs/processors/uint/parse.md | 19 +++++++++++++++++++ src/content/docs/processors/uint/random.md | 20 ++++++++++++++++++++ 8 files changed, 144 insertions(+) create mode 100644 src/content/docs/processors/float/parse.md create mode 100644 src/content/docs/processors/int/parse.md create mode 100644 src/content/docs/processors/int/random.md create mode 100644 src/content/docs/processors/time/sleep.md create mode 100644 src/content/docs/processors/uint/parse.md create mode 100644 src/content/docs/processors/uint/random.md diff --git a/astro.config.mjs b/astro.config.mjs index 42b9189..d075871 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -65,6 +65,16 @@ export default defineConfig({ { label: 'Processors', items: [ + { + label: "Int", + collapsed: true, + autogenerate: { directory: 'processors/int' } + }, + { + label: "Float", + collapsed: true, + autogenerate: { directory: 'processors/float' } + }, { label: "OSC", collapsed: true, @@ -86,6 +96,16 @@ export default defineConfig({ collapsed: true, autogenerate: { directory: 'processors/script' } }, + { + label: "Time", + collapsed: true, + autogenerate: { directory: 'processors/time' } + }, + { + label: "Uint", + collapsed: true, + autogenerate: { directory: 'processors/uint' } + } ] }, { diff --git a/package-lock.json b/package-lock.json index b323378..eaabf23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2164,6 +2164,7 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2187,6 +2188,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -2362,6 +2364,7 @@ "integrity": "sha512-oD3tlxTaVWGq/Wfbqk6gxzVRz98xa/rYlpe+gU2jXJMSD01k6sEDL01ZlT8mVSYB/rMgnvIOfiQQ3BbLdN237A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@astrojs/compiler": "^2.13.0", "@astrojs/internal-helpers": "0.7.5", @@ -5876,6 +5879,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", @@ -5931,6 +5935,7 @@ "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -6444,6 +6449,7 @@ "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -6880,6 +6886,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7276,6 +7283,7 @@ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -7693,6 +7701,7 @@ "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", "dev": true, "license": "ISC", + "peer": true, "bin": { "yaml": "bin.mjs" }, @@ -7846,6 +7855,7 @@ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/src/content/docs/processors/float/parse.md b/src/content/docs/processors/float/parse.md new file mode 100644 index 0000000..33f6ca1 --- /dev/null +++ b/src/content/docs/processors/float/parse.md @@ -0,0 +1,18 @@ +--- +title: Float Parse +sidebar: + order: 1 +--- +The `float.parse` processor takes a string and parses it as a float with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into a float. + +- **type**: `float.parse` +- **params**: + - **bitSize**: (optional) the bit size of the float to parse, defaults to 64 + +### Example +This would parse the string payload as a 32 bit float and set the payload to that value. +``` +- type: float.parse + params: + bitSize: 32 +``` \ No newline at end of file diff --git a/src/content/docs/processors/int/parse.md b/src/content/docs/processors/int/parse.md new file mode 100644 index 0000000..4eeb3fb --- /dev/null +++ b/src/content/docs/processors/int/parse.md @@ -0,0 +1,19 @@ +--- +title: Int Parse +sidebar: + order: 1 +--- +The `int.parse` processor takes a string and parses it as an integer with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into an integer. + +- **type**: `int.parse` +- **params**: + - **base**: (optional) the base to use for parsing the integer, defaults to 10 + - **bitSize**: (optional) the bit size of the integer to parse, defaults to 64 + +### Example +This would parse the string payload as a 32 bit, base 10 integer and set the payload to that value. +``` +- type: int.parse + params: + bitSize: 32 +``` \ No newline at end of file diff --git a/src/content/docs/processors/int/random.md b/src/content/docs/processors/int/random.md new file mode 100644 index 0000000..2caac5b --- /dev/null +++ b/src/content/docs/processors/int/random.md @@ -0,0 +1,20 @@ +--- +title: Int Random +sidebar: + order: 2 +--- +The `int.random` processor will set the payload to a random integer between the specified `min` and `max` value. The minimum and maximum values are inclusive. + +- **type**: `int.random` +- **params**: + - **min**: the minimum value for the random integer. + - **max**: the maximum value for the random integer. + +### Example +This would generate a random integer between -127 and 127 and set the payload to that value. +``` +- type: int.random + params: + min: -127 + max: 127 +``` \ No newline at end of file diff --git a/src/content/docs/processors/time/sleep.md b/src/content/docs/processors/time/sleep.md new file mode 100644 index 0000000..239380e --- /dev/null +++ b/src/content/docs/processors/time/sleep.md @@ -0,0 +1,18 @@ +--- +title: Sleep +sidebar: + order: 1 +--- +The `time.sleep` processor will sleep for the specified `duration` in milliseconds before passing the message to the next processor. + +- **type**: `time.sleep` +- **params**: + - **duration**: the duration to sleep in milliseconds + +### Example +This would sleep for 5 seconds before passing the message to the next processor. +``` +- type: time.sleep + params: + duration: 5000 +``` \ No newline at end of file diff --git a/src/content/docs/processors/uint/parse.md b/src/content/docs/processors/uint/parse.md new file mode 100644 index 0000000..5a65982 --- /dev/null +++ b/src/content/docs/processors/uint/parse.md @@ -0,0 +1,19 @@ +--- +title: Uint Parse +sidebar: + order: 1 +--- +The `uint.parse` processor takes a string and parses it as an unsigned integer with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into an unsigned integer. + +- **type**: `uint.parse` +- **params**: + - **base**: (optional) the base to use for parsing the unsigned integer, defaults to 10 + - **bitSize**: (optional) the bit size of the unsigned integer to parse, defaults to 64 + +### Example +This would parse the string payload as a 32 bit, base 10 unsigned integer and set the payload to that value. +``` +- type: uint.parse + params: + bitSize: 32 +``` \ No newline at end of file diff --git a/src/content/docs/processors/uint/random.md b/src/content/docs/processors/uint/random.md new file mode 100644 index 0000000..97e227d --- /dev/null +++ b/src/content/docs/processors/uint/random.md @@ -0,0 +1,20 @@ +--- +title: Uint Random +sidebar: + order: 2 +--- +The `uint.random` processor will set the payload to a random unsigned integer between the specified `min` and `max` value. The minimum and maximum values are inclusive. + +- **type**: `uint.random` +- **params**: + - **min**: the minimum value for the random unsigned integer. + - **max**: the maximum value for the random unsigned integer. + +### Example +This would generate a random unsigned integer between 0 and 127 and set the payload to that value. +``` +- type: uint.random + params: + min: 0 + max: 127 +``` \ No newline at end of file