acq400_stream

Usage
usage: acq400_stream.py [-h] [--filesize FILESIZE] [--totaldata TOTALDATA] [--root ROOT] [--runtime RUNTIME] [--verbose VERBOSE] [--callback CALLBACK] uuts [uuts ...]

Positional Arguments

uuts

uuts

Named Arguments

--filesize

Default: 1048576

--totaldata

Default: 10000000000

--root

Location to save files. Default dir is UUT name.

Default: “”

--runtime

How long to stream data for

Default: 1000000

--verbose

Prints status messages as the stream is running

Default: 0

--callback

for client program use only. Assume object with __call_ method

Outline:

This is a script intended to connect to a UUT and stream data from port 4210.

The data that has been streamed is not demuxed and so if it is to be used then it has to be demuxed first. Something like:

data = numpy.fromfile("0000", dtype="<datatype>")
plt.plot(data[::<number of channels>])
plt.show()

Some usage examples are included below:

1: Acquire files of size 1024kb up to a total of 4096kb:

acq400_stream.py --verbose=1 --filesize=1M --totaldata=4M <uut hostname>

2: Acquire a single file of size 4096kb:

acq400_stream.py --verbose=1 --filesize=4M --totaldata=4M <uut hostname>

3: Acquire files of size 1024 for 10 seconds:

acq400_stream.py --verbose=1 --filesize=1M --runtime=10 <uut hostname>

4: Acquire data for 5 seconds and write the data all to a single file:

acq400_stream.py --verbose=1 --filesize=9999M --runtime=5 <uut hostname>
make_data_dir(directory, verbose)[source]
run_stream(args)[source]
get_parser()[source]