TM working
Some checks failed
fsfw/fsfw/pipeline/head There was a failure building this commit

This commit is contained in:
Ulrich Mohr 2023-07-14 16:10:21 +02:00
parent a30146a799
commit 979a7b7d75
3 changed files with 20 additions and 7 deletions

View File

@ -196,6 +196,10 @@ ReturnValue_t DeviceHandlerBase::initialize() {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
result = datapoolHelper.initialize();
if (result != returnvalue::OK) {
return result;
}
result = fdirInstance->initialize(); result = fdirInstance->initialize();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;

View File

@ -1,8 +1,9 @@
#include "HousekeepingHelper.h" #include "HousekeepingHelper.h"
#include "GeneratesHousekeepingIF.h"
#include <fsfw/objectmanager/ObjectManager.h> #include <fsfw/objectmanager/ObjectManager.h>
#include "GeneratesHousekeepingIF.h"
HousekeepingHelper::HousekeepingHelper(GeneratesHousekeepingIF* owner) : owner(owner) {} HousekeepingHelper::HousekeepingHelper(GeneratesHousekeepingIF* owner) : owner(owner) {}
ReturnValue_t HousekeepingHelper::initialize() { ReturnValue_t HousekeepingHelper::initialize() {
@ -26,14 +27,20 @@ void HousekeepingHelper::registerSet(HousekeepingSet* set) {
housekeepingSets.emplace(id, set); housekeepingSets.emplace(id, set);
} }
ReturnValue_t HousekeepingHelper::reportHousekeeping(HousekeepingSet* set, const Action* action) { ReturnValue_t HousekeepingHelper::reportHousekeeping(HousekeepingSet* set, const Action* action) {
SystemObjectIF* ownerAsObject = dynamic_cast<SystemObjectIF*>(owner); SystemObjectIF* ownerAsObject = dynamic_cast<SystemObjectIF*>(owner);
if (ownerAsObject == nullptr) { if (ownerAsObject == nullptr) {
sif::error << "Duuuuuuuude, what the hell?" << std::endl; sif::error << "Duuuuuuuude, what the hell?" << std::endl;
return returnvalue::FAILED; return returnvalue::FAILED;
} }
return tmManager->sendTmPacket(ownerAsObject->getObjectId(), GeneratesHousekeepingIF::INTERFACE_ID, store_address_t tc;
GeneratesHousekeepingIF::Functions::REPORT, set, size_t tcOffset = 0;
action->tc, action->tcOffset); if (action != nullptr) {
tc = action->tc;
tcOffset = action->tcOffset;
}
return tmManager->sendTmPacket(ownerAsObject->getObjectId(),
GeneratesHousekeepingIF::INTERFACE_ID,
GeneratesHousekeepingIF::Functions::REPORT, set, tc, tcOffset);
} }

View File

@ -14,6 +14,8 @@ void HousekeepingSet::setEnum(EnumIF* theEnum) {
id = theEnum->getValue(); id = theEnum->getValue();
description = theEnum->getDescription(); description = theEnum->getDescription();
} }
const char* HousekeepingSet::getDescription() const { return description; }
#else #else
HousekeepingSet::HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSetId_t id) : id(id) { HousekeepingSet::HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSetId_t id) : id(id) {
if (owner != nullptr) { if (owner != nullptr) {
@ -26,7 +28,7 @@ HousekeepingSet::HousekeepingSet(GeneratesHousekeepingIF* owner, HousekeepingSet
HousekeepingSet::~HousekeepingSet() {} HousekeepingSet::~HousekeepingSet() {}
void HousekeepingSet::report(const Action* action) { void HousekeepingSet::report(const Action* action) {
if (helper == nullptr) { if (helper != nullptr) {
helper->reportHousekeeping(this, action); helper->reportHousekeeping(this, action);
} }
} }