CFDP SOURCE handler #157

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

View File

@ -83,5 +83,19 @@ ReturnValue_t cfdp::SourceHandler::checksumGeneration() {
} }
ReturnValue_t cfdp::SourceHandler::putRequest(PutRequestFull& putRequest, RemoteEntityCfg& cfg) { ReturnValue_t cfdp::SourceHandler::putRequest(PutRequestFull& putRequest, RemoteEntityCfg& cfg) {
transactionParams.closureRequested = putRequest.closureRequested;
transactionParams.destId = putRequest.destId;
transactionParams.transmissionMode = putRequest.transmissionMode;
if (transactionParams.transmissionMode == TransmissionMode::ACKNOWLEDGED) {
}
if (putRequest.sourceNameSize > transactionParams.sourceName.size()) {
return FAILED;
}
std::memcpy(transactionParams.sourceName.data(), putRequest.sourceName,
putRequest.sourceNameSize);
if (putRequest.destNameSize > transactionParams.destName.size()) {
return FAILED;
}
std::memcpy(transactionParams.destName.data(), putRequest.destName, putRequest.destNameSize);
return 0; return 0;
} }

View File

@ -55,6 +55,9 @@ class SourceHandler {
std::vector<char> sourceName; std::vector<char> sourceName;
std::vector<char> destName; std::vector<char> destName;
cfdp::FileSize fileSize; cfdp::FileSize fileSize;
EntityId destId;
TransmissionMode transmissionMode;
bool closureRequested;
} transactionParams; } transactionParams;
cfdp::CfdpState state = cfdp::CfdpState::IDLE; cfdp::CfdpState state = cfdp::CfdpState::IDLE;
TransactionStep step = TransactionStep::IDLE; TransactionStep step = TransactionStep::IDLE;