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.
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 |
transition: AWAITING_ACK
|
|||
transition: IDLE
|
Events¶
SEND_MESSAGE¶
This event is shared from the parent machine.
This event is handled identically in 1 states.
These states handle this event:
This yields a state density of 50%.
These actions are taken in response to this event:
MESSAGE_RECEIVED¶
This event is shared from the parent machine.
This event is handled identically in 1 states.
These states handle this event:
This yields a state density of 50%.
These actions are taken in response to this event:
ACK¶
This event is handled identically in 1 states.
These states handle this event:
This yields a state density of 50%.
These actions are taken in response to this event:
States¶
IDLE¶
These events are handled in this state:
This yields an event density of 33%.
These actions are taken in this state:
These states transition into this state:
This state transitions into these states:
AWAITING_ACK¶
These events are handled in this state:
This yields an event density of 66%.
These actions are taken in this state:
These states transition into this state:
This state transitions into these states:
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.
This action returns:
noEvent
checkQueue¶
This action returns:
noEvent
parseMessage¶
This action returns:
noEvent