'\" t .\" Title: streamer .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 03/13/2024 .\" Manual: LinuxCNC Documentation .\" Source: LinuxCNC .\" Language: English .\" .TH "STREAMER" "9" "03/13/2024" "LinuxCNC" "LinuxCNC Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" streamer \- stream file data into HAL in real time .SH "SYNOPSIS" .sp \fBloadrt streamer depth\fR=\fIdepth1[,depth2\&...]\fR \fBcfg\fR=\fIstring1[,string2\&...]\fR .SH "DESCRIPTION" .sp \fBstreamer\fR and \fBhalstreamer(1)\fR are used together to stream data from a file into the HAL in real time\&. \fBstreamer\fR is a realtime HAL component that exports HAL pins and creates a FIFO in shared memory\&. \fBhal_streamer\fR is a non\-realtime program that copies data from stdin into the FIFO, so that \fBstreamer\fR can write it to the HAL pins\&. .SH "OPTIONS" .PP \fBdepth\fR=\fIdepth1[,depth2\&...]\fR .RS 4 Sets the depth of the FIFO that the realtime \fBstreamer\fR creates to receive data from the non\-realtime \fBhal\-streamer\fR\&. Multiple values of \fIdepth\fR (separated by commas) can be specified if you need more than one FIFO (for example if you want to stream data to two different realtime threads)\&. .RE .PP \fBcfg\fR=\fIstring1[,string2\&...]\fR .RS 4 Defines the set of HAL pins that \fBstreamer\fR exports and later writes data to\&. One \fIstring\fR must be supplied for each FIFO, separated by commas\&. \fBstreamer\fR exports one pin for each character in \fIstring\fR\&. Legal characters are: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBF\fR, \fBf\fR (float pin) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBB\fR, \fBb\fR (bit pin) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBS\fR, \fBs\fR (s32 pin) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBU\fR, \fBu\fR (u32 pin) .RE .RE .SH "FUNCTIONS" .PP \fBstreamer\fR\&.\fIN\fR .RS 4 One function is created per FIFO, numbered from zero\&. .RE .SH "PINS" .PP \fBstreamer\fR\&.\fIN\fR\&.\fBpin\fR\&.\fIM\fR output .RS 4 Data from column \fIM\fR of the data in FIFO \fIN\fR appears on this pin\&. The pin type depends on the config string\&. .RE .PP \fBstreamer\fR\&.\fIN\fR\&.\fBcurr\-depth\fR s32 output .RS 4 Current number of samples in the FIFO\&. When this reaches zero, new data will no longer be written to the pins\&. .RE .PP \fBstreamer\fR\&.\fIN\fR\&.\fBempty\fR bit output .RS 4 TRUE when the FIFO \fIN\fR is empty, FALSE when valid data is available\&. .RE .PP \fBstreamer\fR\&.\fIN\fR\&.\fBenable\fR bit input .RS 4 When TRUE, data from FIFO \fIN\fR is written to the HAL pins\&. When false, no data is transferred\&. Defaults to TRUE\&. .RE .PP \fBstreamer\fR\&.\fIN\fR\&.\fBunderruns\fR s32 read/write .RS 4 The number of times that \fBsampler\fR has tried to write data to the HAL pins but found no fresh data in the FIFO\&. It increments whenever \fBempty\fR is true, and can be reset by the \fBsetp\fR command\&. .RE .PP \fBstreamer\fR\&.\fIN\fR\&.*clock bit input .RS 4 Clock for data as specified by the clock\-mode pin .RE .PP \fBstreamer\fR\&.\fIN\fR\&.*clock\-mode s32 input .RS 4 Defines behavior of clock pin: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 0 (\fBdefault\fR) free run at every iteration .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 1 clock on falling edge of clock pin .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 2 clock on rising edge of clock pin .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 3 clock on any edge of clock pin .RE .RE .SH "SEE ALSO" .sp \fBhalstreamer\fR(1), \fBsampler\fR(9), \fBhalsampler\fR(1) .SH "BUGS" .sp Should an enable HAL pin be added, to allow streaming to be turned on and off? .SH "AUTHOR" .sp Original version by John Kasunich, as part of the LinuxCNC project\&. Improvements by several other members of the LinuxCNC development team\&. .SH "REPORTING BUGS" .sp Report bugs to jmkasunich AT users DOT sourceforge DOT net .SH "COPYRIGHT" .sp Copyright \(co 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\&.