5V stack commanding for device handlers #335
@ -25,7 +25,7 @@ PayloadPcduHandler::PayloadPcduHandler(object_id_t objectId, object_id_t comIF,
|
|||||||
sdcMan(sdcMan) {}
|
sdcMan(sdcMan) {}
|
||||||
|
|
||||||
void PayloadPcduHandler::doStartUp() {
|
void PayloadPcduHandler::doStartUp() {
|
||||||
if ((state != States::PL_PCDU_OFF) and (state != States::ON_TRANS_SSR)) {
|
if (state > States::STACK_5V_CORRECT) {
|
||||||
// Config error
|
// Config error
|
||||||
sif::error << "PayloadPcduHandler::doStartUp: Invalid state" << std::endl;
|
sif::error << "PayloadPcduHandler::doStartUp: Invalid state" << std::endl;
|
||||||
}
|
}
|
||||||
@ -60,16 +60,13 @@ void PayloadPcduHandler::doShutDown() {
|
|||||||
std::memset(adcSet.processed.value, 0, adcSet.processed.getSerializedSize());
|
std::memset(adcSet.processed.value, 0, adcSet.processed.getSerializedSize());
|
||||||
clearSetOnOffFlag = false;
|
clearSetOnOffFlag = false;
|
||||||
}
|
}
|
||||||
|
ReturnValue_t retval = stackHandler.deviceToOff(StackCommander::PL_PCDU, true);
|
||||||
if (state == States::STACK_5V_SWITCHING) {
|
if (retval == BUSY) {
|
||||||
ReturnValue_t retval = stackHandler.deviceToOff(StackCommander::PL_PCDU, true);
|
return;
|
||||||
if (retval == BUSY) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
state = States::PL_PCDU_OFF;
|
|
||||||
// No need to set mode _MODE_POWER_DOWN, power switching was already handled
|
|
||||||
setMode(MODE_OFF);
|
|
||||||
}
|
}
|
||||||
|
state = States::PL_PCDU_OFF;
|
||||||
|
// No need to set mode _MODE_POWER_DOWN, power switching was already handled
|
||||||
|
setMode(MODE_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PayloadPcduHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
void PayloadPcduHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user