mirror of
https://github.com/jwetzell/showbridge-docs.git
synced 2026-09-02 02:38:58 +00:00
format
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
---
|
||||
title: Create OSC Message
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
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**: 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.
|
||||
- **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.
|
||||
|
||||
```yaml
|
||||
@@ -21,4 +23,4 @@ Create an OSC message with the address `/test/message` and two integer arguments
|
||||
address: "/test/message"
|
||||
args: ["{{.Payload[0]}}", "{{.Payload[1]}}"]
|
||||
types: "ii"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Decode OSC Message
|
||||
sidebar:
|
||||
label: Decode
|
||||
order: 3
|
||||
label: Decode
|
||||
order: 3
|
||||
---
|
||||
|
||||
The `osc.message.decode` processor takes a array of bytes and turn it into OSC message if it can be. This processor will return an error if the bytes cannot be parsed as an OSC message
|
||||
|
||||
- **type**: `osc.message.decode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: osc.message.encode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Encode OSC Message
|
||||
sidebar:
|
||||
label: Encode
|
||||
order: 2
|
||||
label: Encode
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `osc.message.encode` processor takes an OSC message and turns it into an array of bytes. This processor will return an error if the OSC message cannot be turned into bytes.
|
||||
|
||||
- **type**: `osc.message.encode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: osc.message.encode
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user