mirror of
https://github.com/jwetzell/showbridge-docs.git
synced 2026-05-14 05:24:21 +00:00
fill in basic details for remaining processors/modules
This commit is contained in:
@@ -5,4 +5,11 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
- **type**: `artnet.packet.decode`
|
||||
- **type**: `artnet.packet.decode`
|
||||
|
||||
This processor will decode incoming bytes into an ArtNet packet. This processor will return an error if the message being processed is not an array of bytes.
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: artnet.packet.decode
|
||||
```
|
||||
@@ -5,4 +5,10 @@ sidebar:
|
||||
order: 2
|
||||
---
|
||||
|
||||
- **type**: `artnet.packet.encode`
|
||||
- **type**: `artnet.packet.encode`
|
||||
This processor will encode an ArtNet packet into an array of bytes. This processor will return an error if the message being processed is not an ArtNet packet.
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: artnet.packet.encode
|
||||
```
|
||||
@@ -5,4 +5,10 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
- **type**: `debug.log`
|
||||
- **type**: `debug.log`
|
||||
This processor will log information about the message being processed to the console. This processor does not modify the message in any way and will pass the message through to the next processor in the chain.
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: debug.log
|
||||
```
|
||||
@@ -5,4 +5,12 @@ sidebar:
|
||||
order: 3
|
||||
---
|
||||
|
||||
- **type**: `filter.change`
|
||||
This processor will only pass messages through if the value of the message has changed since the last time a message was processed. This processor is useful for filtering out duplicate messages that may be emitted by a module or processor.
|
||||
|
||||
- **type**: `filter.change`
|
||||
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: filter.change
|
||||
```
|
||||
@@ -5,14 +5,32 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a new FreeD message with the specified parameters.
|
||||
|
||||
- **type**: `free.d.create`
|
||||
- **params**:
|
||||
- **id**
|
||||
- **pan**
|
||||
- **tilt**
|
||||
- **roll**
|
||||
- **posX**
|
||||
- **posY**
|
||||
- **posZ**
|
||||
- **zoom**
|
||||
- **focus**
|
||||
- **id**: the ID to set for the FreeD message
|
||||
- **pan**: the pan value to set for the FreeD message
|
||||
- **tilt**: the tilt value to set for the FreeD message
|
||||
- **roll**: the roll value to set for the FreeD message
|
||||
- **posX**: the X position value to set for the FreeD message
|
||||
- **posY**: the Y position value to set for the FreeD message
|
||||
- **posZ**: the Z position value to set for the FreeD message
|
||||
- **zoom**: the zoom value to set for the FreeD message
|
||||
- **focus**: the focus value to set for the FreeD message
|
||||
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: free.d.create
|
||||
params:
|
||||
id: "1"
|
||||
pan: "45"
|
||||
tilt: "30"
|
||||
roll: "0"
|
||||
posX: "10"
|
||||
posY: "5"
|
||||
posZ: "15"
|
||||
zoom: "2"
|
||||
focus: "1"
|
||||
```
|
||||
@@ -5,4 +5,11 @@ sidebar:
|
||||
order: 3
|
||||
---
|
||||
|
||||
- **type**: `free.d.decode`
|
||||
This processor will decode incoming bytes into a FreeD message. This processor will return an error if the message being processed is not an array of bytes.
|
||||
|
||||
- **type**: `free.d.decode`
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: free.d.decode
|
||||
```
|
||||
@@ -5,4 +5,11 @@ sidebar:
|
||||
order: 2
|
||||
---
|
||||
|
||||
- **type**: `free.d.encode`
|
||||
This processor will encode a FreeD message into an array of bytes. This processor will return an error if the message being processed is not a FreeD message.
|
||||
|
||||
- **type**: `free.d.encode`
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: free.d.encode
|
||||
```
|
||||
@@ -5,7 +5,19 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
This process will make an HTTP request to the specified URL using the specified method. The response will be passed through to the next processor in the chain. This processor will return an error if the request fails for any reason (e.g. network error, invalid URL, etc.).
|
||||
|
||||
- **type**: `http.request.do`
|
||||
- **params**:
|
||||
- **method**
|
||||
- **url**
|
||||
- **method**: the HTTP method to use for the request (e.g. `GET`, `POST`, `PUT`, etc.)
|
||||
- **url**: the URL to send the request to
|
||||
|
||||
|
||||
### Example
|
||||
Make a GET request to `https://example.com`
|
||||
```
|
||||
- type: http.request.do
|
||||
params:
|
||||
method: GET
|
||||
url: https://example.com
|
||||
```
|
||||
@@ -5,7 +5,18 @@ sidebar:
|
||||
order: 2
|
||||
---
|
||||
|
||||
This processor will create a new HTTP response with the specified status code and body template. The created response will be passed through to the next processor in the chain. If the response is subsequently sent to an HTTP server module using the [router.output](../router/output.md) processor, the status code and body template set by this processor will be used for the response sent to the client. This processor will return an error if there is an issue executing the body template.
|
||||
|
||||
- **type**: `http.response.create`
|
||||
- **params**:
|
||||
- **status**
|
||||
- **body**
|
||||
- **status**: the HTTP status code to set for the response (e.g. `200`, `404`, etc.)
|
||||
- **body**: the body template to set for the response
|
||||
|
||||
### Example
|
||||
This would create an HTTP response with a status code of `200` and a body of `OK`
|
||||
```
|
||||
- type: http.response.create
|
||||
params:
|
||||
status: 200
|
||||
body: "OK"
|
||||
```
|
||||
@@ -5,9 +5,22 @@ sidebar:
|
||||
order: 3
|
||||
---
|
||||
|
||||
This processor will scale an integer value from one range to another. This processor will return an error if the message being processed is not an integer or if the parameters are not valid (e.g. if `inMin` is greater than or equal to `inMax`, etc.).
|
||||
|
||||
- **type**: `int.scale`
|
||||
- **params**:
|
||||
- **inMin**
|
||||
- **inMax**
|
||||
- **outMin**
|
||||
- **outMax**
|
||||
- **inMin**: the minimum value of the input range
|
||||
- **inMax**: the maximum value of the input range
|
||||
- **outMin**: the minimum value of the output range
|
||||
- **outMax**: the maximum value of the output range
|
||||
|
||||
### Example
|
||||
Scale an integer value from the range 0-255 to the range 0-100
|
||||
```
|
||||
- type: int.scale
|
||||
params:
|
||||
inMin: 0
|
||||
inMax: 255
|
||||
outMin: 0
|
||||
outMax: 100
|
||||
```
|
||||
@@ -4,5 +4,10 @@ sidebar:
|
||||
label: Decode
|
||||
order: 2
|
||||
---
|
||||
Convert an incoming byte array or raw string into a JSON object. This processor will return an error if the message being processed is not an array of bytes or a raw string, or if the bytes/string cannot be parsed as JSON.
|
||||
- **type**: `json.decode`
|
||||
|
||||
- **type**: `json.decode`
|
||||
### Example
|
||||
```
|
||||
- type: json.decode
|
||||
```
|
||||
@@ -5,4 +5,12 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
- **type**: `json.decode`
|
||||
This processor will encode an incoming object into a JSON byte array. This processor will return an error if the message being processed is not able to be serialized as JSON.
|
||||
|
||||
- **type**: `json.encode`
|
||||
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: json.encode
|
||||
```
|
||||
|
||||
@@ -4,5 +4,11 @@ sidebar:
|
||||
label: Decode
|
||||
order: 3
|
||||
---
|
||||
This processor will decode incoming bytes into a MIDI message. This processor will return an error if the message being processed is not an array of bytes.
|
||||
|
||||
- **type**: `midi.message.decode`
|
||||
- **type**: `midi.message.decode`
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: midi.message.decode
|
||||
```
|
||||
|
||||
@@ -4,5 +4,11 @@ sidebar:
|
||||
label: Encode
|
||||
order: 2
|
||||
---
|
||||
This processor will encode a MIDI message into an array of bytes. This processor will return an error if the message being processed is not a MIDI message.
|
||||
|
||||
- **type**: `midi.message.encode`
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: midi.message.encode
|
||||
```
|
||||
@@ -4,5 +4,11 @@ sidebar:
|
||||
label: Unpack
|
||||
order: 4
|
||||
---
|
||||
This processor will unpack a MIDI message into its individual components. This processor will return an error if the message being processed is not a MIDI message.
|
||||
|
||||
- **type**: `midi.message.unpack`
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: midi.message.unpack
|
||||
```
|
||||
@@ -3,10 +3,21 @@ title: Create MQTT Message
|
||||
sidebar:
|
||||
order: 1
|
||||
---
|
||||
This processor will create an MQTT message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type.
|
||||
|
||||
- **type**: `mqtt.message.create`
|
||||
- **params**:
|
||||
- **topic**
|
||||
- **qos**
|
||||
- **retained**
|
||||
- **payload**
|
||||
- **topic**: the topic to publish the message to.
|
||||
- **qos**: the QoS level of the message.
|
||||
- **retained**: whether the message should be retained by the broker.
|
||||
- **payload**: the payload of the message. This can be a string or a byte array.
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: mqtt.message.create
|
||||
params:
|
||||
topic: "test/topic"
|
||||
qos: 1
|
||||
retained: false
|
||||
payload: "Hello, World!"
|
||||
```
|
||||
@@ -5,7 +5,16 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a NATS message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type.
|
||||
- **type**: `nats.message.create`
|
||||
- **params**:
|
||||
- **subject**
|
||||
- **payload**
|
||||
- **subject**: the subject to publish the message to.
|
||||
- **payload**: the payload of the message.
|
||||
|
||||
### Example
|
||||
```
|
||||
- type: nats.message.create
|
||||
params:
|
||||
subject: "events"
|
||||
payload: "Hello, World!"
|
||||
```
|
||||
@@ -4,9 +4,21 @@ sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
This processor will create an OSC message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. The address parameter is required, while the args and types parameters are optional. However, if args are provided, then types must also be provided and must match the amount of args provided.
|
||||
|
||||
- **type**: `osc.message.create`
|
||||
- **params**:
|
||||
- **address**
|
||||
- **args**
|
||||
- **types**
|
||||
- **address**: the address of the OSC message.
|
||||
- **args**: (optional) array of string templates for each argument.
|
||||
- **types**: (optional) a single string with the of each arg in order. This is required if args are provided.
|
||||
|
||||
### Example
|
||||
Create an OSC message with the address `/test/message` and two integer arguments from the payload of the message being processed.
|
||||
|
||||
```
|
||||
- type: osc.message.create
|
||||
params:
|
||||
address: "/test/message"
|
||||
args: ["{{.Payload[0]}}", "{{.Payload[1]}}"]
|
||||
types: "ii"
|
||||
```
|
||||
@@ -9,6 +9,8 @@ The `router.output` processor takes any payload and outputs to the specified mod
|
||||
- **type**: `router.output`
|
||||
- **params**:
|
||||
- **module**: the id of the [module](/concepts/modules) to output to.
|
||||
|
||||
|
||||
### Example
|
||||
Output to the `osc-out` module.
|
||||
```
|
||||
|
||||
@@ -4,7 +4,15 @@ sidebar:
|
||||
label: Expr
|
||||
order: 2
|
||||
---
|
||||
|
||||
The processor will execute the provided Expr expression and return the result as the new payload. This processor will return an error if the expression cannot be executed or if there is an error during execution. The expression will have access to the [wrapped payload](/concepts/payloads).
|
||||
- **type**: `script.expr`
|
||||
- **params**:
|
||||
- **expression**
|
||||
- **expression**: the Expr expressiont to execute.
|
||||
|
||||
### Example
|
||||
This example will add 1 to the wrapped payload.
|
||||
```
|
||||
- type: script.expr
|
||||
params:
|
||||
expression: "Payload + 1"
|
||||
```
|
||||
@@ -4,9 +4,19 @@ sidebar:
|
||||
label: WASM
|
||||
order: 3
|
||||
---
|
||||
This processor will load and execute a WASM plugin using the [Extism](https://extism.org/) runtime. The processor will execute the specified function in the WASM plugin and return the result as the new payload. This processor will return an error if the plugin cannot be loaded, if the function cannot be executed, or if there is an error during execution. The incoming payload will be passed as the argument to the WASM function. If the plugin is successfully executed, the result of the function will be returned as the new payload.
|
||||
|
||||
- **type**: `script.wasm`
|
||||
- **params**:
|
||||
- **path**
|
||||
- **function**
|
||||
- **enableWasi**
|
||||
- **path**: the path to the WASM plugin to load.
|
||||
- **function**: (optional) the function to execute in the WASM plugin defaults to `process`
|
||||
- **enableWasi**: (optional) whether to enable WASI for the plugin defaults to `false`
|
||||
|
||||
### Example
|
||||
This example will load the plugin at `./test.wasm` and execute the `test` function
|
||||
```
|
||||
- type: script.wasm
|
||||
params:
|
||||
path: "./test.wasm"
|
||||
function: "test"
|
||||
```
|
||||
@@ -4,9 +4,20 @@ sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
This processor will create a SIP response message with an audio file as the payload. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the audio file included in the response.
|
||||
|
||||
- **type**: `sip.response.audio.create`
|
||||
- **params**:
|
||||
- **preWait**
|
||||
- **audioFile**
|
||||
- **postWait**
|
||||
- **preWait**: the amount of time in milliseconds to wait before sending the response
|
||||
- **audioFile**: the path to the audio file to include in the response
|
||||
- **postWait**: the amount of time in milliseconds to wait after sending the response
|
||||
|
||||
### Example
|
||||
This example will create a SIP response that will wait 1 second then play `response.wav` then wait another second before completing the response.
|
||||
```
|
||||
- type: sip.response.audio.create
|
||||
params:
|
||||
preWait: 1000
|
||||
audioFile: "response.wav"
|
||||
postWait: 1000
|
||||
```
|
||||
@@ -4,9 +4,20 @@ sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
This processor will create a SIP DTMF response from the provided parameters. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the DTMF tones specified.
|
||||
|
||||
- **type**: `sip.response.dtmf.create`
|
||||
- **params**:
|
||||
- **preWait**
|
||||
- **digits**
|
||||
- **postWait**
|
||||
- **preWait**: the amount of time in milliseconds to wait before sending the response
|
||||
- **digits**: the DTMF digits to include in the response
|
||||
- **postWait**: the amount of time in milliseconds to wait after sending the response
|
||||
|
||||
### Example
|
||||
This example will create a SIP response that will wait 1 second then play the DTMF digits "1234" then wait another second before completing the response.
|
||||
```
|
||||
- type: sip.response.dtmf.create
|
||||
params:
|
||||
preWait: 1000
|
||||
digits: "1234"
|
||||
postWait: 1000
|
||||
```
|
||||
Reference in New Issue
Block a user