hsmCommunicator

This machine manages communications using a "stop and wait" protocol. Only one message is allowed to be outstanding.

Before any message can be exchanged, however, a session must be established with the peer. Establishing a connection requires several exchanges to authenticate. The connection will remain active as long as messages continue to be exchanged with a minimum frequency.

PlantUML diagram separately generated.
  SEND_MESSAGE SESSION_ESTABLISHED SESSION_TIMEOUT
IDLE startSessionEstablishment
returns:
  • SEND_MESSAGE

transition : ESTABLISHING_SESSION
 
transition : none
 
transition : none
ESTABLISHING_SESSION requestMessageTransmission
returns:
  • sendMessage::SEND_MESSAGE

transition : none
completeSessionStart
returns:
  • sendMessage::SESSION_ESTABLISHED

transition : IN_SESSION
notifySessionTimeout
returns:
  • sendMessage::SESSION_TIMEOUT

transition : IDLE
IN_SESSION requestMessageTransmission
returns:
  • sendMessage::SEND_MESSAGE

transition : none
 
transition : none
notifySessionTimeout
returns:
  • sendMessage::SESSION_TIMEOUT

transition : IDLE
Events
SEND_MESSAGE  
SESSION_ESTABLISHED  
SESSION_TIMEOUT  
States
IDLE  
ESTABLISHING_SESSION The work in this state is done by the establishSession sub-machine
IN_SESSION  
Actions
startSessionEstablishment Start the session establishment process by activating the establishSession machine.

Returns:
  • SEND_MESSAGE
completeSessionStart Start the session timer and notify the sendMessage machine that the session is established.

Returns:
  • sendMessage::SESSION_ESTABLISHED
notifySessionTimeout Notify the sendMessage machine that the session has timed-out.

Returns:
  • sendMessage::SESSION_TIMEOUT
requestMessageTransmission Extend the session timer and pass the message to be sent to the sendMessage machine.

Returns:
  • sendMessage::SEND_MESSAGE
Sub Machines
establishSession Establish a connection with the peer.
sendMessage Transmit message to the peer.