CFDP SOURCE handler #157
@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
namespace cfdp {
|
namespace cfdp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper type for the CFDP File Size Sensitive (FSS) fields.
|
||||||
|
*/
|
||||||
struct Fss : public SerializeIF {
|
struct Fss : public SerializeIF {
|
||||||
public:
|
public:
|
||||||
Fss() = default;
|
Fss() = default;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
|
#include "fsfw/cfdp/pdu/EofPduCreator.h"
|
||||||
#include "fsfw/cfdp/pdu/FileDataCreator.h"
|
#include "fsfw/cfdp/pdu/FileDataCreator.h"
|
||||||
#include "fsfw/cfdp/pdu/MetadataPduCreator.h"
|
#include "fsfw/cfdp/pdu/MetadataPduCreator.h"
|
||||||
#include "fsfw/filesystem/HasFileSystemIF.h"
|
#include "fsfw/filesystem/HasFileSystemIF.h"
|
||||||
@ -200,6 +201,7 @@ ReturnValue_t cfdp::SourceHandler::prepareAndSendNextFileDataPdu() {
|
|||||||
|
|
||||||
ReturnValue_t cfdp::SourceHandler::prepareAndSendEofPdu() {
|
ReturnValue_t cfdp::SourceHandler::prepareAndSendEofPdu() {
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
|
auto eofInfo = EofInfo();
|
||||||
step = TransactionStep::WAIT_FOR_FINISH;
|
step = TransactionStep::WAIT_FOR_FINISH;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
#include "EofInfo.h"
|
#include "EofInfo.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
EofInfo::EofInfo(cfdp::ConditionCode conditionCode, uint32_t checksum, cfdp::Fss fileSize,
|
EofInfo::EofInfo(cfdp::ConditionCode conditionCode, uint32_t checksum, cfdp::Fss fileSize,
|
||||||
EntityIdTlv* faultLoc)
|
EntityIdTlv* faultLoc)
|
||||||
: conditionCode(conditionCode), checksum(checksum), fileSize(fileSize), faultLoc(faultLoc) {}
|
: conditionCode(conditionCode),
|
||||||
|
checksum(checksum),
|
||||||
|
fileSize(std::move(fileSize)),
|
||||||
|
faultLoc(faultLoc) {}
|
||||||
|
|
||||||
EofInfo::EofInfo(EntityIdTlv* faultLoc)
|
EofInfo::EofInfo(EntityIdTlv* faultLoc)
|
||||||
: conditionCode(cfdp::ConditionCode::NO_CONDITION_FIELD),
|
: conditionCode(cfdp::ConditionCode::NO_CONDITION_FIELD),
|
||||||
@ -18,13 +23,13 @@ EntityIdTlv* EofInfo::getFaultLoc() const { return faultLoc; }
|
|||||||
|
|
||||||
cfdp::Fss& EofInfo::getFileSize() { return fileSize; }
|
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) {
|
void EofInfo::setConditionCode(cfdp::ConditionCode conditionCode_) {
|
||||||
this->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) {
|
size_t EofInfo::getSerializedSize(bool fssLarge) {
|
||||||
// Condition code + spare + 4 byte checksum
|
// Condition code + spare + 4 byte checksum
|
||||||
@ -42,6 +47,6 @@ size_t EofInfo::getSerializedSize(bool fssLarge) {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t EofInfo::setFileSize(size_t fileSize, bool isLarge) {
|
ReturnValue_t EofInfo::setFileSize(size_t fileSize_, bool isLarge) {
|
||||||
return this->fileSize.setFileSize(fileSize, isLarge);
|
return this->fileSize.setFileSize(fileSize_, isLarge);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user