fsfw/src/fsfw/devicehandlers/ChildHandlerBase.cpp

40 lines
1.3 KiB
C++
Raw Normal View History

2021-07-13 20:22:54 +02:00
#include "fsfw/devicehandlers/ChildHandlerBase.h"
2020-09-01 11:52:18 +02:00
2022-02-02 10:29:30 +01:00
#include "fsfw/subsystem/SubsystemBase.h"
2020-09-01 11:52:18 +02:00
2022-02-02 10:29:30 +01:00
ChildHandlerBase::ChildHandlerBase(object_id_t setObjectId, object_id_t deviceCommunication,
2022-09-29 16:47:23 +02:00
CookieIF* cookie, object_id_t parent,
FailureIsolationBase* customFdir, size_t cmdQueueSize)
2022-02-02 10:29:30 +01:00
: DeviceHandlerBase(setObjectId, deviceCommunication, cookie,
(customFdir == nullptr ? &childHandlerFdir : customFdir), cmdQueueSize),
parentId(parent),
2022-09-29 16:47:23 +02:00
childHandlerFdir(setObjectId) {}
2020-09-01 11:52:18 +02:00
2022-02-02 10:29:30 +01:00
ChildHandlerBase::~ChildHandlerBase() {}
2020-09-01 11:52:18 +02:00
ReturnValue_t ChildHandlerBase::initialize() {
2022-02-02 10:29:30 +01:00
ReturnValue_t result = DeviceHandlerBase::initialize();
2022-08-16 01:08:26 +02:00
if (result != returnvalue::OK) {
2022-02-02 10:29:30 +01:00
return result;
}
2020-09-01 11:52:18 +02:00
2022-09-29 19:39:37 +02:00
// TODO: Fix this
// MessageQueueId_t parentQueue = 0;
//
// if (parentId != objects::NO_OBJECT) {
// SubsystemBase* parent = ObjectManager::instance()->get<SubsystemBase>(parentId);
// if (parent == NULL) {
// return returnvalue::FAILED;
// }
// parentQueue = parent->getCommandQueue();
//
// parent->registerChild(getObjectId());
// }
//
// healthHelper.setParentQueue(parentQueue);
//
// modeHelper.setParentQueue(parentQueue);
2020-09-01 11:52:18 +02:00
2022-08-16 01:08:26 +02:00
return returnvalue::OK;
2020-09-01 11:52:18 +02:00
}