Skip to main content

Constant

Inputs: i1
Outputs: o1

Emits the same value regardless the time field of the message received on i1.

The Constant operator does not hold a message buffer on i1, so it emits a message with a constant value field through o1 right after it receives a message on i1.

y(tn)=Cy(t_n)=C.

Parameters

id: The id of the operator

value: The constant to emit when required.

Usage

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

const id = "id";
const value = 3.14;

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