remove old code
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-03-09 20:18:19 +01:00
parent d50cbe9e5b
commit fd943a99b6
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 2 additions and 52 deletions

View File

@ -19,30 +19,6 @@ PusTmFunnel::~PusTmFunnel() = default;
ReturnValue_t PusTmFunnel::performOperation(uint8_t) { ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
CommandMessage cmdMessage; CommandMessage cmdMessage;
ReturnValue_t result; ReturnValue_t result;
/*
try {
result = okStore.handleCommandQueue(ipcStore, *this);
if (result != returnvalue::OK) {
sif::error << "PusTmFunnel::performOperation: Issue handling OK store command" << std::endl;
}
result = notOkStore.handleCommandQueue(ipcStore, *this);
if (result != returnvalue::OK) {
sif::error << "PusTmFunnel::performOperation: Issue handling NOT OK store command"
<< std::endl;
}
result = hkStore.handleCommandQueue(ipcStore, *this);
if (result != returnvalue::OK) {
sif::error << "PusTmFunnel::performOperation: Issue handling HK store command" << std::endl;
}
result = miscStore.handleCommandQueue(ipcStore, *this);
if (result != returnvalue::OK) {
sif::error << "PusTmFunnel::performOperation: Issue handling MISC store command" << std::endl;
}
} catch (const std::bad_optional_access &e) {
sif::error << e.what() << "when handling TM store command" << std::endl;
}
*/
TmTcMessage currentMessage; TmTcMessage currentMessage;
unsigned int count = 0; unsigned int count = 0;
result = tmQueue->receiveMessage(&currentMessage); result = tmQueue->receiveMessage(&currentMessage);
@ -53,7 +29,7 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
break; break;
} }
count++; count++;
if (count == 500) { if (count == 1000) {
sif::error << "PusTmFunnel: Possible message storm detected" << std::endl; sif::error << "PusTmFunnel: Possible message storm detected" << std::endl;
break; break;
} }
@ -99,36 +75,12 @@ ReturnValue_t PusTmFunnel::handleTmPacket(TmTcMessage &message) {
} }
} }
// Send to registered live targets.
return demultiplexLivePackets(origStoreId, packetData, size); return demultiplexLivePackets(origStoreId, packetData, size);
// TODO: Will be moved to own thread.
// bool sdcUsable = sdcMan.isSdCardUsable(std::nullopt);
// initStoresIfPossible(sdcUsable);
// if (sdcUsable) {
// miscStore.passPacket(packet);
// okStore.passPacket(packet);
// notOkStore.passPacket(packet);
// hkStore.passPacket(packet);
// }
} }
const char *PusTmFunnel::getName() const { return "PUS TM Funnel"; } const char *PusTmFunnel::getName() const { return "PUS TM Funnel"; }
void PusTmFunnel::initStoresIfPossible(bool sdCardUsable) {
// TODO: Those will be moved to own thread.
if (not storesInitialized and sdCardUsable and sdcMan.getCurrentMountPrefix() != nullptr) {
// miscStore.initializeTmStore();
// okStore.initializeTmStore();
// hkStore.initializeTmStore();
// notOkStore.initializeTmStore();
storesInitialized = true;
}
}
ReturnValue_t PusTmFunnel::initialize() {
// initStoresIfPossible(sdcMan.isSdCardUsable(std::nullopt));
return returnvalue::OK;
}
void PusTmFunnel::addPersistentTmStoreRouting(PusPacketFilter filter, MessageQueueId_t dest) { void PusTmFunnel::addPersistentTmStoreRouting(PusPacketFilter filter, MessageQueueId_t dest) {
persistentTmMap.addRouting(filter, dest); persistentTmMap.addRouting(filter, dest);
} }

View File

@ -42,8 +42,6 @@ class PusTmFunnel : public TmFunnelBase {
PusTmRouteByFilterHelper persistentTmMap; PusTmRouteByFilterHelper persistentTmMap;
ReturnValue_t handleTmPacket(TmTcMessage &message); ReturnValue_t handleTmPacket(TmTcMessage &message);
void initStoresIfPossible(bool sdCardUsable);
ReturnValue_t initialize() override;
}; };
#endif // FSFW_EXAMPLE_COMMON_PUSTMFUNNEL_H #endif // FSFW_EXAMPLE_COMMON_PUSTMFUNNEL_H