Correct usage of FED source IDs#33
Open
A-A-Abdelhamid wants to merge 1 commit into
Open
Conversation
sarafiorendi
left a comment
Collaborator
There was a problem hiding this comment.
Most of the changes shown by the diff are formatting ones.
The important one (which sourceID to use) seems fine to me, however I'd suggest that you make use of the SLinkHeaders class instead of re-defining some of the new functions that were introduced (unless there is something that I'm missing that requires you to define those yourself).
| constexpr size_t kSLinkRocketEOEOffsetFromEnd = 1; | ||
|
|
||
| constexpr unsigned char kSLinkRocketBOEMarker = 0x55; | ||
| constexpr unsigned char kSLinkRocketEOEMarker = 0xaa; |
Collaborator
There was a problem hiding this comment.
these are defined in the SLinkRocketHeaders class
| constexpr unsigned char kSLinkRocketBOEMarker = 0x55; | ||
| constexpr unsigned char kSLinkRocketEOEMarker = 0xaa; | ||
|
|
||
| uint32_t readSLinkRocketSourceId(const std::vector<char>& payloadBytes) { |
Collaborator
There was a problem hiding this comment.
instead of this function, why not using the one from the SLinkRocketHeaders class
| readLittleEndian(payloadBytes.data() + kSLinkRocketSourceIdOffset, sizeof(uint32_t))); | ||
| } | ||
|
|
||
| void verifySLinkRocketTrailerMarker(const std::vector<char>& payloadBytes) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The outer DTH Orbit Header has a source ID, and the inner SLinkRocket fragment header also has a source ID. The code did assumed that these two IDs were the same and used the Orbit Header source ID as if it were the SLinkRocket ID.
For FEDRawDataCollection::FEDData(...), we should use the inner SLinkRocket source ID, not the outer DTH Orbit Header source ID. This PR fixes this issue.
Sara confirmed that the output of the updated code now agrees with Srecko's for the C-Rack data.
Plot by Sara Fiorendi: