Package org.openmuc.jeebus.ship.state
Class ConnectionDataPreparation
- java.lang.Object
-
- org.openmuc.jeebus.ship.state.State
-
- org.openmuc.jeebus.ship.state.ConnectionDataPreparation
-
- Direct Known Subclasses:
CmiState,HelloOk,SmeHelloState,SmePinState,SmeProtHState
public abstract class ConnectionDataPreparation extends State
-
-
Field Summary
Fields Modifier and Type Field Description protected ChangeStateCallBackchangeStateCBprotected Configurationconfigprotected byte[]receivedMsgprotected StateCallBackstateCBprotected java.util.List<StateTransitionCallBack>stateTransCBList-
Fields inherited from class org.openmuc.jeebus.ship.state.State
log, logPrefix, shipConnCB
-
-
Constructor Summary
Constructors Constructor Description ConnectionDataPreparation(ShipConnCallBack shipConnCB, Configuration config, java.lang.String logPrefix)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddStateTransitionCB(StateTransitionCallBack stateTransCB)abstract voiddeactivateAllTimers()ConfigurationgetConfig()abstract SubStategetSubState()abstract voidinit()voidnext()protected abstract voidnextState()byte[]peekReceivedMsg()returns the last received message without removing itbyte[]pollReceivedMsg()returns and removes the last received messagebooleanreceivedMsg()voidremoveStateTransitionCB(StateTransitionCallBack stateTransCB)voidsetReceivedMsg(byte[] receivedMsg)voidsetStateTransCBList(java.util.List<StateTransitionCallBack> stateTransCBList)abstract voidsetSubState(SubState subState)-
Methods inherited from class org.openmuc.jeebus.ship.state.State
getLogPrefix, processMsg, sendMsg
-
-
-
-
Field Detail
-
stateTransCBList
protected java.util.List<StateTransitionCallBack> stateTransCBList
-
stateCB
protected StateCallBack stateCB
-
changeStateCB
protected ChangeStateCallBack changeStateCB
-
receivedMsg
protected byte[] receivedMsg
-
config
protected Configuration config
-
-
Constructor Detail
-
ConnectionDataPreparation
public ConnectionDataPreparation(ShipConnCallBack shipConnCB, Configuration config, java.lang.String logPrefix)
-
-
Method Detail
-
init
public abstract void init()
-
next
public void next()
-
setStateTransCBList
public void setStateTransCBList(java.util.List<StateTransitionCallBack> stateTransCBList)
-
addStateTransitionCB
public void addStateTransitionCB(StateTransitionCallBack stateTransCB)
-
removeStateTransitionCB
public void removeStateTransitionCB(StateTransitionCallBack stateTransCB)
-
pollReceivedMsg
public byte[] pollReceivedMsg()
returns and removes the last received message- Returns:
- the last received message
-
peekReceivedMsg
public byte[] peekReceivedMsg()
returns the last received message without removing it- Returns:
- the last received message
-
receivedMsg
public boolean receivedMsg()
-
setReceivedMsg
public void setReceivedMsg(byte[] receivedMsg)
-
deactivateAllTimers
public abstract void deactivateAllTimers()
-
nextState
protected abstract void nextState()
-
getSubState
public abstract SubState getSubState()
-
setSubState
public abstract void setSubState(SubState subState)
-
getConfig
public Configuration getConfig()
-
-