Microblx Module Index

Module trig

Block ubx/trig

Type: cblock
Attributes: trigger
Meta-data: { doc=’simple, activity-less trigger’, realtime=true,}
License: BSD-3-Clause

Configs

name type doc
num_chains int number of trigger chains. def: 1
tstats_mode int 0: off (def), 1: global only, 2: per block
tstats_profile_path char directory to write the timing stats file to
tstats_output_rate double throttle output on tstats port
tstats_skip_first int skip N steps before acquiring stats
loglevel int  

Ports

name out type out len in type in len doc
active_chain     int 1 switch the active trigger chain
tstats struct ubx_tstat 1     timing statistics (if enabled)

Module ptrig

Block ubx/ptrig

Type: cblock
Attributes: trigger, active
Meta-data: { doc=’pthread based trigger’, realtime=true,}
License: BSD-3-Clause

Configs

name type doc
period struct ptrig_period trigger period in { sec, ns }
stacksize size_t stacksize as per pthread_attr_setstacksize(3)
sched_priority int pthread priority
sched_policy char pthread scheduling policy
affinity int list of CPUs to set the pthread CPU affinity to
thread_name char thread name (for dbg), default is block name
autostop_steps int64_t if set and > 0, block stops itself after X steps
num_chains int number of trigger chains (def: 1)
tstats_mode int enable timing statistics over all blocks
tstats_profile_path char directory to write the timing stats file to
tstats_output_rate double throttle output on tstats port
tstats_skip_first int skip N steps before acquiring stats
loglevel int  

Ports

name out type out len in type in len doc
active_chain     int 1 switch the active trigger chain
tstats struct ubx_tstat 1     out port for timing statistics
shutdown     int 1 input port for stopping ptrig

Types

Types
type name type class size [B]
struct ptrig_period struct 16

Module math_double

Block ubx/math_double

Type: cblock
Attributes:
Meta-data: { doc=’math functions from math.h’, realtime=true,}
License: BSD-3-Clause

Configs

name type doc
func char math function to compute
data_len long length of output data (def: 1)
mul double optional factor to multiply with y (def: 1)
add double optional offset to add to y after mul (def: 0)

Ports

name out type out len in type in len doc
x     double 1 math input
y double 1     math output

Module rand_double

Block ubx/rand_double

Type: cblock
Attributes:
Meta-data: { doc=’double random number generator block’, realtime=true,}
License: BSD-3-Clause

Configs

name type doc
seed long seed to initialize with

Ports

name out type out len in type in len doc
out double 1     rand generator output

Module ramp_double

Block ubx/ramp_double

Type: cblock
Attributes:
Meta-data: { doc=’Ramp generator block’, realtime=true,}
License: BSD-3-Clause

Configs

name type doc
start double ramp starting value (def 0)
slope double rate of change (def: 1)
data_len long length of output data (def: 1)

Ports

name out type out len in type in len doc
out double 1     ramp generator output

Module pid

Block ubx/pid

Type: cblock
Attributes:
Meta-data: { doc=’’, realtime=true,}
License: BSD-3-Clause

Configs

name type doc
Kp double P-gain (def: 0)
Ki double I-gain (def: 0)
Kd double D-gain (def: 0)
data_len long length of signal array (def: 1)

Ports

name out type out len in type in len doc
msr     double 1 measured input signal
des     double 1 desired input signal
out double 1     controller output

Module saturation_double

Block ubx/saturation_double

Type: cblock
Attributes:
Meta-data: double saturation block
License: BSD-3-Clause

Configs

name type doc
data_len long data array length
lower_limits double saturation lower limits
upper_limits double saturation upper limits

Ports

name out type out len in type in len doc
in     double 1 input signal to saturate
out double 1     saturated output signal

Module luablock

Block ubx/luablock

Type: cblock
Attributes:
Meta-data: { doc=’A generic luajit based block’, realtime=false,}
License: BSD-3-Clause

Configs

name type doc
lua_file char  
lua_str char  
loglevel int  

Ports

name out type out len in type in len doc
exec_str int 1 char 1  

Module cconst

Block ubx/cconst

Type: cblock
Attributes:
Meta-data: { doc=’const value c-block’, realtime=true }
License: BSD-3-Clause

Configs

name type doc
type_name char ubx type name of the value to output
data_len long data length of the value to output

Module iconst

Block ubx/iconst

Type: iblock
Attributes:
Meta-data: { doc=’const value i-block’, realtime=true }
License: BSD-3-Clause

Configs

name type doc
type_name char ubx type name of the value to output
data_len long data length of the value to output

Module lfds_cyclic

Block ubx/lfds_cyclic

Type: iblock
Attributes:
Meta-data: { doc=’High performance scalable, lock-free cyclic, buffered in process communication description=[[ This version is stongly typed and should be preferred This microblx iblock is based on based on liblfds ringbuffer (v0.6.1.1) (www.liblfds.org)]], version=0.01, hard_real_time=true,}
License: BSD-3-Clause

Configs

name type doc
type_name char name of registered microblx type to transport
data_len uint32_t array length (multiplier) of data (default: 1)
buffer_len uint32_t max number of data elements the buffer shall hold
allow_partial int allow msgs with len<data_len. def: 0 (no)
loglevel_overruns int loglevel for reporting overflows (default: NOTICE, -1 to disable)

Ports

name out type out len in type in len doc
overruns unsigned long 1     Number of buffer overruns. Value is output only upon change.

Module mqueue

Block ubx/mqueue

Type: iblock
Attributes:
Meta-data: { doc=’POSIX mqueue interaction’, realtime=true,}
License: BSD-3-Clause

Configs

name type doc
mq_id char mqueue base id
type_name char name of registered microblx type to transport
data_len long array length (multiplier) of data (default: 1)
buffer_len long max number of data elements the buffer shall hold
blocking uint32_t enable blocking mode (def: 0)
unlink uint32_t call mq_unlink in cleanup (def: 1 (yes)

Module hexdump

Block ubx/hexdump

Type: iblock
Attributes:
Meta-data: { doc=’hexdump interaction’, realtime=false,}
License: BSD-3-Clause