DScope
DScope is a digital oscilloscope optimized for fast rendering and flexibility of configuration.
It consists of a main window with a variable number of scopes displaying the incoming signal traces.
Scope traces can be saved to file.
Data sources and visualization
Signal data sources include TCP/IP sources and serial ports (serial, RFCOMM or USB).
The syntax to specify the data source is explained in the Input device section below.
The incoming data can be a plain text format and binary streaming formats.
The syntax to specify the incoming data format is explained in the Binary format section below.
When the binary format field is empty, plain text format is assumed. See the Text format section below.
By default one scope is used for each signal trace.
However the number of scopes on display and the signals that they render can be freely configured, with e.g. several traces per scopes.
This is explained in the Display format section below.
To preserve memory, incoming data are stored in a shift buffer: only the most recent N samples of data are kept for visualization.
N is by default 10000.
The way the signal traces are displayed are specified by a display format string.
This string indicates how many scopes are on screen and which traces they should show.
The syntax is: <title;traces[;xscale=xs][;yscale=auto|min max][;color=colors]><......
- title: title of the scope
- traces: space separated list of traces to display (0=first trace, ...)
- xscale: horizontal scale. 1=default. Positive value: zoom in. Negative value: zoomout
- yscale: vertical scale. automatic (auto) or manual (min max)
- colors: space separated list of trace colors in hexadecimal format RRGGBB
For example the following display format string <Calibrated;5 6 7;xscale=1;yscale=-3300 3300 ;color=ff0000 ff00 ff><Raw;2 3 4;xscale=-2;yscale=auto ;color=ff0000 ff00 ff>
displays two scopes. The first shows traces number 5, 6 and 7, in red, green and blue respectively, with manual vertical scale, default horizontal scale, and the title Calibrated.
Data is in plain text format, with one line per sample, and one column per channel.
Columns can be delimited by one of the following separators: space, colon, semicolon, or tab.
All channels must always be specified.
In other words, there is no "empty" channel. If several separators follow each other without numbers in-between, they are ignored.
Note that this differs from the CSV format which allows 'empty' fields.
"Empty" channels can be specified by using "NaN" values. Currently, a NaN is interpreted as a zero.
The format of the data source is either text or binary, and is described by a binary format string.
An empty binary format string means that the incoming data is plain text. Each line represents one sample and data are separated by one of space, tabulation, colon or semicolon.
Binary format consists of a HEADER followed by raw binary data.
To specify the data format and header the following format string is used: HEADER;C0FMT C1FMT C2FMT....[;checksum]
- HEADER: plain text header indicating start of data
- CxFMT: Format of the data channel x. The format is [-]c|s|S|i|I|b|B where c,s|S,i|I,b|B indicate an 8-bit, 16-bit, 32-bit, or n-bit channel.
s, i, b are little-endian. S, I and B are big-endian. The optional - prefix indicates a signed data channel.
- checksum: optional checksum. format is: x, f or F. f/F is a 16-bit Fletcher-16 checksum (little/big endian). x is an 8-bit longitudinal redundancy check.
Input device
The input device can be a TCP/IP data source or a serial line. It is specified as follows:
- TCP/IP: tcp:host:port
- Serial: ser:device:baudrate
Serial device has the format COMx under Windows or /dev/ttyxxxx under Linux.
User interface
Scopes can be selected, scaled, and enlarged by using the mouse.
- Left click: select a scope
- Right click: enlarges the selected scope
- Wheel up/down: vertical zoom.
- Middle click: automatic vertical scale
- Shift+wheel up/down: horizontal zoom.
- Shift+middle click: default horizontal scale
Scope traces can be saved to file (Save data button). Use the clear data button to clear the scope traces.
Command line
Command line parameters are: -c -f file.
-f specifies a configuration file to load on startup. -c automatically connects to the device (typically used with -c).