Send a message to the peer.
Since the protocol allows only one message to be outsanding, the machine dequeues and transmits a message only from the IDLE state, transitioning to the AWAITING_ACK state immediately thereafter.
In the AWAITNG_ACK state, incomming messages are parsed and, when an ACK is found, the machine checks the queue and transitions to the IDLE state. Checking the queue can return the SEND_MESSAGE event, which will be handled from the IDLE state, thus resulting in a transmission and return to the AWAITING_ACK state.
Number of events | 3 |
---|---|
Events not handled | 0 |
Events handled in one state | 3 |
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 |
(hsmCommunicator::) SEND_MESSAGE | (hsmCommunicator::) MESSAGE_RECEIVED | ACK | |
---|---|---|---|
IDLE | sendMessage returns:
transition : AWAITING_ACK Dequeue and transmit message to the peer. |
transition : none |
transition : none |
AWAITING_ACK | transition : none |
parseMessage returns:
transition : none |
checkQueue returns:
transition : IDLE Check queue for messages; if found return SEND_MESSAGE; otherwise, return noEvent. |
Events | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
|||||||||
(hsmCommunicator::) SEND_MESSAGE |
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:
|
||||||||
ACK |
Handled In 1 of 2 (50 %) States:
Causes these actions to be taken:
|
States | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||
IDLE |
Inbound Transitions:
Outbound Transitions:
Events Handled (1 of 3 for 33%):
Actions Taken:
| ||||||||||||
AWAITING_ACK |
Inbound Transitions:
Outbound Transitions:
Events Handled (2 of 3 for 66%):
Actions Taken:
|
Actions | |
---|---|
sendMessage |
Send a message to the peer. Since the protocol allows only one message to be outsanding, the machine dequeues and transmits a message only from the IDLE state, transitioning to the AWAITING_ACK state immediately thereafter. In the AWAITNG_ACK state, incomming messages are parsed and, when an ACK is found, the machine checks the queue and transitions to the IDLE state. Checking the queue can return the SEND_MESSAGE event, which will be handled from the IDLE state, thus resulting in a transmission and return to the AWAITING_ACK state. Handles an event shared from hsmCommunicator Returns:
Matrices:
|
checkQueue |
Returns:
Matrices:
|
parseMessage |
Handles an event shared from hsmCommunicator Returns:
Matrices:
|