improvements
This commit is contained in:
parent
a2cb348ee3
commit
01fbb2d9fd
@ -95,6 +95,7 @@ void HeaterHandler::readCommandQueue() {
|
||||
break;
|
||||
} else if (result != returnvalue::OK) {
|
||||
sif::warning << "HeaterHandler::readCommandQueue: Message reception error" << std::endl;
|
||||
break;
|
||||
}
|
||||
result = actionHelper.handleActionMessage(&command);
|
||||
if (result == returnvalue::OK) {
|
||||
|
@ -12,6 +12,7 @@ const char* CfdpTmFunnel::getName() const { return "CFDP TM Funnel"; }
|
||||
|
||||
ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) {
|
||||
TmTcMessage currentMessage;
|
||||
unsigned int count = 0;
|
||||
ReturnValue_t status = tmQueue->receiveMessage(¤tMessage);
|
||||
while (status == returnvalue::OK) {
|
||||
status = handlePacket(currentMessage);
|
||||
@ -19,6 +20,11 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) {
|
||||
sif::warning << "CfdpTmFunnel packet handling failed" << std::endl;
|
||||
break;
|
||||
}
|
||||
count++;
|
||||
if(count == 500) {
|
||||
sif::error << "CfdpTmFunnel: Possible message storm detected" << std::endl;
|
||||
break;
|
||||
}
|
||||
status = tmQueue->receiveMessage(¤tMessage);
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ PusTmFunnel::~PusTmFunnel() = default;
|
||||
|
||||
ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
|
||||
TmTcMessage currentMessage;
|
||||
unsigned int count = 0;
|
||||
ReturnValue_t status = tmQueue->receiveMessage(¤tMessage);
|
||||
while (status == returnvalue::OK) {
|
||||
status = handlePacket(currentMessage);
|
||||
@ -19,6 +20,11 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
|
||||
sif::warning << "TmFunnel packet handling failed" << std::endl;
|
||||
break;
|
||||
}
|
||||
count++;
|
||||
if(count == 500) {
|
||||
sif::error << "PusTmFunnel: Possible message storm detected" << std::endl;
|
||||
break;
|
||||
}
|
||||
status = tmQueue->receiveMessage(¤tMessage);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ ReturnValue_t VirtualChannel::performOperation() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
TmTcMessage message;
|
||||
|
||||
unsigned int count = 0;
|
||||
while (tmQueue->receiveMessage(&message) == returnvalue::OK) {
|
||||
store_address_t storeId = message.getStorageId();
|
||||
const uint8_t* data = nullptr;
|
||||
@ -45,9 +46,10 @@ ReturnValue_t VirtualChannel::performOperation() {
|
||||
}
|
||||
|
||||
tmStore->deleteData(storeId);
|
||||
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
count++;
|
||||
if(count == 500) {
|
||||
sif::error << "VirtualChannel: Possible message storm detected" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user