Messaging Assocation Model: State Transitions

Incoming Events

Name Meaning
to_Inactive_MA A timeout is received indicating that an MA is no longer required.
tg_Initialise_MA This MA has just been created.
tg_Msg_To_Send A request has been made to send a C-Mode message over this MA.
er_Conn_Err An error occurred on the connection. If one existed it is now broken.
tg_Conn_Made The connection to the peer has been created.
rx_Msg_Rcvd A message has been received over this MA.
to_No_Conn A timeout is received indicating that we have been waiting too long of an incoming connection.

Outgoing Events

Name Meaning
er_MA_Destroyed Indicated that the MA was destroyed when we weren't expecting it. This is most likely caused by an network problem.
tg_Msg_Rcvd Indicate to Message Processing that a message has been received.

Actions

Name Meaning
setInactiveTimer (Re)set the inactive timer for a MA.
queueMsg Queue a message for eventual transmission by this MA
sendMsg Send a message
connect Attempt to connect to the remote node. This may include obtaining security information from the NSLP using the SecurityProtocolAttributesRequest callback.
listen Start listening for incoming connections.
cleanUpMA Perform an clean up activities before destruction.
sendQueue Send any messages in the queue.
startNoConnTimer Start the NoConn timer.
stopNoConnTimer Stop the NoConn timer.

Predicates

Name Meaning
allowConn This MA is allowed to initiate a connection.

Extended Event-State Table

State Transitions


Current State
Incoming Event [Start] Awaiting Connection Connected
tg_Initialise_MA 1 0 0
tg_Msg_To_Send 0 2 5
er_Conn_Err 0 3 3
tg_Conn_Made 0 4 0
rx_Msg_Rcvd 0 0 6
to_No_Conn 0 7 0
to_Inactive_MA 0 7 7

Processing Rules

Rule Actions / Outgoing Events Next State
0 er_Bad_MA_Event
Present State
1 if allowConn:
  connect
else:
  listen
  startNoConnTimer

Awaiting Connection


Awaiting Connection
2 queueMsg, setInactiveTimer
Present State
3 cleanUpMA, er_MA_Destroyed

4 if !allowConn:
  stopNoConnTimer
setInactiveTimer, sendQueue


Connected
5 sendMsg, setInactiveTimer
Present State
6 tg_Msg_Rcvd, setInactiveTimer
Present State
7 cleanUpMA