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-30 13:30:07 +02:00
|
|
|
CookieIF* cookie, HasModeTreeChildrenIF& parent,
|
2022-09-29 16:47:23 +02:00
|
|
|
FailureIsolationBase* customFdir, size_t cmdQueueSize)
|
2022-02-02 10:29:30 +01:00
|
|
|
: DeviceHandlerBase(setObjectId, deviceCommunication, cookie,
|
|
|
|
(customFdir == nullptr ? &childHandlerFdir : customFdir), cmdQueueSize),
|
2022-09-30 13:30:07 +02:00
|
|
|
parent(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-30 13:30:07 +02:00
|
|
|
return DeviceHandlerBase::connectModeTreeParent(parent);
|
2020-09-01 11:52:18 +02:00
|
|
|
}
|