streamer — stream file data into HAL in real time
loadrt streamer __depth=depth1[,depth2…] cfg= string1[,string2…]
streamer and halstreamer are used together to stream data from a file into the HAL in real time.
streamer is a realtime HAL component that exports HAL pins and creates a FIFO in shared memory.
hal_streamer is a user space program that copies data from stdin into the FIFO, so that streamer can write it to the HAL pins.
sets the depth of the user→realtime FIFO that streamer creates to receive data from halstreamer.
Multiple values of depth (separated by commas) can be specified if you need more than one FIFO (for example if you want to stream data from two different realtime threads).
defines the set of HAL pins that streamer exports and later writes data to.
One string must be supplied for each FIFO, separated by commas.
streamer exports one pin for each character in string.
Legal characters are:
F, f (float pin) B, b (bit pin) S, s (s32 pin) U, u (u32 pin)
One function is created per FIFO, numbered from zero.
Data from column M of the data in FIFO N appears on this pin. The pin type depends on the config string.
streamer.N.curr-depth s32 output
Current number of samples in the FIFO. When this reaches zero, new data will no longer be written to the pins.
streamer.N.empty bit output
TRUE when the FIFO N is empty, FALSE when valid data is available.
streamer.N.enable bit input
When TRUE, data from FIFO N is written to the HAL pins.
When false, no data is transferred. Defaults to TRUE.
streamer.N.underruns s32 read/write
The number of times that sampler has tried to write data to the HAL pins but found no fresh data in the FIFO.
It increments whenever empty is true, and can be reset by the setp command.
halstreamer sampler halsampler
Should an enable HAL pin be added, to allow streaming to be turned on and off?
Original version by John Kasunich, as part of the LinuxCNC
project. Improvements by several other members of
the LinuxCNC development team.
Now part of the Machinekit project
Copyright (c) 2006 John Kasunich. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.