CFDP SOURCE handler #157
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user