Comments (4)
Mmm ... you are using a reversed approach, which might actually work... in fact, if you get for instance a CLCW value equal to e.g. 8, and FopSlWnd=2 it means that frames 7 and 6 are acked. Well, try to change the code and re-run the unit tests. If that works, feel free to propose a pull request for me to integrate, so that you will be given the proper credits :)
from ccsds.
Hi Lucas,
Thanks a lot for your feedback and for the question.
In short, the acknowledgement that you receive from the CLCW via its report value is not related to 'a single frame', but to 'all frames before the reported one'. In other words, the CLCW report value is telling the FOP engine which is the next frame counter value that the FARM is expecting, meaning that the FARM received all frames before that one.
In order to delete a succesfully transferred frame (i.e. 5 in your example), the report value must contain the value 6. Therefore the expander set is initialised the fopSlidingWindow values, i.e. all the possible report values that will mark the frame as 'acknowledged'. So 6 and 7, in your example.
Remember: the FARM is not expected to acknowledge each and every single frame with a corresponding report value. I might have a FOP sliding window of 20, I can send then TC frames from 0 to 19 (assuming that the CLCW is reporting me a report value = 0 when I start sending) in, let's say, 2 seconds (depending on the transmission bitrate) and, depending on the TM frame generation rate on-board (assume 1 frame per second), I could get back CLCWs with report values like: 3, 7, 13, 18, 20 in the following 5 seconds. With the first report value I see (3), the FOP knows that the FARM processed correctly the first 3 TC frames (0, 1, 2). With the second value (7), the FOP knows that up to TC frame 6 was correctly received, and so on.
I hope it is clearer how it works now, and therefore why there is + 1 there :)
Cheers,
Dario
from ccsds.
Ahah!
the CLCW report value is telling the FOP engine which is the next frame counter value that the FARM is expecting
That was the part I was missing. I was assuming the CLCW to contain the frame counter of the last received frame. I should have read the spec better.
Thank you so much for the clear explanation, and cheers as well!
from ccsds.
And while we're at it: I was wondering if the expander
couldn't be computed only once (and out of loop), like:
while(acked && !this.sentQueue.isEmpty()) {
...
int currentNNR = next.getFrame().getVirtualChannelFrameCount();
Set<Integer> expander = new HashSet<>();
for(int i = 0; i < fopSlidingWindow; ++i) {
expander.add((currentNNR + 1 + i) % 256);
}
// If the set contains the clcw report, all fine
if(expander.contains((int) clcw.getReportValue())) {
...
}
...
}
could maybe become something along the lines of:
// Out of while loop
int NR = (int) clcw.getReportValue();
Set<Integer> expander = new HashSet<>();
for(int i = 0; i < fopSlidingWindow; ++i) {
expander.add((NR - 1 - i + 256) % 256);
}
while(acked && !this.sentQueue.isEmpty()) {
...
int currentNNR = next.getFrame().getVirtualChannelFrameCount();
if(expander.contains(currentNNR)) {
...
}
...
}
?
from ccsds.
Related Issues (12)
- SLE_E_CONFIG error in RCF configuration HOT 3
- Compilation failure HOT 4
- Help for example TMProcessor HOT 9
- Possibilità di un confronto :) HOT 1
- Convolutional coding support HOT 1
- AOS Bitstream extraction bug HOT 2
- Protocol abort at high rate HOT 4
- Many objects in the library are not implementing Serializable HOT 2
- TC Frames lost once processed in the FopEngine HOT 1
- deploy problem? HOT 4
- Where can I get the SLE API HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ccsds.