Skip to main content

EqualTo

Inputs: i1
Outputs: o1

Emits only the messages received with a value equal to the provided number otherwise it emits an empty message {}.

The EqualTo operator does not hold a message buffer on i1, so it emits the message through o1 right after it receives a message on i1 but only if the received message value is equal to the provided number otherwise it emits an empty message {}.

Parameters

id: The id of the operator

value: The reference value

Usage

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

const id = "id";
const value = 1;

const program = new Program();
program.addOperator(new EqualTo(id, value));