start implementing put request function
This commit is contained in:
parent
6322a31566
commit
06ef498a18
@ -83,5 +83,19 @@ ReturnValue_t cfdp::SourceHandler::checksumGeneration() {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -55,6 +55,9 @@ class SourceHandler {
|
||||
std::vector<char> sourceName;
|
||||
std::vector<char> destName;
|
||||
cfdp::FileSize fileSize;
|
||||
EntityId destId;
|
||||
TransmissionMode transmissionMode;
|
||||
bool closureRequested;
|
||||
} transactionParams;
|
||||
cfdp::CfdpState state = cfdp::CfdpState::IDLE;
|
||||
TransactionStep step = TransactionStep::IDLE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user