HALSTREAMER(1)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– halstreamer(1) β€” the LinuxCNC girlies' guide πŸ’–

okay bestie, so this is halstreamer from the LinuxCNC docs, and honestly? she's giving pipeline royalty. Let me put you on. 🫢


✨ NAME ✨

halstreamer β€” stream file data into HAL in real-time. no cap, that's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

halstreamer [options]

that's it. that's the whole vibe. options only, she pulls her data from stdin. πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

so streamer(9) and halstreamer are a duo, okay, they literally cannot be separated. they work together to stream data from a file into the HAL in real-time. main character energy, both of them. ✨

here's the split:

  • streamer is the real-time HAL component. she exports HAL pins and creates a FIFO in shared memory. she's the one holding it down in realtime.
  • halstreamer is a non-realtime program. she copies data from stdin into that FIFO, so that streamer can write it out to the HAL pins.

it's giving "I do the vibes, she does the timing." iconic teamwork fr fr. πŸ’œ


πŸŽ€ OPTIONS πŸŽ€

  • -c CHAN β€” tells halstreamer to write to FIFO CHAN. FIFOs are numbered from zero, and the default value is zero, so lowkey you don't even need this option unless multiple FIFOs have been created. (multiple FIFOs? in this economy? 😭)
  • FILENAME β€” tells halsampler to read from FILENAME instead of from stdin. yes, the manpage says "halsampler" here, not halstreamer, and we are NOT about to change it, because changing it would be a lie and lying is not slay. keeping it exactly as written. πŸ‘‘

🌈 USAGE 🌈

first things first: a FIFO must be created by loading streamer(9) with halcmd loadrt, or with a loadrt command in a HAL file. you literally cannot skip this step bestie. no FIFO, no party. 🚫

then, and only then, can halstreamer be invoked to begin writing data into the FIFO.

data is read from stdin, and is almost always either redirected from a file or piped from some other program. why? because keyboard input would be unable to keep up with even slow streaming rates. bestie you are not beating a stream by hand-typing, be so serious. πŸ’€

every line of input must match the pins that are attached to the FIFO. for example, if the streamer config string was "ffbs", then each line of input must consist of two floats, a bit, and a signed integer β€” in that order β€” separated by whitespace. πŸ“

and how do you format those:

  • floats must be formatted as required by strtod(3)
  • signed and unsigned integers must be formatted as required by strtol(3) and strtoul(3)
  • bits must be either 0 or 1

input lines that begin with # will be treated as comments and silently skipped. so yes, you CAN annotate your data files. self-care. 🌸

halstreamer transfers data to the FIFO as fast as possible until the FIFO is full, then it retries at regular intervals β€” until it is either killed or reads EOF from stdin. data can be redirected from a file or piped from some other program. go off, throughput queen. πŸ”₯

the FIFO size should be chosen to ride through any momentary disruptions in the flow of data, such as disk seeks. if the FIFO is big enough, halstreamer can be restarted with the same or a new file before the FIFO empties, resulting in a continuous stream of data. that's the dream fr. πŸ¦‹

and the glow-up detail: the data format for halstreamer input is the same as for halsampler(1) output. so waveforms captured with halsampler can be replayed using halstreamer. record it, replay it, no conversion, no drama. πŸŽ€


πŸ’… EXIT STATUS πŸ’…

  • if a problem is encountered during initialization, halstreamer prints a message to stderr and returns failure. 😭
  • if a badly formatted line is encountered while writing to the FIFO, it prints a message to stderr, skips the line, and continues. (this behavior may be revised in the future β€” so don't get too attached to it. πŸ™ˆ) note the use of "it" there, that's the original's wording and we respect it.
  • upon reading EOF from the input, it returns success. πŸŽ‰
  • if it is terminated before the input ends, it returns failure.

πŸ‘‘ SEE ALSO πŸ‘‘

streamer(9) sampler(9) halsampler(1)


πŸ’œ AUTHOR πŸ’œ

original version by John Kasunich, as part of the LinuxCNC project.

improvements by several other members of the LinuxCNC development team. (a whole group chat of contributors, we love to see it. 🫢)


πŸ“ REPORTING BUGS πŸ“

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.

⚠️ bestie. NO WARRANTY. not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. not a single one. read that again. πŸ’€

that's the whole page, and you ate it. go stream something into a FIFO and be free. πŸ¦‹βœ¨

with love from the LinuxCNC docs, dated 03/17/2026, written by the LinuxCNC project β€” stay slaying, and remember: FIFO big, problems small. πŸ’…πŸ’–

πŸ“¦ where this page comes from