Skip to main content

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.

1kN1 \leq k \leq N

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

import { Program, Output } from "@rtbot-dev/rtbot";

const id = "id";
const numPorts = 2;

const program = new Program();
program.addOperator(new Output(id, numPorts));