action
container
contrib
controller
coordinates
datalinklayer
datapool
datapoolglob
datapoollocal
defaultcfg
devicehandlers
AcceptsDeviceResponsesIF.h
AssemblyBase.cpp
AssemblyBase.h
CMakeLists.txt
ChildHandlerBase.cpp
ChildHandlerBase.h
ChildHandlerFDIR.cpp
ChildHandlerFDIR.h
CookieIF.h
DeviceCommunicationIF.h
DeviceHandlerBase.cpp
DeviceHandlerBase.h
DeviceHandlerFailureIsolation.cpp
DeviceHandlerFailureIsolation.h
DeviceHandlerIF.h
DeviceHandlerMessage.cpp
DeviceHandlerMessage.h
DeviceTmReportingWrapper.cpp
DeviceTmReportingWrapper.h
HealthDevice.cpp
HealthDevice.h
events
fdir
globalfunctions
health
housekeeping
internalError
ipc
logo
memory
modes
monitoring
objectmanager
osal
parameters
power
pus
returnvalues
rmap
serialize
serviceinterface
storagemanager
subsystem
tasks
tcdistribution
thermal
timemanager
tmstorage
tmtcpacket
tmtcservices
unittest
.gitignore
.gitmodules
CHANGELOG
CMakeLists.txt
FSFWVersion.h
LICENSE
NOTICE
README.md
fsfw.mk
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
#include "ChildHandlerBase.h"
|
|
#include "../subsystem/SubsystemBase.h"
|
|
#include "../subsystem/SubsystemBase.h"
|
|
|
|
ChildHandlerBase::ChildHandlerBase(object_id_t setObjectId,
|
|
object_id_t deviceCommunication, CookieIF * cookie,
|
|
object_id_t hkDestination, uint32_t thermalStatePoolId,
|
|
uint32_t thermalRequestPoolId,
|
|
object_id_t parent,
|
|
FailureIsolationBase* customFdir, size_t cmdQueueSize) :
|
|
DeviceHandlerBase(setObjectId, deviceCommunication, cookie,
|
|
(customFdir == nullptr? &childHandlerFdir : customFdir),
|
|
cmdQueueSize),
|
|
parentId(parent), childHandlerFdir(setObjectId) {
|
|
this->setHkDestination(hkDestination);
|
|
this->setThermalStateRequestPoolIds(thermalStatePoolId,
|
|
thermalRequestPoolId);
|
|
|
|
}
|
|
|
|
ChildHandlerBase::~ChildHandlerBase() {
|
|
}
|
|
|
|
ReturnValue_t ChildHandlerBase::initialize() {
|
|
ReturnValue_t result = DeviceHandlerBase::initialize();
|
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
return result;
|
|
}
|
|
|
|
MessageQueueId_t parentQueue = 0;
|
|
|
|
if (parentId != objects::NO_OBJECT) {
|
|
SubsystemBase *parent = objectManager->get<SubsystemBase>(parentId);
|
|
if (parent == NULL) {
|
|
return RETURN_FAILED;
|
|
}
|
|
parentQueue = parent->getCommandQueue();
|
|
|
|
parent->registerChild(getObjectId());
|
|
}
|
|
|
|
healthHelper.setParentQueue(parentQueue);
|
|
|
|
modeHelper.setParentQueue(parentQueue);
|
|
|
|
return RETURN_OK;
|
|
}
|