Bug 292 - In a session containing a 0-255 count, the final value is not decoded.
Summary: In a session containing a 0-255 count, the final value is not decoded.
Status: RESOLVED FIXED
Alias: None
Product: libsigrokdecode
Classification: Unclassified
Component: PD: parallel (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
: 749 1190 1343 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-25 14:26 CET by Joel Holdsworth
Modified: 2022-10-08 21:10 CEST (History)
4 users (show)



Attachments
The count session file. (848 bytes, application/octet-stream)
2014-01-25 14:26 CET, Joel Holdsworth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Holdsworth 2014-01-25 14:26:52 CET
Created attachment 62 [details]
The count session file.

@bmx provided this method to generate the session:

$ (echo "[global]"; echo "sigrok version=0.2.2"; echo; echo "[device 1]"; \
   echo "capturefile=logic-1"; echo "total probes=8"; \
   echo "samplerate=100 Hz"; for i in $(seq 1 8); do echo probe$i=A$i ; done; \
   echo "unitsize=1" )> metadata
$ echo 1 > version
$ for i in $(seq 0 255); do printf "%02X" $i ; done | xxd -r -ps > logic-1-1
$ zip test.sr version metadata logic-1-1


Now decode the file in sigrok-cli:

./sigrok-cli -i ~/Downloads/test.sr -P parallel:d0=0:d1=1:d2=2:d3=3:d4=4:d5=5:d6=6:d7=7

Output:

...
FB
FC
FD
FE

...but where is the FF value?
Comment 1 Soeren Apel 2017-10-16 08:12:03 CEST
*** Bug 749 has been marked as a duplicate of this bug. ***
Comment 2 Gerhard Sittig 2018-05-09 18:05:15 CEST
*** Bug 1190 has been marked as a duplicate of this bug. ***
Comment 3 fenugrec 2018-12-17 00:24:06 CET
*** Bug 1343 has been marked as a duplicate of this bug. ***
Comment 4 Gerhard Sittig 2021-12-26 14:22:20 CET
Commit 819e508972da adds the "send EOF to decoder sessions" API call which 
applications need to check for and invoke. All previously communicated 
concerns still apply. Decoders should never claim that a protocol activity 
had ended or completed when the end condition was never seen in the data. 
Emitting warnings in the presence of incomplete activity remains the most 
appropriate activity.
Comment 5 Gerhard Sittig 2022-10-03 21:48:25 CEST
libsigrokdecode commit e303fd42917f fixes the issue for the "parallel" PD. 
Other decoders could follow this example. But care must be taken to never 
falsely claim the completion of frames when their end condition was not seen.
Comment 6 Soeren Apel 2022-10-08 21:10:14 CEST
fd6005aadf3c86bca4dc1fb487d8615669e1deee forces an update for late annotations and works in combination with gsi's libsrd changes.

Thanks, gsi!