sampler9
Sample data from hal in real time
Usage
loadrt sampler depth=depth1[,depth2...] cfg=string1[,string2...]
Overview
sampler and halsampler(1) are used together to sample HAL data in real time and store it in a file. sampler is 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. halsampler is a non-realtime program that copies data from the FIFO to stdout, where it can be redirected to a file or piped to some other program.
Options
depth=depth1[,depth2...]-
sets the depth of the realtime->non-realtime FIFO that
samplercreates to buffer the realtime data. Multiple values of depth (separated by commas) can be specified if you need more than one FIFO (for example if you want to sample data from two different realtime threads).
cfg=string1[,string2...]-
defines the set of HAL pins that
samplerexports and later samples data from. One string must be supplied for each FIFO, separated by commas.samplerexports 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)
Functions
sampler.N-
One function is created per FIFO, numbered from zero.
Pins
sampler.N.pin.M input-
Pin for the data that will wind up in column M of FIFO N (and in column M of the output file). The pin type depends on the config string.
sampler.N.curr-depths32 output-
Current number of samples in the FIFO. When this reaches depth new data will begin overwriting old data, and some samples will be lost.
sampler.N.fullbit output-
TRUE when the FIFO N is full, FALSE when there is room for another sample.
sampler.N.enablebit input-
When TRUE, samples are captured and placed in FIFO N, when FALSE, no samples are acquired. Defaults to TRUE.
Parameters
sampler.N.overrunss32 read/write-
The number of times that
samplerhas tried to write data to the HAL pins but found no room in the FIFO. It increments wheneverfullis true, and can be reset by thesetpcommand.
sampler.N.sample-nums32 read/write-
A number that identifies the sample. It is automatically incremented for each sample, and can be reset using the
setpcommand. The sample number can optionally be printed in the first column of the output fromhalsampler, using the -t option (see man 1 halsampler ).
Releases
2 releases since Debian 12 (Bookworm); the text changed 1 time.