script

script with 2 inputs and 2 outputs, running in a separate thread
Author: Johannes Taelman
License: BSD
Github: script/script.axo

Inlets

frac32 in1

frac32 in2

Outlets

frac32 out1

frac32 out2

Attributes

text script

Declaration
int32_t in1, in2;
int32_t out1, out2;
msg_t ThreadX2() { attr_script }
static msg_t ThreadX(void *arg) { ((attr_parent *)arg)->ThreadX2(); }
WORKING_AREA(waThreadX, 1024);
Thread *Thd;
Init
in1 = 0;
in2 = 0;
out1 = 0;
out2 = 0;
Thd = chThdCreateStatic(waThreadX, sizeof(waThreadX), NORMALPRIO, ThreadX,
                        (void *)this);
Control Rate
outlet_out1__ = this->out1;
outlet_out2__ = this->out2;
this->in1 = inlet_in1__;
this->in2 = inlet_in2__;
Dispose
chThdTerminate(Thd);
chThdWait(Thd);

Privacy

© 2024 Zrna Research