common function for irq limiters
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-02-20 18:41:26 +01:00
parent bcce945cce
commit 94262a9d04
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 9 additions and 4 deletions

View File

@ -185,8 +185,7 @@ ReturnValue_t PdecHandler::irqOperation() {
// No TCs for timeout period
checkLocks();
genericCheckCd.resetTimer();
interruptCounter = 0;
interruptWindowCd.resetTimer();
resetIrqLimiters();
} else if (ret >= 1) {
nb = read(fd, &info, sizeof(info));
interruptCounter++;
@ -214,8 +213,7 @@ ReturnValue_t PdecHandler::irqOperation() {
TaskFactory::delayTask(400);
break;
}
interruptWindowCd.resetTimer();
interruptCounter = 0;
resetIrqLimiters();
}
}
// Clear interrupts with dummy read
@ -638,6 +636,11 @@ void PdecHandler::printPdecMon() {
uint32_t PdecHandler::readFar() { return *(registerBaseAddress + PDEC_FAR_OFFSET); }
void PdecHandler::resetIrqLimiters() {
interruptWindowCd.resetTimer();
interruptCounter = 0;
}
std::string PdecHandler::getMonStatusString(uint32_t status) {
switch (status) {
case TC_CHANNEL_INACTIVE:

View File

@ -301,6 +301,8 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc
*/
void checkLocks();
void resetIrqLimiters();
/**
* @brief Analyzes the FramAna field (frame analysis data) of a FAR report.
*