source transactions now working
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-09-04 11:03:32 +02:00
parent 7e9648eabf
commit c7b27c0092
Signed by: muellerr
GPG Key ID: FCE0B2BD2195142F
2 changed files with 8 additions and 5 deletions

2
fsfw

@ -1 +1 @@
Subproject commit dfcfb035bed4469aad2dad034567309d0dda7d29
Subproject commit 470f589bde405c39f5a7fbf191b11b8b48058128

View File

@ -109,16 +109,19 @@ ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) {
auto passToDestHandler = [&]() {
accessorPair.second.release();
PacketInfo info(type, msg.getStorageId(), directive);
result = destHandler.passPacket(info);
return destHandler.passPacket(info);
};
auto passToSourceHandler = [&]() {
accessorPair.second.release();
PacketInfo info(type, msg.getStorageId(), directive);
// Implement this function.
// result = srcHandler.passPacket(info);
};
if (directive == FileDirective::METADATA or directive == FileDirective::EOF_DIRECTIVE or
directive == FileDirective::PROMPT) {
// Section b) of 4.5.3: These PDUs should always be targeted towards the file receiver a.k.a.
// the destination handler
passToDestHandler();
return passToDestHandler();
} else if (directive == FileDirective::FINISH or directive == FileDirective::NAK or
directive == FileDirective::KEEP_ALIVE) {
// Section c) of 4.5.3: These PDUs should always be targeted towards the file sender a.k.a.
@ -135,7 +138,7 @@ ReturnValue_t CfdpHandler::handlePduPacket(TmTcMessage& msg) {
if (ackedDirective == FileDirective::EOF_DIRECTIVE) {
passToSourceHandler();
} else if (ackedDirective == FileDirective::FINISH) {
passToDestHandler();
return passToDestHandler();
}
}
}