Merge pull request 'v3.3.0-dev for release' (#696) from v3.3.0-dev into main
All checks were successful
EIVE/eive-obsw/pipeline/pr-v2.0.5-branch This commit looks good

Reviewed-on: #696
This commit is contained in:
Robin Müller 2023-06-21 13:48:45 +02:00
commit 4ed7689956
5 changed files with 20 additions and 40 deletions

View File

@ -18,6 +18,10 @@ will consitute of a breaking change warranting a new major release:
# [v4.0.0] to be released
# [v3.3.0] 2023-06-21
Like v3.2.0 but without the custom FM changes related to VC0.
# [v3.2.0] 2023-06-21
## Fixed

View File

@ -10,7 +10,7 @@
cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 3)
set(OBSW_VERSION_MINOR 2)
set(OBSW_VERSION_MINOR 3)
set(OBSW_VERSION_REVISION 0)
# set(CMAKE_VERBOSE TRUE)
@ -81,14 +81,10 @@ else()
endif()
set(OBSW_ADD_TMTC_TCP_SERVER
# TODO: Only activate on EM when VC0 issue has been resolved.
# ${OBSW_Q7S_EM}
1
${OBSW_Q7S_EM}
CACHE STRING "Add TCP TMTC Server")
set(OBSW_ADD_TMTC_UDP_SERVER
# TODO: Disable completely when VC0 issue has been resolved
# 0
${INIT_VAL}
0
CACHE STRING "Add UDP TMTC Server")
set(OBSW_ADD_MGT
${INIT_VAL}

View File

@ -97,8 +97,7 @@ void ObjectFactory::produce(void* args) {
#if OBSW_TM_TO_PTME == 1
if (ccsdsArgs.liveDestination != nullptr) {
pusFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
// Deactivated for tests to avoid changes to VC0 usage.
// cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
cfdpFunnel->addLiveDestination("VC0 LIVE TM", *ccsdsArgs.liveDestination, 0);
}
#endif
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */

View File

@ -94,13 +94,6 @@ void TmStoreTaskBase::cancelDump(DumpContext& ctx, PersistentTmStore& store, boo
ReturnValue_t TmStoreTaskBase::handleOneDump(PersistentTmStoreWithTmQueue& store,
DumpContext& dumpContext, bool& dumpPerformed) {
ReturnValue_t result = returnvalue::OK;
// The PTME might have been reset an transmitter state change, so there is no point in continuing
// the dump.
// TODO: Will be solved in a cleaner way, this is kind of a hack.
if (not channel.isTxOn()) {
cancelDump(dumpContext, store, false);
return returnvalue::FAILED;
}
// It is assumed that the PTME will only be locked for a short period (e.g. to change datarate).
if (not channel.isBusy() and not ptmeLocked) {
performDump(store, dumpContext, dumpPerformed);
@ -138,25 +131,22 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store,
dumpContext.ptmeBusyCounter = 0;
tmSinkBusyCd.resetTimer();
ReturnValue_t result = store.getNextDumpPacket(tmReader, fileHasSwapped);
if (result != returnvalue::OK) {
sif::error << "PersistentTmStore: Getting next dump packet failed" << std::endl;
} else if (fileHasSwapped or result == PersistentTmStore::DUMP_DONE) {
if (fileHasSwapped and result == PersistentTmStore::DUMP_DONE) {
// This can happen if a file is corrupted and the next file swap completes the dump.
dumpDoneHandler();
return returnvalue::OK;
} else if (result != returnvalue::OK) {
sif::error << "PersistentTmStore: Getting next dump packet failed" << std::endl;
return result;
}
dumpedLen = tmReader.getFullPacketLen();
// Only write to VC if mode is on, but always confirm the dump.
// If the mode is OFF, it is assumed the PTME is not usable and is not allowed to be written
// (e.g. to confirm a reset or the transmitter is off anyway).
if (mode == MODE_ON) {
result = channel.write(tmReader.getFullData(), dumpedLen);
if (result == DirectTmSinkIF::IS_BUSY) {
sif::warning << "PersistentTmStore: Unexpected VC channel busy" << std::endl;
} else if (result != returnvalue::OK) {
sif::warning << "PersistentTmStore: Unexpected VC channel write failure" << std::endl;
}
result = channel.write(tmReader.getFullData(), dumpedLen);
if (result == DirectTmSinkIF::IS_BUSY) {
sif::warning << "PersistentTmStore: Unexpected VC channel busy" << std::endl;
} else if (result != returnvalue::OK) {
sif::warning << "PersistentTmStore: Unexpected VC channel write failure" << std::endl;
}
result = store.confirmDump(tmReader, fileHasSwapped);
if ((result == PersistentTmStore::DUMP_DONE or result == returnvalue::OK)) {
dumpPerformed = true;

View File

@ -11,23 +11,14 @@ ReturnValue_t VirtualChannel::sendNextTm(const uint8_t* data, size_t size) {
}
ReturnValue_t VirtualChannel::write(const uint8_t* data, size_t size) {
if (txOn) {
return ptme.writeToVc(vcId, data, size);
}
return returnvalue::OK;
return ptme.writeToVc(vcId, data, size);
}
uint8_t VirtualChannel::getVcid() const { return vcId; }
const char* VirtualChannel::getName() const { return vcName.c_str(); }
bool VirtualChannel::isBusy() const {
// Data is discarded, so channel is not busy.
if (not txOn) {
return false;
}
return ptme.isBusy(vcId);
}
bool VirtualChannel::isBusy() const { return ptme.isBusy(vcId); }
void VirtualChannel::cancelTransfer() { ptme.cancelTransfer(vcId); }