some include guards, todo comments

This commit is contained in:
Robin Müller 2020-06-23 10:27:44 +02:00
parent 64a02c55ba
commit c0beef4463
8 changed files with 14 additions and 10 deletions

View File

@ -137,7 +137,7 @@ void DeviceHandlerFailureIsolation::decrementFaultCounters() {
void DeviceHandlerFailureIsolation::handleRecovery(Event reason) {
clearFaultCounters();
if (!recoveryCounter.incrementAndCheck()) {
if (not recoveryCounter.incrementAndCheck()) {
startRecovery(reason);
} else {
setFaulty(reason);

View File

@ -31,6 +31,7 @@ protected:
bool hasPowerConfirmation = false;
MessageQueueId_t powerConfirmation;
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 REBOOT_TIME_MS = 180000;
static const uint32_t MAX_STRANGE_REPLIES = 10;

View File

@ -4,6 +4,7 @@
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include <framework/ipc/MessageQueueSenderIF.h>
// TODO: Documentation.
class ConfirmsFailuresIF {
public:
static const uint8_t INTERFACE_ID = CLASS_ID::HANDLES_FAILURES_IF;

View File

@ -9,7 +9,8 @@ FailureIsolationBase::FailureIsolationBase(object_id_t owner,
object_id_t parent, uint8_t messageDepth, uint8_t parameterDomainBase) :
eventQueue(NULL), ownerId(owner), owner(NULL),
faultTreeParent(parent), parameterDomainBase(parameterDomainBase) {
eventQueue = QueueFactory::instance()->createMessageQueue(messageDepth, EventMessage::EVENT_MESSAGE_SIZE);
eventQueue = QueueFactory::instance()->createMessageQueue(messageDepth,
EventMessage::EVENT_MESSAGE_SIZE);
}
FailureIsolationBase::~FailureIsolationBase() {

View File

@ -1,5 +1,5 @@
#ifndef HEALTHTABLE_H_
#define HEALTHTABLE_H_
#ifndef FRAMEWORK_HEALTH_HEALTHTABLE_H_
#define FRAMEWORK_HEALTH_HEALTHTABLE_H_
#include <framework/health/HealthTableIF.h>
#include <framework/objectmanager/SystemObject.h>

View File

@ -1,5 +1,5 @@
#ifndef HEALTHTABLEIF_H_
#define HEALTHTABLEIF_H_
#ifndef FRAMEWORK_HEALTH_HEALTHTABLEIF_H_
#define FRAMEWORK_HEALTH_HEALTHTABLEIF_H_
#include <framework/health/ManagesHealthIF.h>
#include <framework/objectmanager/ObjectManagerIF.h>
@ -8,6 +8,8 @@
class HealthTableIF: public ManagesHealthIF {
// TODO: This is in the mission folder and not in the framework folder.
// delete it?
friend class HealthCommandingService;
public:
virtual ~HealthTableIF() {
@ -23,4 +25,4 @@ protected:
virtual ReturnValue_t iterate(std::pair<object_id_t,HasHealthIF::HealthState> *value, bool reset = false) = 0;
};
#endif /* HEALTHTABLEIF_H_ */
#endif /* FRAMEWORK_HEALTH_HEALTHTABLEIF_H_ */

View File

@ -12,7 +12,6 @@ public:
/**
* Allows sending messages without actually "owing" a message queue.
* Not sure whether this is actually a good idea.
* Must be implemented by a subclass.
*/
static ReturnValue_t sendMessage(MessageQueueId_t sendTo,
MessageQueueMessageIF* message, size_t maxMessageSize,

View File

@ -1,5 +1,5 @@
#ifndef HASRETURNVALUESIF_H_
#define HASRETURNVALUESIF_H_
#ifndef FRAMEWORK_RETURNVALUES_HASRETURNVALUESIF_H_
#define FRAMEWORK_RETURNVALUES_HASRETURNVALUESIF_H_
#include <framework/returnvalues/FwClassIds.h>
#include <config/returnvalues/classIds.h>