object manager tweaks complete

This commit is contained in:
Robin Müller 2020-09-18 13:31:51 +02:00
parent f50a80fc3c
commit 3a043b5773
4 changed files with 21 additions and 17 deletions

View File

@ -1,8 +1,8 @@
#ifndef FRAMEWORK_OBJECTMANAGER_OBJECTMANAGERIF_H_
#define FRAMEWORK_OBJECTMANAGER_OBJECTMANAGERIF_H_
#ifndef FSFW_OBJECTMANAGER_OBJECTMANAGERIF_H_
#define FSFW_OBJECTMANAGER_OBJECTMANAGERIF_H_
#include "../objectmanager/frameworkObjects.h"
#include "../objectmanager/SystemObjectIF.h"
#include "frameworkObjects.h"
#include "SystemObjectIF.h"
#include "../returnvalues/HasReturnvaluesIF.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
@ -79,6 +79,7 @@ public:
/**
* @brief This is the forward declaration of the global objectManager instance.
*/
// maybe but this in the glob namespace to explicitely mark it global?
extern ObjectManagerIF *objectManager;
/*Documentation can be found in the class method declaration above.*/

View File

@ -1,6 +1,6 @@
#include "ObjectManager.h"
#include "SystemObject.h"
#include "../events/EventManagerIF.h"
#include "../objectmanager/ObjectManager.h"
#include "../objectmanager/SystemObject.h"
SystemObject::SystemObject(object_id_t setObjectId, bool doRegister) :
objectId(setObjectId), registered(doRegister) {

View File

@ -1,9 +1,9 @@
#ifndef SYSTEMOBJECT_H_
#define SYSTEMOBJECT_H_
#ifndef FSFW_OBJECTMANAGER_SYSTEMOBJECT_H_
#define FSFW_OBJECTMANAGER_SYSTEMOBJECT_H_
#include "SystemObjectIF.h"
#include "../events/Event.h"
#include "../events/EventReportingProxyIF.h"
#include "../objectmanager/SystemObjectIF.h"
#include "../timemanager/Clock.h"
/**
@ -13,7 +13,7 @@
* class that is announced to ObjectManager. It automatically includes
* itself (and therefore the inheriting class) in the object manager's
* list.
* \ingroup system_objects
* @ingroup system_objects
*/
class SystemObject: public SystemObjectIF {
private:
@ -30,14 +30,16 @@ public:
* @param parameter1
* @param parameter2
*/
virtual void triggerEvent(Event event, uint32_t parameter1 = 0, uint32_t parameter2 = 0);
virtual void triggerEvent(Event event, uint32_t parameter1 = 0,
uint32_t parameter2 = 0);
/**
* @brief The class's constructor.
* @details In the constructor, the object id is set and the class is
* inserted in the object manager.
* @param setObjectId The id the object shall have.
* @param doRegister Determines if the object is registered in the global object manager.
* @param doRegister Determines if the object is registered in
* the global object manager.
*/
SystemObject(object_id_t setObjectId, bool doRegister = true);
/**
@ -48,7 +50,8 @@ public:
virtual ReturnValue_t initialize() override;
virtual ReturnValue_t checkObjectConnections();
virtual void forwardEvent(Event event, uint32_t parameter1 = 0, uint32_t parameter2 = 0) const;
virtual void forwardEvent(Event event, uint32_t parameter1 = 0,
uint32_t parameter2 = 0) const;
};
#endif /* SYSTEMOBJECT_H_ */
#endif /* FSFW_OBJECTMANAGER_SYSTEMOBJECT_H_ */

View File

@ -1,5 +1,5 @@
#ifndef FRAMEWORK_OBJECTMANAGER_SYSTEMOBJECTIF_H_
#define FRAMEWORK_OBJECTMANAGER_SYSTEMOBJECTIF_H_
#ifndef FSFW_OBJECTMANAGER_SYSTEMOBJECTIF_H_
#define FSFW_OBJECTMANAGER_SYSTEMOBJECTIF_H_
#include "../events/EventReportingProxyIF.h"
#include "../returnvalues/HasReturnvaluesIF.h"
@ -59,4 +59,4 @@ public:
virtual ReturnValue_t checkObjectConnections() = 0;
};
#endif /* FRAMEWORK_OBJECTMANAGER_SYSTEMOBJECTIF_H_ */
#endif /* #ifndef FSFW_OBJECTMANAGER_SYSTEMOBJECTIF_H_ */