CFDP SOURCE handler #157

Merged
muellerr merged 107 commits from cfdp-source-handler into develop 2023-10-19 10:59:55 +02:00
3 changed files with 17 additions and 7 deletions
Showing only changes of commit 1bfb695b41 - Show all commits

View File

@ -8,6 +8,9 @@
namespace cfdp {
/**
* Helper type for the CFDP File Size Sensitive (FSS) fields.
*/
struct Fss : public SerializeIF {
public:
Fss() = default;

View File

@ -4,6 +4,7 @@
#include <array>
#include "fsfw/cfdp/pdu/EofPduCreator.h"
#include "fsfw/cfdp/pdu/FileDataCreator.h"
#include "fsfw/cfdp/pdu/MetadataPduCreator.h"
#include "fsfw/filesystem/HasFileSystemIF.h"
@ -200,6 +201,7 @@ ReturnValue_t cfdp::SourceHandler::prepareAndSendNextFileDataPdu() {
ReturnValue_t cfdp::SourceHandler::prepareAndSendEofPdu() {
// TODO: Implement
auto eofInfo = EofInfo();
step = TransactionStep::WAIT_FOR_FINISH;
return OK;
}

View File

@ -1,8 +1,13 @@
#include "EofInfo.h"
#include <utility>
EofInfo::EofInfo(cfdp::ConditionCode conditionCode, uint32_t checksum, cfdp::Fss fileSize,
EntityIdTlv* faultLoc)
: conditionCode(conditionCode), checksum(checksum), fileSize(fileSize), faultLoc(faultLoc) {}
: conditionCode(conditionCode),
checksum(checksum),
fileSize(std::move(fileSize)),
faultLoc(faultLoc) {}
EofInfo::EofInfo(EntityIdTlv* faultLoc)
: conditionCode(cfdp::ConditionCode::NO_CONDITION_FIELD),
@ -18,13 +23,13 @@ EntityIdTlv* EofInfo::getFaultLoc() const { return faultLoc; }
cfdp::Fss& EofInfo::getFileSize() { return fileSize; }
void EofInfo::setChecksum(uint32_t checksum) { this->checksum = checksum; }
void EofInfo::setChecksum(uint32_t checksum_) { this->checksum = checksum_; }
void EofInfo::setConditionCode(cfdp::ConditionCode conditionCode) {
this->conditionCode = conditionCode;
void EofInfo::setConditionCode(cfdp::ConditionCode conditionCode_) {
this->conditionCode = conditionCode_;
}
void EofInfo::setFaultLoc(EntityIdTlv* faultLoc) { this->faultLoc = faultLoc; }
void EofInfo::setFaultLoc(EntityIdTlv* faultLoc_) { this->faultLoc = faultLoc_; }
size_t EofInfo::getSerializedSize(bool fssLarge) {
// Condition code + spare + 4 byte checksum
@ -42,6 +47,6 @@ size_t EofInfo::getSerializedSize(bool fssLarge) {
return size;
}
ReturnValue_t EofInfo::setFileSize(size_t fileSize, bool isLarge) {
return this->fileSize.setFileSize(fileSize, isLarge);
ReturnValue_t EofInfo::setFileSize(size_t fileSize_, bool isLarge) {
return this->fileSize.setFileSize(fileSize_, isLarge);
}