10BC0 #1041 fix getBinaryLength when pus11 set by Stefuniverse · Pull Request #1045 · yamcs/yamcs · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Stefuniverse
Copy link

This PR shall fix #1041

The getBinaryLength() method does not take the additional length of the command into account. This is a quick fix until the function is rewritten in a ordered manner as suggested in the issue. Feel free to comment or improve! I am not that deep into the topic, its just what I found in a very limited time with the codebase.

The PR descriptionen stated that I need to fill out a .pdf for the contribution. Where can I submit that? Your help is much appreciated :)

@xpromache
Copy link
Member

Thanks for the pull request, I will accept it but can you please sign the CLA and send it to yamcs at spaceapplications.com?

In addition: I think the pus11Crc option is bogus.

The CRC of the TC11 should be governed by the configuration of the error correction (errorDetectionCalculator != null) because the spacecraft is checking the CRC right when it receives commands before looking what's inside.

We should have perhaps an option if to set a CRC on the inner command because if we have one on the outer one, the inner CRC is probably not required.

I notice the hasCrc function is bogus as well - it should not check for the presence of the secondary header.

(Because I remember to have changed that not long ago, I discovered there is another PusPacketPostprocessor into the org.yamcs.tctm package, that one should go, but I can take care of it, I have to mark it as obsolete for a while)

In conclusion, if you would:

  1. Sign the CLA
  2. Replace the pus11Crc option with pus11InnerCrc (or another name you find more suggestive)
  3. Update the CRC logic -> outer CRC based on errorDetectionCalculator (if not null), inner CRC based on the pus11InnerCrc option
  4. Fix the hasCrc function, or remove it altogether since it’s only doing a null check

…the world would be forever grateful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ArrayIndexOutOfBoundsException when scheduling PUS 11 TC via UdpTcFrameLink

2 participants

0