Skip to main content

Add

Inputs: i1
Outputs: o1

Adds a specified constant (value) to each message value it receives on i1 regardless the time field of the message.

The Add operator does not hold a message buffer on i1, so it emits a modified version of the message through o1 right after it receives a message on i1.

y(tn)=x(tn)+Cy(t_n)= x(t_n) + C

Parameters

id: The id of the operator

value: The constant to add to the incoming messages.

Usage

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

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

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