eive-obsw/mission/system/acs/StrFdir.cpp
meggert efc0be104c
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
acs ctrl triggers event now
2024-02-13 16:45:59 +01:00

27 lines
907 B
C++

#include "StrFdir.h"
#include <eive/objects.h>
#include <fsfw/events/EventManagerIF.h>
#include <mission/acs/defs.h>
StrFdir::StrFdir(object_id_t strObject)
: DeviceHandlerFailureIsolation(strObject, objects::NO_OBJECT) {}
ReturnValue_t StrFdir::eventReceived(EventMessage* event) {
if (event->getEvent() == acs::PTG_CTRL_NO_ATTITUDE_INFORMATION) {
setFaulty(event->getEvent());
return returnvalue::OK;
}
return DeviceHandlerFailureIsolation::eventReceived(event);
}
ReturnValue_t StrFdir::initialize() {
ReturnValue_t result = DeviceHandlerFailureIsolation::initialize();
if (result != returnvalue::OK) {
return result;
}
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
return manager->subscribeToEvent(eventQueue->getId(),
event::getEventId(acs::PTG_CTRL_NO_ATTITUDE_INFORMATION));
}