Hi Soeren, (all),
Many thanks for the answers - they are great help!
.sr files are just zip archives. You can rename one, unzip it and have
a look at the metadata file. That shows you what is stored there.
Great to know, thanks - just for reference, here is what can be expected from
inspecting metadata of the .sr file from the OP:
```
$ unzip -l uart-sig.sr
Archive: uart-sig.sr
Length Date Time Name
--------- ---------- ----- ----
1 2019-04-02 12:07 version
125 2019-04-02 12:07 metadata
189068 2019-04-02 12:07 analog-1-3-1
189068 2019-04-02 12:07 analog-1-2-1
189068 2019-04-02 12:07 analog-1-1-1
--------- -------
567330 5 files
$ unzip -c uart-sig.sr metadata
Archive: uart-sig.sr
inflating: metadata
[global]
sigrok version=0.6.0-git-88e6a8d
[device 1]
samplerate=12.5 MHz
total analog=3
analog1=CH1
analog2=CH2
analog3=CH3
```
There is also quite a bit of info in the new *.pvs files that PulseView
produces:
```
$ cat uart-sig.pvs
[General]
decode_signals=1
views=1
[CH3]
name=CH3
enabled=true
color=4280306311
conversion_type=1
conv_options=0
[CH2]
name=CH2
enabled=true
color=4287045754
conversion_type=0
conv_options=0
[decode_signal0]
name=UART
enabled=true
color=4281510450
conversion_type=0
conv_options=0
decoders=1
decoder0\id=uart
decoder0\options=2
decoder0\option0\name=baudrate
decoder0\option0\value=@ByteArray(\0\x96\0\0\0\0\0\0)
decoder0\option0\type=x
decoder0\option1\name=format
decoder0\option1\value=@ByteArray(ascii\0)
decoder0\option1\type=s
decoder0\option2\name=parity_check
decoder0\option2\value=@ByteArray(no\0)
decoder0\option2\type=s
channels=2
channel0\name=RX
channel0\initial_pin_state=2
channel1\name=TX
channel1\initial_pin_state=2
channel1\assigned_signal_name=CH3
[CH1]
name=CH1
enabled=true
color=4291076096
conversion_type=0
conv_options=0
[view0]
scale=2.532726054922972e-6
v_offset=-79
splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\x39\0\0\x5\xdf\x1\0\0\0\x1\x1\0\0\0\x1\0)
segment_display_mode=1
offset=22 serialization::archive 14 0 0 0 0 6929 55933175 11641743 24166286
44933926 767134 -8 1 0 6
CH3\pos_vdivs=1
CH3\neg_vdivs=1
CH3\scale_index=3
CH3\display_type=2
CH3\autoranging=true
CH3\div_height=39
CH2\pos_vdivs=1
CH2\neg_vdivs=1
CH2\scale_index=3
CH2\display_type=2
CH2\autoranging=true
CH2\div_height=39
CH1\pos_vdivs=1
CH1\neg_vdivs=1
CH1\scale_index=3
CH1\display_type=2
CH1\autoranging=true
CH1\div_height=39
```
* Is it possible to use sigrok-cli, to browse only the decoded UART
data, from an .sr file like this - and if so, how?
Unfortunately not, since sigrok-cli can't process analog data and the
data generated by protocol decoders isn't saved in the .sr files.
Good to know - at least one workaround, is to add `print` statements to the pd.py
decoder, and have PulseView called to run from the command line. Note that in Windows,
running "C:\Program Files (x86)\sigrok\PulseView\pulseview.exe" from cmd.exe
command prompt, simply exits and there are no printouts; however, running it from MSYS2
(or MINGW64) bash, does show the prints from Python protocol decoders in standard output.
Thanks again,
Cheers!
On 4/2/2019 11:43 PM, Soeren Apel wrote:
Hello sdbbs,
* If I establish a setup in PulseView, that uses analog channels,
conversion to logic, and protocol decoding; and save this as an .sr
file; - can I then use sigrok-cli to browse the decoded data in the
.sr file?
Unfortunately not. While we do try to maintain a common feature set
between sigrok-cli and PV, sigrok-cli hasn't seen much love lately
and doesn't support everything that PV does - analog-to-logic
conversion, for example.
Again something that's not difficult to implement, it's just that no
one stepped up and did it.
* Is there a sigrok-cli command, that I can use, to tell me what do I
have in an `.sr` file? In this case, I'd have wished it to tell me,
that in `uart-sig.sr` I have: CH1 as analog, CH2 as analog, CH3 as
analog and converted/thresholded logic, and UART as a decoder channel
(applied to CH3 as logic).
.sr files are just zip archives. You can rename one, unzip it and have
a look at the metadata file. That shows you what is stored there.
* Is it possible to use sigrok-cli, to browse only the decoded UART
data, from an .sr file like this - and if so, how?
Unfortunately not, since sigrok-cli can't process analog data and the
data generated by protocol decoders isn't saved in the .sr files.
I can't comment on the other sigrok-cli questions because I'm not as
familiar with it.
Regards,
-Soeren
Many thanks in advance for any hints,
Cheers!
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel