renormalize CHB
This commit is contained in:
parent
4abdc436fb
commit
b07b19327c
@ -1,45 +1,45 @@
|
||||
#include "../subsystem/SubsystemBase.h"
|
||||
#include "../devicehandlers/ChildHandlerBase.h"
|
||||
#include "../subsystem/SubsystemBase.h"
|
||||
|
||||
ChildHandlerBase::ChildHandlerBase(object_id_t setObjectId,
|
||||
object_id_t deviceCommunication, CookieIF * cookie,
|
||||
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->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;
|
||||
}
|
||||
#include "../subsystem/SubsystemBase.h"
|
||||
#include "../devicehandlers/ChildHandlerBase.h"
|
||||
#include "../subsystem/SubsystemBase.h"
|
||||
|
||||
ChildHandlerBase::ChildHandlerBase(object_id_t setObjectId,
|
||||
object_id_t deviceCommunication, CookieIF * cookie,
|
||||
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->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;
|
||||
}
|
||||
|
@ -1,26 +1,26 @@
|
||||
#ifndef FSFW_DEVICES_CHILDHANDLERBASE_H_
|
||||
#define FSFW_DEVICES_CHILDHANDLERBASE_H_
|
||||
|
||||
#include "ChildHandlerFDIR.h"
|
||||
#include "DeviceHandlerBase.h"
|
||||
|
||||
class ChildHandlerBase: public DeviceHandlerBase {
|
||||
public:
|
||||
ChildHandlerBase(object_id_t setObjectId, object_id_t deviceCommunication,
|
||||
CookieIF * cookie, uint32_t thermalStatePoolId,
|
||||
uint32_t thermalRequestPoolId,
|
||||
object_id_t parent = objects::NO_OBJECT,
|
||||
FailureIsolationBase* customFdir = nullptr,
|
||||
size_t cmdQueueSize = 20);
|
||||
virtual ~ChildHandlerBase();
|
||||
|
||||
virtual ReturnValue_t initialize();
|
||||
|
||||
protected:
|
||||
const uint32_t parentId;
|
||||
ChildHandlerFDIR childHandlerFdir;
|
||||
|
||||
};
|
||||
|
||||
#endif /* FSFW_DEVICES_CHILDHANDLERBASE_H_ */
|
||||
#define FSFW_DEVICES_CHILDHANDLERBASE_H_
|
||||
|
||||
#include "ChildHandlerFDIR.h"
|
||||
#include "DeviceHandlerBase.h"
|
||||
|
||||
class ChildHandlerBase: public DeviceHandlerBase {
|
||||
public:
|
||||
ChildHandlerBase(object_id_t setObjectId, object_id_t deviceCommunication,
|
||||
CookieIF * cookie, uint32_t thermalStatePoolId,
|
||||
uint32_t thermalRequestPoolId,
|
||||
object_id_t parent = objects::NO_OBJECT,
|
||||
FailureIsolationBase* customFdir = nullptr,
|
||||
size_t cmdQueueSize = 20);
|
||||
virtual ~ChildHandlerBase();
|
||||
|
||||
virtual ReturnValue_t initialize();
|
||||
|
||||
protected:
|
||||
const uint32_t parentId;
|
||||
ChildHandlerFDIR childHandlerFdir;
|
||||
|
||||
};
|
||||
|
||||
#endif /* FSFW_DEVICES_CHILDHANDLERBASE_H_ */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user