Output
Inputs: i1...iN defined by numPorts
Outputs: o1...oN defined by numPorts
The Output operator is used to push data out of the program.
It is considered good practice to collect all resulting streams in an Output operator. The Output operator
does not hold a message buffer on any of the ports defined, so it forwards the received messages on the port
ik through the port ok right after.
The received messages are not buffered therefore it has a little footprint on the calculation process.
Parameters
id: The id of the operator
numPorts: The number of ports. Default value: 1. Minimum value: 1.
Usage
- TypeScript
- Python
- C++
- YAML
- Json
import { Program, Output } from "@rtbot-dev/rtbot";
const id = "id";
const numPorts = 2;
const program = new Program();
program.addOperator(new Output(id, numPorts));
import rtbot as rb
id = "id";
numPorts = 2;
program = rb.Program()
program.addOperator(rb.Output(id, numPorts))
#include "rtbot/Output.h"
auto id = "id";
auto numPorts = 2;
auto op = Output<std::uint64_t, double>(id, numPorts)
# minimal RtBot program
operators:
- type: Output
id: "id"
numPorts: 2
{
"operators": [
{ "type": "Output", "id": "id", "numPorts": 2 }
]
}