Merge remote-tracking branch 'upstream/mueller/refactor-tmtc-stack' into mueller/refactor-tmtc-stack-retval-merged
This commit is contained in:
@ -36,7 +36,7 @@ ReturnValue_t ObjectManager::insert(object_id_t id, SystemObjectIF* object) {
|
||||
// sif::debug << "ObjectManager::insert: Object " << std::hex
|
||||
// << (int)id << std::dec << " inserted." << std::endl;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "ObjectManager::insert: Object ID " << std::hex << static_cast<uint32_t>(id)
|
||||
@ -59,7 +59,7 @@ ReturnValue_t ObjectManager::remove(object_id_t id) {
|
||||
// sif::debug << "ObjectManager::removeObject: Object " << std::hex
|
||||
// << (int)id << std::dec << " removed." << std::endl;
|
||||
#endif
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "ObjectManager::removeObject: Requested object " << std::hex << (int)id
|
||||
@ -90,11 +90,11 @@ void ObjectManager::initialize() {
|
||||
return;
|
||||
}
|
||||
objectFactoryFunction(factoryArgs);
|
||||
ReturnValue_t result = RETURN_FAILED;
|
||||
ReturnValue_t result = returnvalue::FAILED;
|
||||
uint32_t errorCount = 0;
|
||||
for (auto const& it : objectList) {
|
||||
result = it.second->initialize();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "ObjectManager::initialize: Object 0x" << std::hex << std::setw(8)
|
||||
@ -119,7 +119,7 @@ void ObjectManager::initialize() {
|
||||
errorCount = 0;
|
||||
for (auto const& it : objectList) {
|
||||
result = it.second->checkObjectConnections();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "ObjectManager::ObjectManager: Object 0x" << std::hex << (int)it.first
|
||||
<< " connection check failed with code 0x" << result << std::dec << std::endl;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef FSFW_OBJECTMANAGER_OBJECTMANAGERIF_H_
|
||||
#define FSFW_OBJECTMANAGER_OBJECTMANAGERIF_H_
|
||||
|
||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||
#include "../returnvalues/returnvalue.h"
|
||||
#include "../serviceinterface/ServiceInterface.h"
|
||||
#include "SystemObjectIF.h"
|
||||
#include "frameworkObjects.h"
|
||||
@ -16,7 +16,7 @@
|
||||
* @author Bastian Baetz
|
||||
* @ingroup system_objects
|
||||
*/
|
||||
class ObjectManagerIF : public HasReturnvaluesIF {
|
||||
class ObjectManagerIF {
|
||||
public:
|
||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::OBJECT_MANAGER_IF;
|
||||
static constexpr ReturnValue_t INSERTION_FAILED = MAKE_RETURN_CODE(1);
|
||||
@ -48,14 +48,14 @@ class ObjectManagerIF : public HasReturnvaluesIF {
|
||||
* @param id The new id to be added to the list.
|
||||
* @param object A pointer to the object to be added.
|
||||
* @return @li INSERTION_FAILED in case the object could not be inserted.
|
||||
* @li RETURN_OK in case the object was successfully inserted
|
||||
* @li returnvalue::OK in case the object was successfully inserted
|
||||
*/
|
||||
virtual ReturnValue_t insert(object_id_t id, SystemObjectIF* object) = 0;
|
||||
/**
|
||||
* @brief With this call, an object is removed from the list.
|
||||
* @param id The object id of the object to be removed.
|
||||
* @return @li NOT_FOUND in case the object was not found
|
||||
* @li RETURN_OK in case the object was successfully removed
|
||||
* @li returnvalue::OK in case the object was successfully removed
|
||||
*/
|
||||
virtual ReturnValue_t remove(object_id_t id) = 0;
|
||||
virtual void initialize() = 0;
|
||||
|
@ -22,9 +22,9 @@ void SystemObject::triggerEvent(Event event, uint32_t parameter1, uint32_t param
|
||||
EventManagerIF::triggerEvent(objectId, event, parameter1, parameter2);
|
||||
}
|
||||
|
||||
ReturnValue_t SystemObject::initialize() { return HasReturnvaluesIF::RETURN_OK; }
|
||||
ReturnValue_t SystemObject::initialize() { return returnvalue::OK; }
|
||||
|
||||
ReturnValue_t SystemObject::checkObjectConnections() { return HasReturnvaluesIF::RETURN_OK; }
|
||||
ReturnValue_t SystemObject::checkObjectConnections() { return returnvalue::OK; }
|
||||
|
||||
void SystemObject::forwardEvent(Event event, uint32_t parameter1, uint32_t parameter2) const {
|
||||
EventManagerIF::triggerEvent(objectId, event, parameter1, parameter2);
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <cstdint>
|
||||
|
||||
#include "../events/EventReportingProxyIF.h"
|
||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||
#include "../returnvalues/returnvalue.h"
|
||||
/**
|
||||
* @defgroup system_objects Software System Object Management
|
||||
* The classes to create System Objects and classes to manage these are
|
||||
@ -45,8 +45,8 @@ class SystemObjectIF : public EventReportingProxyIF {
|
||||
* which might not have been built yet.
|
||||
* Therefore, a two-step initialization resolves this problem and prevents
|
||||
* circular dependencies of not-fully initialized objects on start up.
|
||||
* @return - @c RETURN_OK in case the initialization was successful
|
||||
* - @c RETURN_FAILED otherwise
|
||||
* @return - @c returnvalue::OK in case the initialization was successful
|
||||
* - @c returnvalue::FAILED otherwise
|
||||
*/
|
||||
virtual ReturnValue_t initialize() = 0;
|
||||
/**
|
||||
@ -54,7 +54,7 @@ class SystemObjectIF : public EventReportingProxyIF {
|
||||
* for operation.
|
||||
* Some objects need certain other objects (or a certain number), to be
|
||||
* registered as children. These checks can be done in this method.
|
||||
* @return - @c RETURN_OK in case the check was successful
|
||||
* @return - @c returnvalue::OK in case the check was successful
|
||||
* - @c any other code otherwise
|
||||
*/
|
||||
virtual ReturnValue_t checkObjectConnections() = 0;
|
||||
|
Reference in New Issue
Block a user