GreaterThan
Inputs: i1
Outputs: o1
Emits only the messages received with a value greater than the provided number otherwise it emits an empty message {}.
The GreaterThan
operator does not hold a message buffer on i1
, so it emits a the message through o1
right after it receives a message on i1
but only if the received message value is greater than the provided number otherwise it emits an empty message {}.
Parameters
id: The id of the operator
value: The reference value
Usage
- TypeScript
- Python
- C++
- YAML
- Json
import { Program, GreaterThan } from "@rtbot-dev/rtbot";
const id = "id";
const value = 1;
const program = new Program();
program.addOperator(new GreaterThan(id, value));
import rtbot as rb
id = "id";
value = 1;
program = rb.Program()
program.addOperator(rb.GreaterThan(id, value))
#include "rtbot/GreaterThan.h"
auto id = "id";
auto value = 1;
auto op = GreaterThan<std::uint64_t, double>(id, value)
# minimal RtBot program
operators:
- type: GreaterThan
id: "id"
value: 1
{
"operators": [
{ "type": "GreaterThan", "id": "id", "value": 1 }
]
}