Class SmeHelloState
- java.lang.Object
-
- org.openmuc.jeebus.ship.state.State
-
- org.openmuc.jeebus.ship.state.ConnectionDataPreparation
-
- org.openmuc.jeebus.ship.state.smehello.SmeHelloState
-
public class SmeHelloState extends ConnectionDataPreparation
-
-
Field Summary
Fields Modifier and Type Field Description protected TrustCheckCallBacktrustCB-
Fields inherited from class org.openmuc.jeebus.ship.state.ConnectionDataPreparation
changeStateCB, config, receivedMsg, stateCB, stateTransCBList
-
Fields inherited from class org.openmuc.jeebus.ship.state.State
log, logPrefix, shipConnCB
-
-
Constructor Summary
Constructors Constructor Description SmeHelloState(ShipConnCallBack shipConnCB, Configuration config, java.lang.String logPrefix)
-
Method Summary
-
Methods inherited from class org.openmuc.jeebus.ship.state.ConnectionDataPreparation
addStateTransitionCB, getConfig, next, peekReceivedMsg, pollReceivedMsg, receivedMsg, removeStateTransitionCB, setReceivedMsg, setStateTransCBList
-
Methods inherited from class org.openmuc.jeebus.ship.state.State
getLogPrefix, sendMsg
-
-
-
-
Field Detail
-
trustCB
protected TrustCheckCallBack trustCB
-
-
Constructor Detail
-
SmeHelloState
public SmeHelloState(ShipConnCallBack shipConnCB, Configuration config, java.lang.String logPrefix)
-
-
Method Detail
-
init
public void init()
- Specified by:
initin classConnectionDataPreparation
-
startWFRTimer
public void startWFRTimer()
-
startSendProlongationReqTimer
public void startSendProlongationReqTimer(int timeout)
-
startProlongationReqReplyTimer
public void startProlongationReqReplyTimer()
-
getWaitForReady
public TimeoutTimer getWaitForReady()
-
setWaitForReady
public void setWaitForReady(TimeoutTimer waitForReady)
-
getSendProlongationReq
public TimeoutTimer getSendProlongationReq()
-
getProlongationReqReply
public TimeoutTimer getProlongationReqReply()
-
deactivateTimer
public void deactivateTimer(TimeoutTimer timeoutTimer)
-
processMsg
public void processMsg(byte[] msg)
- Specified by:
processMsgin classState
-
getSubState
public SmeHelloSubState getSubState()
- Specified by:
getSubStatein classConnectionDataPreparation
-
setSubState
public void setSubState(SubState subState)
- Specified by:
setSubStatein classConnectionDataPreparation
-
nextState
protected void nextState()
- Specified by:
nextStatein classConnectionDataPreparation
-
deactivateAllTimers
public void deactivateAllTimers()
- Specified by:
deactivateAllTimersin classConnectionDataPreparation
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
commonAbort
public void commonAbort()
-
calculateWFRLeft
protected int calculateWFRLeft(long waitForReadyElapsed)
helper method, calculates how much time is left until the waitForReady-timer times out, for "hello"-messages- Parameters:
waitForReadyElapsed- the elapsed time of the waitForReady-timer in millis- Returns:
- T_hello_inc-value in millis minus waitForReadyElapsed
-
switchToReady
public void switchToReady()
switch from basic state PENDING to READY. Should only be used right after authentication of communication partner.
-
getLastReceivedMsg
public HelloMsg getLastReceivedMsg()
-
setLastReceivedMsg
public void setLastReceivedMsg(HelloMsg lastReceivedMsg)
-
getAcceptedProlongationRequests
public int getAcceptedProlongationRequests()
-
getT_hello_init
public int getT_hello_init()
-
getT_hello_inc
public int getT_hello_inc()
-
getT_hello_prolong_thr_inc
public int getT_hello_prolong_thr_inc()
-
getT_hello_prolong_waiting_gap
public int getT_hello_prolong_waiting_gap()
-
getT_hello_prolong_min
public int getT_hello_prolong_min()
-
-