org.openmuc.jeebus.ship.state.cmi.ClientEvaluate Maven / Gradle / Ivy
/*
* Copyright 2024 Fraunhofer ISE
*
* This file is part of jEEBus.SHIP
* For more information visit http://www.openmuc.org
*
* jEEBus.SHIP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* jEEBus.SHIP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with jEEBus.SHIP. If not, see http://www.gnu.org/licenses/.
*/
package org.openmuc.jeebus.ship.state.cmi;
public class ClientEvaluate extends CmiSubState {
public ClientEvaluate(CmiSubState prevSubState) {
super(prevSubState.getStateCB(), prevSubState.cmiCallBacks);
if (stateCB.receivedMsg()) {
doProcedure();
}
}
@Override
protected void procedure() {
if (isValidMsg()) {
next();
}
}
@Override
protected void setNextSubState() {
stateCB.changeStateCB().nextState();
}
@Override
public String toString() {
return "CLIENT_EVALUATE";
}
}