.. establishSession.rst This file automatically generated by FSMLang ================= establishSession ================= 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. .. list-table:: Machine Statistics :align: left * - 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 .. list-table:: State Chart :align: left :header-rows: 1 :stub-columns: 1 :class: scrollable * - - :ref:`ESTABLISH_SESSION_REQUEST ` - :ref:`STEP0_RESPONSE ` - :ref:`STEP1_RESPONSE ` - :ref:`MESSAGE_RECEIVED ` * - :ref:`IDLE ` - | :ref:`sendStep0Message ` | transition: :ref:`AWAITING_RESPONSE ` - - - * - :ref:`AWAITING_RESPONSE ` - - :ref:`sendStep1Message ` - | :ref:`notifyParent ` | transition: :ref:`IDLE ` - :ref:`parseMessage ` Events ------- .. _hsmCommunicator.establishSession.ESTABLISH_SESSION_REQUEST: ESTABLISH_SESSION_REQUEST ~~~~~~~~~~~~~~~~~~~~~~~~~~ This event is handled identically in 1 states. These states handle this event: * :ref:`IDLE ` This yields a state density of 50%. These actions are taken in response to this event: * :ref:`sendStep0Message ` .. _hsmCommunicator.establishSession.STEP0_RESPONSE: STEP0_RESPONSE ~~~~~~~~~~~~~~~ This event is handled identically in 1 states. These states handle this event: * :ref:`AWAITING_RESPONSE ` This yields a state density of 50%. These actions are taken in response to this event: * :ref:`sendStep1Message ` .. _hsmCommunicator.establishSession.STEP1_RESPONSE: STEP1_RESPONSE ~~~~~~~~~~~~~~~ This event is handled identically in 1 states. These states handle this event: * :ref:`AWAITING_RESPONSE ` This yields a state density of 50%. These actions are taken in response to this event: * :ref:`notifyParent ` .. _hsmCommunicator.establishSession.MESSAGE_RECEIVED: MESSAGE_RECEIVED ~~~~~~~~~~~~~~~~~ This event is shared from the parent machine. This event is handled identically in 1 states. These states handle this event: * :ref:`AWAITING_RESPONSE ` This yields a state density of 50%. These actions are taken in response to this event: * :ref:`parseMessage ` States ------- .. _hsmCommunicator.establishSession.IDLE: IDLE ~~~~~ These events are handled in this state: * :ref:`ESTABLISH_SESSION_REQUEST ` This yields an event density of 25%. These actions are taken in this state: * :ref:`sendStep0Message ` These states transition into this state: * :ref:`AWAITING_RESPONSE ` This state transitions into these states: * :ref:`AWAITING_RESPONSE ` .. _hsmCommunicator.establishSession.AWAITING_RESPONSE: AWAITING_RESPONSE ~~~~~~~~~~~~~~~~~~ These events are handled in this state: * :ref:`STEP0_RESPONSE ` * :ref:`STEP1_RESPONSE ` * :ref:`MESSAGE_RECEIVED ` This yields an event density of 75%. These actions are taken in this state: * :ref:`sendStep1Message ` * :ref:`notifyParent ` * :ref:`parseMessage ` These states transition into this state: * :ref:`IDLE ` This state transitions into these states: * :ref:`IDLE ` Actions -------- .. _hsmCommunicator.establishSession.sendStep0Message: sendStep0Message ~~~~~~~~~~~~~~~~~ This action returns: * noEvent .. _hsmCommunicator.establishSession.sendStep1Message: sendStep1Message ~~~~~~~~~~~~~~~~~ This action returns: * noEvent .. _hsmCommunicator.establishSession.notifyParent: notifyParent ~~~~~~~~~~~~~ This action returns: * :ref:`SESSION_ESTABLISHED ` .. _hsmCommunicator.establishSession.parseMessage: parseMessage ~~~~~~~~~~~~~ This action returns: * :ref:`STEP0_RESPONSE ` * :ref:`STEP1_RESPONSE ` * noEvent