Compare commits
14 Commits
cda81fc841
...
irini
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1910a7838c | ||
![]() |
ba3a99466a | ||
438efe074e | |||
1759700b6a | |||
c7618294ac | |||
af890c6218 | |||
7f3e5e42bb | |||
5a69c1f8b9 | |||
1d1d91f591 | |||
043b8b5b3f | |||
![]() |
ab68817e9a | ||
![]() |
36652e6fce | ||
![]() |
3749f31ab4 | ||
e0c9bf5871 |
@@ -699,9 +699,9 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
|
|||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
/* Configuration error */
|
/* Configuration error */
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "LocalDataPoolManager::performHkOperation: HK generation failed." << std::endl;
|
sif::warning << "LocalDataPoolManager::performPeriodicHkOperation: HK generation failed." << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printWarning("LocalDataPoolManager::performHkOperation: HK generation failed.\n");
|
sif::printWarning("LocalDataPoolManager::performPeriodicHkOperation: HK generation failed.\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -572,6 +572,9 @@ void DeviceHandlerBase::setMode(Mode_t newMode, uint8_t newSubmode) {
|
|||||||
mode = newMode;
|
mode = newMode;
|
||||||
modeChanged();
|
modeChanged();
|
||||||
setNormalDatapoolEntriesInvalid();
|
setNormalDatapoolEntriesInvalid();
|
||||||
|
if (newMode == MODE_OFF) {
|
||||||
|
disableCommandsAndReplies();
|
||||||
|
}
|
||||||
if (!isTransitionalMode()) {
|
if (!isTransitionalMode()) {
|
||||||
modeHelper.modeChanged(newMode, newSubmode);
|
modeHelper.modeChanged(newMode, newSubmode);
|
||||||
announceMode(false);
|
announceMode(false);
|
||||||
@@ -1567,3 +1570,22 @@ void DeviceHandlerBase::setParent(object_id_t parent) { this->parent = parent; }
|
|||||||
void DeviceHandlerBase::setPowerSwitcher(PowerSwitchIF* switcher) {
|
void DeviceHandlerBase::setPowerSwitcher(PowerSwitchIF* switcher) {
|
||||||
this->powerSwitcher = switcher;
|
this->powerSwitcher = switcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DeviceHandlerBase::disableCommandsAndReplies() {
|
||||||
|
for (auto& command : deviceCommandMap) {
|
||||||
|
if (command.second.isExecuting) {
|
||||||
|
command.second.isExecuting = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (auto& reply : deviceReplyMap) {
|
||||||
|
if (!reply.second.periodic) {
|
||||||
|
if (reply.second.countdown != nullptr) {
|
||||||
|
reply.second.countdown->timeOut();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
reply.second.delayCycles = 0;
|
||||||
|
}
|
||||||
|
reply.second.active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1325,6 +1325,11 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
|||||||
void printWarningOrError(sif::OutputTypes errorType, const char *functionName,
|
void printWarningOrError(sif::OutputTypes errorType, const char *functionName,
|
||||||
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
|
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
|
||||||
const char *errorPrint = nullptr);
|
const char *errorPrint = nullptr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disables all commands and replies when device is set to MODE_OFF
|
||||||
|
*/
|
||||||
|
void disableCommandsAndReplies();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FSFW_DEVICEHANDLERS_DEVICEHANDLERBASE_H_ */
|
#endif /* FSFW_DEVICEHANDLERS_DEVICEHANDLERBASE_H_ */
|
||||||
|
@@ -4,6 +4,7 @@ target_sources(
|
|||||||
AsciiConverter.cpp
|
AsciiConverter.cpp
|
||||||
CRC.cpp
|
CRC.cpp
|
||||||
DleEncoder.cpp
|
DleEncoder.cpp
|
||||||
|
DleParser.cpp
|
||||||
PeriodicOperationDivider.cpp
|
PeriodicOperationDivider.cpp
|
||||||
timevalOperations.cpp
|
timevalOperations.cpp
|
||||||
Type.cpp
|
Type.cpp
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
#include "DleParser.h"
|
#include "DleParser.h"
|
||||||
|
|
||||||
#include <fsfw/globalfunctions/DleEncoder.h>
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
#ifndef MISSION_DEVICES_DLEPARSER_H_
|
#pragma once
|
||||||
#define MISSION_DEVICES_DLEPARSER_H_
|
|
||||||
|
|
||||||
#include <fsfw/container/SimpleRingBuffer.h>
|
#include <fsfw/container/SimpleRingBuffer.h>
|
||||||
#include <fsfw/globalfunctions/DleEncoder.h>
|
#include <fsfw/globalfunctions/DleEncoder.h>
|
||||||
@@ -123,5 +122,3 @@ class DleParser : public HasReturnvaluesIF {
|
|||||||
Context ctx;
|
Context ctx;
|
||||||
bool startFound = false;
|
bool startFound = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_DLEPARSER_H_ */
|
|
||||||
|
Reference in New Issue
Block a user