HALSTREAMER(1)
π 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:
streameris 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.halstreameris a non-realtime program. she copies data fromstdininto that FIFO, so thatstreamercan write it out to the HAL pins.
it's giving "I do the vibes, she does the timing." iconic teamwork fr fr. π
π OPTIONS π
-cCHAN β tellshalstreamerto 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, nothalstreamer, 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)andstrtoul(3) - bits must be either
0or1
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,
halstreamerprints a message tostderrand 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
EOFfrom 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 β
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
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms