2020-08-13 20:53:35 +02:00
|
|
|
#include "../events/EventManagerIF.h"
|
|
|
|
#include "ObjectManager.h"
|
|
|
|
#include "SystemObject.h"
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
SystemObject::SystemObject(object_id_t setObjectId, bool doRegister) :
|
|
|
|
objectId(setObjectId), registered(doRegister) {
|
|
|
|
if (registered) {
|
|
|
|
objectManager->insert(objectId, this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SystemObject::~SystemObject() {
|
|
|
|
if (registered) {
|
|
|
|
objectManager->remove(objectId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
object_id_t SystemObject::getObjectId() const {
|
2016-06-15 23:48:41 +02:00
|
|
|
return objectId;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SystemObject::triggerEvent(Event event, uint32_t parameter1,
|
|
|
|
uint32_t parameter2) {
|
|
|
|
EventManagerIF::triggerEvent(objectId, event, parameter1, parameter2);
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t SystemObject::initialize() {
|
|
|
|
return HasReturnvaluesIF::RETURN_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t SystemObject::checkObjectConnections() {
|
|
|
|
return HasReturnvaluesIF::RETURN_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SystemObject::forwardEvent(Event event, uint32_t parameter1, uint32_t parameter2) const {
|
|
|
|
EventManagerIF::triggerEvent(objectId, event, parameter1, parameter2);
|
|
|
|
}
|