EIVE upstream #29
@ -376,7 +376,7 @@ void DeviceHandlerBase::doStateMachine() {
|
|||||||
}
|
}
|
||||||
ReturnValue_t switchState = getStateOfSwitches();
|
ReturnValue_t switchState = getStateOfSwitches();
|
||||||
if ((switchState == PowerSwitchIF::SWITCH_OFF) || (switchState == NO_SWITCH)) {
|
if ((switchState == PowerSwitchIF::SWITCH_OFF) || (switchState == NO_SWITCH)) {
|
||||||
setMode(_MODE_SWITCH_IS_OFF);
|
setMode(MODE_OFF, SUBMODE_NONE);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case MODE_OFF:
|
case MODE_OFF:
|
||||||
@ -389,9 +389,6 @@ void DeviceHandlerBase::doStateMachine() {
|
|||||||
case MODE_NORMAL:
|
case MODE_NORMAL:
|
||||||
case MODE_ERROR_ON:
|
case MODE_ERROR_ON:
|
||||||
break;
|
break;
|
||||||
case _MODE_SWITCH_IS_OFF:
|
|
||||||
setMode(MODE_OFF, SUBMODE_NONE);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
triggerEvent(OBJECT_IN_INVALID_MODE, mode, submode);
|
triggerEvent(OBJECT_IN_INVALID_MODE, mode, submode);
|
||||||
setMode(_MODE_POWER_DOWN, 0);
|
setMode(_MODE_POWER_DOWN, 0);
|
||||||
|
@ -150,11 +150,6 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
|||||||
//! has been commanded on and the handler waits for it to be on.
|
//! has been commanded on and the handler waits for it to be on.
|
||||||
//! When the switch is on, the mode changes to @c _MODE_TO_ON.
|
//! When the switch is on, the mode changes to @c _MODE_TO_ON.
|
||||||
static const Mode_t _MODE_WAIT_ON = TRANSITION_MODE_BASE_ACTION_MASK | 4;
|
static const Mode_t _MODE_WAIT_ON = TRANSITION_MODE_BASE_ACTION_MASK | 4;
|
||||||
//! This is a transitional state which can not be commanded. The switch has
|
|
||||||
//! been commanded off and is off now. This state is only to do an RMAP
|
|
||||||
//! cycle once more where the doSendRead() function will set the mode to
|
|
||||||
//! MODE_OFF. The reason to do this is to get rid of stuck packets in the IO Board.
|
|
||||||
static const Mode_t _MODE_SWITCH_IS_OFF = TRANSITION_MODE_BASE_ACTION_MASK | 5;
|
|
||||||
|
|
||||||
void setHkDestination(object_id_t hkDestination);
|
void setHkDestination(object_id_t hkDestination);
|
||||||
|
|
||||||
|
@ -117,6 +117,20 @@ ReturnValue_t SubsystemBase::updateChildMode(MessageQueueId_t queue, Mode_t mode
|
|||||||
return CHILD_NOT_FOUND;
|
return CHILD_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SubsystemBase::updateChildModeByObjId(object_id_t objectId, Mode_t mode,
|
||||||
|
Submode_t submode) {
|
||||||
|
std::map<object_id_t, ChildInfo>::iterator iter;
|
||||||
|
|
||||||
|
for (iter = childrenMap.begin(); iter != childrenMap.end(); iter++) {
|
||||||
|
if (iter->first == objectId) {
|
||||||
|
iter->second.mode = mode;
|
||||||
|
iter->second.submode = submode;
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return CHILD_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t SubsystemBase::updateChildChangedHealth(MessageQueueId_t queue, bool changedHealth) {
|
ReturnValue_t SubsystemBase::updateChildChangedHealth(MessageQueueId_t queue, bool changedHealth) {
|
||||||
for (auto iter = childrenMap.begin(); iter != childrenMap.end(); iter++) {
|
for (auto iter = childrenMap.begin(); iter != childrenMap.end(); iter++) {
|
||||||
if (iter->second.commandQueue == queue) {
|
if (iter->second.commandQueue == queue) {
|
||||||
|
@ -115,6 +115,7 @@ class SubsystemBase : public SystemObject,
|
|||||||
Submode_t targetSubmode = SUBMODE_NONE);
|
Submode_t targetSubmode = SUBMODE_NONE);
|
||||||
|
|
||||||
ReturnValue_t updateChildMode(MessageQueueId_t queue, Mode_t mode, Submode_t submode);
|
ReturnValue_t updateChildMode(MessageQueueId_t queue, Mode_t mode, Submode_t submode);
|
||||||
|
ReturnValue_t updateChildModeByObjId(object_id_t objectId, Mode_t mode, Submode_t submode);
|
||||||
|
|
||||||
ReturnValue_t updateChildChangedHealth(MessageQueueId_t queue, bool changedHealth = true);
|
ReturnValue_t updateChildChangedHealth(MessageQueueId_t queue, bool changedHealth = true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user