Calculated CRC to be compared with existing CRC field in the packets #108
Replies: 3 comments 9 replies
-
Actually, I checked again, our legacy code was calculating the CRC from the un-parsed packet bits, from the beginning of the header to after the length of the packet length given in the header minus the length of the CRC field. I don't believe there would be an easy way to re-code the parsed value and compute the CRC. However, this calculated CRC was still useful to catch parsing errors since, if we are off some bits when we read the packet because of a mistake, we would not read the CRC at the right location and it would then differ from the calculated CRC. |
Beta Was this translation helpful? Give feedback.
-
Hi again, I think I will try to implement that feature as a super class of VariableLength which would have additional properties for the calculated CRC and the location of the existing CRC in the packet. I'll let know here how that works. |
Beta Was this translation helpful? Give feedback.
-
Hi @ddasilva , I believe I also need the CCSDS header fields to calculate the CRC. How can I integrate them to the converter ? Currently I am blocked in line ccsdspy/ccsdspy/packet_types.py Line 106 in 270209d _fields property.
Thanks |
Beta Was this translation helpful? Give feedback.
-
Hello,
In our legacy CCSDS packet parser we had a function which added a
calculated CRC
to the parsed fields, whenever the calculated CRC was different from the one that we can read at the end of our packets, we knew we made something wrong when parsing the packet.It does not sound like a CRC at the end of the packet is part of the CCSDS standard, how common is this practice ?
Now we use CCSDSpy to parse our packets, to implement this calculated CRC feature, I was thinking to write a converter but instead of having the list of field inputs as an argument to add the converter, I would need to have all the fields but the CRC field.
Any ideas on how I could implement that with CCSDSpy VariableLength ?
Thanks
Thomas
Beta Was this translation helpful? Give feedback.
All reactions