WIP: somethings wrong.. #19
@ -137,7 +137,7 @@ void DeviceHandlerFailureIsolation::decrementFaultCounters() {
|
|||||||
|
|
||||||
void DeviceHandlerFailureIsolation::handleRecovery(Event reason) {
|
void DeviceHandlerFailureIsolation::handleRecovery(Event reason) {
|
||||||
clearFaultCounters();
|
clearFaultCounters();
|
||||||
if (!recoveryCounter.incrementAndCheck()) {
|
if (not recoveryCounter.incrementAndCheck()) {
|
||||||
startRecovery(reason);
|
startRecovery(reason);
|
||||||
} else {
|
} else {
|
||||||
setFaulty(reason);
|
setFaulty(reason);
|
||||||
|
@ -31,6 +31,7 @@ protected:
|
|||||||
bool hasPowerConfirmation = false;
|
bool hasPowerConfirmation = false;
|
||||||
MessageQueueId_t powerConfirmation;
|
MessageQueueId_t powerConfirmation;
|
||||||
static object_id_t powerConfirmationId;
|
static object_id_t powerConfirmationId;
|
||||||
|
// TODO: Are those hardcoded value? How can they be changed.
|
||||||
static const uint32_t MAX_REBOOT = 1;
|
static const uint32_t MAX_REBOOT = 1;
|
||||||
static const uint32_t REBOOT_TIME_MS = 180000;
|
static const uint32_t REBOOT_TIME_MS = 180000;
|
||||||
static const uint32_t MAX_STRANGE_REPLIES = 10;
|
static const uint32_t MAX_STRANGE_REPLIES = 10;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
||||||
#include <framework/ipc/MessageQueueSenderIF.h>
|
#include <framework/ipc/MessageQueueSenderIF.h>
|
||||||
|
|
||||||
|
// TODO: Documentation.
|
||||||
class ConfirmsFailuresIF {
|
class ConfirmsFailuresIF {
|
||||||
public:
|
public:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::HANDLES_FAILURES_IF;
|
static const uint8_t INTERFACE_ID = CLASS_ID::HANDLES_FAILURES_IF;
|
||||||
|
@ -9,7 +9,8 @@ FailureIsolationBase::FailureIsolationBase(object_id_t owner,
|
|||||||
object_id_t parent, uint8_t messageDepth, uint8_t parameterDomainBase) :
|
object_id_t parent, uint8_t messageDepth, uint8_t parameterDomainBase) :
|
||||||
eventQueue(NULL), ownerId(owner), owner(NULL),
|
eventQueue(NULL), ownerId(owner), owner(NULL),
|
||||||
faultTreeParent(parent), parameterDomainBase(parameterDomainBase) {
|
faultTreeParent(parent), parameterDomainBase(parameterDomainBase) {
|
||||||
eventQueue = QueueFactory::instance()->createMessageQueue(messageDepth, EventMessage::EVENT_MESSAGE_SIZE);
|
eventQueue = QueueFactory::instance()->createMessageQueue(messageDepth,
|
||||||
|
EventMessage::EVENT_MESSAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
FailureIsolationBase::~FailureIsolationBase() {
|
FailureIsolationBase::~FailureIsolationBase() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef HEALTHTABLE_H_
|
#ifndef FRAMEWORK_HEALTH_HEALTHTABLE_H_
|
||||||
#define HEALTHTABLE_H_
|
#define FRAMEWORK_HEALTH_HEALTHTABLE_H_
|
||||||
|
|
||||||
#include <framework/health/HealthTableIF.h>
|
#include <framework/health/HealthTableIF.h>
|
||||||
#include <framework/objectmanager/SystemObject.h>
|
#include <framework/objectmanager/SystemObject.h>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef HEALTHTABLEIF_H_
|
#ifndef FRAMEWORK_HEALTH_HEALTHTABLEIF_H_
|
||||||
#define HEALTHTABLEIF_H_
|
#define FRAMEWORK_HEALTH_HEALTHTABLEIF_H_
|
||||||
|
|
||||||
#include <framework/health/ManagesHealthIF.h>
|
#include <framework/health/ManagesHealthIF.h>
|
||||||
#include <framework/objectmanager/ObjectManagerIF.h>
|
#include <framework/objectmanager/ObjectManagerIF.h>
|
||||||
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
|
|
||||||
class HealthTableIF: public ManagesHealthIF {
|
class HealthTableIF: public ManagesHealthIF {
|
||||||
|
// TODO: This is in the mission folder and not in the framework folder.
|
||||||
|
// delete it?
|
||||||
friend class HealthCommandingService;
|
friend class HealthCommandingService;
|
||||||
public:
|
public:
|
||||||
virtual ~HealthTableIF() {
|
virtual ~HealthTableIF() {
|
||||||
@ -23,4 +25,4 @@ protected:
|
|||||||
virtual ReturnValue_t iterate(std::pair<object_id_t,HasHealthIF::HealthState> *value, bool reset = false) = 0;
|
virtual ReturnValue_t iterate(std::pair<object_id_t,HasHealthIF::HealthState> *value, bool reset = false) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* HEALTHTABLEIF_H_ */
|
#endif /* FRAMEWORK_HEALTH_HEALTHTABLEIF_H_ */
|
||||||
|
@ -12,7 +12,6 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Allows sending messages without actually "owing" a message queue.
|
* Allows sending messages without actually "owing" a message queue.
|
||||||
* Not sure whether this is actually a good idea.
|
* Not sure whether this is actually a good idea.
|
||||||
* Must be implemented by a subclass.
|
|
||||||
*/
|
*/
|
||||||
static ReturnValue_t sendMessage(MessageQueueId_t sendTo,
|
static ReturnValue_t sendMessage(MessageQueueId_t sendTo,
|
||||||
MessageQueueMessageIF* message, size_t maxMessageSize,
|
MessageQueueMessageIF* message, size_t maxMessageSize,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef HASRETURNVALUESIF_H_
|
#ifndef FRAMEWORK_RETURNVALUES_HASRETURNVALUESIF_H_
|
||||||
#define HASRETURNVALUESIF_H_
|
#define FRAMEWORK_RETURNVALUES_HASRETURNVALUESIF_H_
|
||||||
|
|
||||||
#include <framework/returnvalues/FwClassIds.h>
|
#include <framework/returnvalues/FwClassIds.h>
|
||||||
#include <config/returnvalues/classIds.h>
|
#include <config/returnvalues/classIds.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user