49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
|
#include "AcsController.h"
|
||
|
|
||
|
AcsController::AcsController() {
|
||
|
}
|
||
|
|
||
|
AcsController::~AcsController() {
|
||
|
}
|
||
|
|
||
|
ReturnValue_t AcsController::initialize() {
|
||
|
|
||
|
ControllerBase::initialize();
|
||
|
}
|
||
|
|
||
|
ReturnValue_t AcsController::handleCommandMessage(CommandMessage * message) {
|
||
|
ReturnValue_t result = actionHelper.handleActionMessage(message);
|
||
|
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||
|
return HasReturnvaluesIF::RETURN_OK;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
void AcsController::performControlOperation() {
|
||
|
if (mode != MODE_OFF) {
|
||
|
monitoring.monitor(&acsParameters);
|
||
|
switch (submode) {
|
||
|
case SUBMODE_SAFE:
|
||
|
performSafe(SAFE_CONTROLLER);
|
||
|
break;
|
||
|
case SUBMODE_IDLE:
|
||
|
performPointing(IDLE_CONTROLLER);
|
||
|
break;
|
||
|
case SUBMODE_NADIR:
|
||
|
performPointing(NADIR_CONTROLLER);
|
||
|
break;
|
||
|
case SUBMODE_TARGET:
|
||
|
performPointing(TARGET_CONTROLLER);
|
||
|
break;
|
||
|
case SUBMODE_INERTIAL:
|
||
|
performPointing(INERTIAL_CONTROLLER);
|
||
|
break;
|
||
|
case SUBMODE_ROTATION:
|
||
|
performPointing(ROTATION_CONTROLLER);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|