Establish a connection with the peer. Two messages must be exchanged with the peer to successfully establish the session. The machine needs only two states, IDLE and AWAITING_RESPONSE since the top level machine tracks whether or not it is in a session. The AWAITING_RESPONSE state serves for both required messages, since the receipt of each message produces a unique event. When the STEP1_RESPONSE event is received, the session is considered established. This machine will then return the parent's SESSION_ESTABLISHED message and move to its IDLE state.
| Number of events | 4 |
|---|---|
| Events not handled | 0 |
| Events handled in one state | 4 |
| At least one event handled the same in all states? | no |
| Number of states | 2 |
| Number of states with entry functions | 0 |
| Number of states with exit functions | 0 |
| States handling no events | 0 |
| States handling exactly one event | 1 |
| States with no way in | 0 |
| States with no way out | 0 |
| ESTABLISH_SESSION_REQUEST | STEP0_RESPONSE | STEP1_RESPONSE | (hsmCommunicator::) MESSAGE_RECEIVED | |
|---|---|---|---|---|
| IDLE | sendStep0Message returns:
transition : AWAITING_RESPONSE Start the session establishment process. |
transition : none |
transition : none |
transition : none |
| AWAITING_RESPONSE | transition : none |
sendStep1Message returns:
transition : none Continue session establisment |
notifyParent returns:
transition : IDLE Notify parent that session is established. |
parseMessage returns:
transition : none Parse the incoming message |
| Events | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
|||||||||
| ESTABLISH_SESSION_REQUEST |
Handled In 1 of 2 (50 %) States:
Causes these actions to be taken:
|
||||||||
| STEP0_RESPONSE |
Handled In 1 of 2 (50 %) States:
Causes these actions to be taken:
|
||||||||
| STEP1_RESPONSE |
Handled In 1 of 2 (50 %) States:
Causes these actions to be taken:
|
||||||||
| (hsmCommunicator::) MESSAGE_RECEIVED |
Handled In 1 of 2 (50 %) States:
Causes these actions to be taken:
|
||||||||
| States | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||
| IDLE |
Inbound Transitions:
Outbound Transitions:
Events Handled (1 of 4 for 25%):
Actions Taken:
| ||||||||||||
| AWAITING_RESPONSE |
Inbound Transitions:
Outbound Transitions:
Events Handled (3 of 4 for 75%):
Actions Taken:
| ||||||||||||
| Actions | |
|---|---|
| sendStep0Message |
Returns:
Matrices:
|
| sendStep1Message |
Returns:
Matrices:
|
| notifyParent |
Returns:
Matrices:
|
| parseMessage |
Handles an event shared from hsmCommunicator Returns:
Matrices:
|