Whole CDP is discarded if valid RDH gives too big offset_to_next
If you simply cut off 1 byte from the end of a payload, then fastpasta reads to EOF and fails to fill the whole buffer (that it allocated for the payload of size equal to the RDH's offset_to_next field) which means the whole CDP is discarded, and it is just treated as EOF instead of raising some kind of error.
Reproduce on unix:
# 10_rdh.raw is 1200 bytes
head -c 1199 tests/test-data/10_rdh.raw | fastpasta view its-readout-frames
Output:
Memory Word Trig. Packet Expect Link Lane Trigger
Position type type status Data? ID faults Orbit_BC
0: RDH v7 stop=0 stave: L0_12 SOC # 8 - 512_ 0
40: IHW [C0 01 00 00 00 00 00 00 00 E0]
50: TDH [03 1A 00 00 00 02 00 00 00 E8] SOC Data! 512_ 0
90: TDT [00 00 00 00 00 00 00 00 01 F0] Complete -
A0: RDH v7 stop=1 stave: L0_12 SOC # 8 - 512_ 0
E0: DDW [00 00 00 00 00 00 00 00 00 E4] -
F0: RDH v7 stop=0 stave: L0_12 HB # 8 - 513_ 0
130: IHW [C0 01 00 00 00 00 00 00 00 E0]
140: TDH [03 10 00 00 01 02 00 00 00 E8] Internal Data! 513_ 0
180: TDT [00 00 00 00 00 00 00 00 01 F0] Complete -
190: RDH v7 stop=1 stave: L0_12 HB # 8 - 513_ 0
1D0: DDW [00 00 00 00 00 00 00 00 00 E4] -
1E0: RDH v7 stop=0 stave: L0_12 HB # 8 - 514_ 0
220: IHW [C0 01 00 00 00 00 00 00 00 E0]
230: TDH [03 10 00 00 02 02 00 00 00 E8] Internal Data! 514_ 0
270: TDT [00 00 00 00 00 00 00 00 01 F0] Complete -
280: RDH v7 stop=1 stave: L0_12 HB # 8 - 514_ 0
2C0: DDW [00 00 00 00 00 00 00 00 00 E4] -
2D0: RDH v7 stop=0 stave: L0_12 HB # 8 - 515_ 0
310: IHW [C0 01 00 00 00 00 00 00 00 E0]
320: TDH [03 10 00 00 03 02 00 00 00 E8] Internal Data! 515_ 0
360: TDT [00 00 00 00 00 00 00 00 01 F0] Complete -
370: RDH v7 stop=1 stave: L0_12 HB # 8 - 515_ 0
3B0: DDW [00 00 00 00 00 00 00 00 00 E4] -
3C0: RDH v7 stop=0 stave: L0_12 HB # 8 - 516_ 0
400: IHW [C0 01 00 00 00 00 00 00 00 E0]
410: TDH [03 10 00 00 04 02 00 00 00 E8] Internal Data! 516_ 0
450: TDT [00 00 00 00 00 00 00 00 01 F0] Complete -
View stops at the TDT before RDH no. 10.
The missing part is:
460: RDH v7 stop=1 stave: L0_12 HB # 8 - 516_ 0
4A0: DDW [00 00 00 00 00 00 00 00 00 E4] -
It's reasonable that the DDW cannot be displayed as the CDP is erroneous, but the RDH was correctly deserialized and should be displayed and processed, the payload can just be empty and an error is reported.