streamer - stream file data into HAL in real time
loadrt streamer depth=depth1[,depth2...] cfg=string1[,string2...]
streamer and halstreamer(1) 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 hal-streamer. 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.
streamer.N.*clock bit input
Clock for data as specified by the clock-mode pin
streamer.N.*clock-mode s32 input
Defines behavior of clock pin:
• 0 (default) free run at every iteration
• 1 clock on falling edge of clock pin
• 2 clock on rising edge of clock pin
• 3 clock on any edge of clock pin
halstreamer(1), sampler(9), halsampler(1)
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.
Report bugs to jmkasunich AT users DOT sourceforge DOT net
Copyright © 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.