Skip to main content

Or

Inputs: i1 i2
Outputs: o1

Synchronizes two streams (given by i1 and i2) and emits the logical disjunction of the values for a given tnt_n.

The synchronization mechanism is inherited from the Join operator. The Or operator holds a message buffer on i1 and i2 respectively, it emits a modified version of the synchronized messages from i1 and i2 as the logical disjunction of its values through o1 right after the synchronization takes place, if no synchronization occurs then an empty message {} is emitted through o1.

y(tn)=x1(tn)x2(tn)y(t_n)=x_1(t_n) \lor x_2(t_n)

Parameters

id: The id of the operator

Usage

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

const id = "id";

const program = new Program();
program.addOperator(new Or(id));