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 3 additions and 7 deletions
Showing only changes of commit c199cbedaa - Show all commits

View File

@ -267,20 +267,16 @@ ReturnValue_t cfdp::SourceHandler::prepareAndSendNextFileDataPdu(bool& noFileDat
addError(result);
return result;
}
sif::debug << "sending next fd pdu, offset " << offset.value() << "" << std::endl;
auto fileDataInfo = FileDataInfo(offset, fileBuf.data(), readLen);
auto fileDataPdu = FileDataCreator(transactionParams.pduConf, fileDataInfo);
result = sendGenericPdu(fileDataPdu);
if (result != OK) {
sif::debug << "SENDING generic PDU failed" << std::endl;
return result;
}
transactionParams.progress += readLen;
if (transactionParams.progress >= fileSize) {
// Advance FSM after all file data PDUs were sent.
step = TransactionStep::SENDING_EOF;
sif::debug << "done" << std::endl;
TaskFactory::delayTask(10000);
}
return OK;
}

View File

@ -21,7 +21,7 @@ TcpTmTcBridge::TcpTmTcBridge(object_id_t objectId, object_id_t tcDestination,
: TmTcBridge("TCP TMTC Bridge", objectId, tcDestination, msgQueueDepth, tmStoreId, tcStoreId) {
mutex = MutexFactory::instance()->createMutex();
// Connection is always up, TM is requested by connecting to server and receiving packets
registerCommConnect();
TmTcBridge::registerCommConnect();
}
ReturnValue_t TcpTmTcBridge::initialize() {

View File

@ -134,8 +134,8 @@ ReturnValue_t TmTcBridge::handleTmQueue() {
#endif
#endif /* FSFW_VERBOSE_LEVEL >= 3 */
if (communicationLinkUp == false or packetSentCounter >= sentPacketsPerCycle) {
ReturnValue_t result = storeDownlinkData(&message);
if (!communicationLinkUp or packetSentCounter >= sentPacketsPerCycle) {
result = storeDownlinkData(&message);
if (result != returnvalue::OK) {
tmStore->deleteData(message.getStorageId());
}