a lot of good stuff
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2023-09-06 13:40:38 +02:00
parent a7ac383423
commit c64f1f8693
15 changed files with 145 additions and 57 deletions

View File

@ -9,6 +9,7 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
store_address_t origStoreId, const uint8_t* tmData,
size_t tmSize) {
ReturnValue_t result = returnvalue::OK;
// sif::debug << "tm size: " << tmSize << " for " << destinations.size() << " destinations" << std::endl;
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
const auto& dest = destinations[idx];
if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) {
@ -18,12 +19,22 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
result = tmStore.addData(&storeId, tmData, tmSize);
if (result == returnvalue::OK) {
message.setStorageId(storeId);
} else {
} else if (result == StorageManagerIF::DATA_STORAGE_FULL) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl;
uint8_t fillCounts[10];
uint8_t written = 0;
tmStore.getFillCount(fillCounts, &written);
sif::error << "Fill counts: ";
for(uint8_t fillIdx = 0; fillIdx < written; fillIdx++) {
sif::error << fillCounts[fillIdx];
if(fillIdx < written - 1) {
sif::error << ", ";
}
}
sif::error << std::endl;
#endif
tmStore.deleteData(origStoreId);
break;
continue;
}
} else {
message.setStorageId(origStoreId);