📄 halsampler.1
字号:
.\" Copyright (c) 2006 John Kasunich.\" (jmkasunich AT users DOT sourceforge DOT net).\".\" This is free documentation; you can redistribute it and/or.\" modify it under the terms of the GNU General Public License as.\" published by the Free Software Foundation; either version 2 of.\" the License, or (at your option) any later version..\".\" The GNU General Public License's references to "object code".\" and "executables" are to be interpreted as the output of any.\" document formatting or typesetting system, including.\" intermediate and printed output..\".\" This manual is distributed in the hope that it will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the.\" GNU General Public License for more details..\".\" You should have received a copy of the GNU General Public.\" License along with this manual; if not, write to the Free.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,.\" USA..\".\".\".TH HALSAMPLER "1" "2006-11-18" "EMC Documentation" "HAL User's Manual".SH NAMEhalsampler \- sample data from HAL in realtime.SH SYNOPSIS.B halsampler.RI [ options ].SH DESCRIPTION.BR sampler (9)and.B halsamplerare used together to sample HAL data in real time and store it in a file..B sampleris a realtime HAL component that exports HAL pins and creates a FIFO in shared memory. It then begins sampling data from the HAL and storing it to the FIFO..B hal_sampleris a user space program that copies data from the FIFO to stdout, where it canbe redirected to a file or piped to some other program..SH OPTIONS.TP.BI "-c " CHANinstructs .B halsamplerto read from FIFO.IR CHAN .FIFOs are numbered from zero, and the default value is zero, sothis option is not needed unless multiple FIFOs have been created..TP.BI "-n " COUNTinstructs .B halsamplerto read.I COUNTsamples from the FIFO, then exit. If.B -nis not specified,.B halsamplerwill read continuously until it is killed..TP.B -tinstructs .B halsamplerto tag each line by printing the sample number in the first column..SH USAGEA FIFO must first be created by loading .BR sampler (9)with .B halcmd loadrtor a.B loadrtcommand in a .hal file. Then.B halsamplercan be invoked to begin printing data from the FIFO to stdout..PData is printed one line per sample. If.B -twas specified, the sample number is printed first. The data follows, in theorder that the pins were defined in the config string. For example, if the.B samplerconfig string was "ffbs" then a typical line of output (without.BR -t )would look like:.P123.55 33.4 0 -12.P.B halsamplerprints data as fast as possible until the FIFO is empty, then it retries at regular intervals, until it is either killed or has printed.I COUNTsamples as requested by.BR -n .Usually, but not always, data printed by.B halsamplerwill be redirected to a file or piped to some other program..PThe FIFO size should be chosen to absorb samples captured during any momentary disruptions in the flow of data, such as disk seeks, terminal scrolling, or the processing limitations of subsequent program in a pipeline. If the FIFO getsfull and.B sampleris forced to overwrite old data,.B halsamplerwill print 'overrun' on a line by itself to mark each gap in the sampleddata. If.B -twas specified, gaps in the sequential sample numbers in the first columncan be used to determine exactly how many samples were lost..PThe data format for.B halsampleroutput is the same as for.BR halstreamer (1)input, so 'waveforms' captured with.B halsamplercan be replayed using.BR halstreamer .The.B -toption should not be used in this case..SH "EXIT STATUS"If a problem is encountered during initialization,.B halsamplerprints a message to stderr and returns failure..PUpon printing.I COUNTsamples (if.B -nwas specified) it will shut down and return success. If it is terminatedbefore printing the specified number of samples, it returns failure. Thismeans that when.B -nis not specified, it will always return failure when terminated..SH "SEE ALSO".BR sampler (9).BR streamer (9).BR halstreamer (1).SH HISTORY.SH BUGS.SH AUTHOROriginal version by John Kasunich, as part of the Enhanced MachineController (EMC) project. Improvements by several other members ofthe EMC development team..SH REPORTING BUGSReport bugs to jmkasunich AT users DOT sourceforge DOT net.SH COPYRIGHTCopyright \(co 2006 John Kasunich..brThis is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -