GreaterThanStream
Inputs: i1
i2
Outputs: o1
Synchronizes two streams (given by i1
and i2
) and emits the message in i1
if its value is greater than the value of i2
for the synchronized .
The synchronization mechanism is inherited from the Join
operator. The GreaterThanStream
operator holds a message buffer on i1
and i2
respectively, after synchronization occurs it emits the message in i1
through o1
if it happens to be greater than the message value in i2
and it discard the message in i2
, if no synchronization occurs then an empty message {} is emitted through o1
.
Parameters
id: The id of the operator
Usage
- TypeScript
- Python
- C++
- YAML
- Json
import { Program, GreaterThanStream } from "@rtbot-dev/rtbot";
const id = "id";
const program = new Program();
program.addOperator(new GreaterThanStream(id));
import rtbot as rb
id = "id";
program = rb.Program()
program.addOperator(rb.GreaterThanStream(id))
#include "rtbot/GreaterThanStream.h"
auto id = "id";
auto op = GreaterThanStream<std::uint64_t, double>(id)
# minimal RtBot program
operators:
- type: GreaterThanStream
id: "id"
{
"operators": [
{ "type": "GreaterThanStream", "id": "id" }
]
}