[libpri-commits] rmudgett: branch rmudgett/q931_fsm r2249 - /team/rmudgett/q931_fsm/doc/

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Mar 10 16:37:06 CST 2011


Author: rmudgett
Date: Thu Mar 10 16:37:02 2011
New Revision: 2249

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2249
Log:
Q.931 pseudo code FSM skeleton files.

Added:
    team/rmudgett/q931_fsm/doc/q931_global_cr.fsm   (with props)
    team/rmudgett/q931_fsm/doc/q931_net.fsm   (with props)
    team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm   (with props)
    team/rmudgett/q931_fsm/doc/q931_user.fsm   (with props)

Added: team/rmudgett/q931_fsm/doc/q931_global_cr.fsm
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/q931_fsm/doc/q931_global_cr.fsm?view=auto&rev=2249
==============================================================================
--- team/rmudgett/q931_fsm/doc/q931_global_cr.fsm (added)
+++ team/rmudgett/q931_fsm/doc/q931_global_cr.fsm Thu Mar 10 16:37:02 2011
@@ -1,0 +1,125 @@
+/*
+ * FSM pseudo code used in the design/implementation of the
+ * Q.931 global call reference.
+ *
+ * Q.931 Section 5.5
+ * Q.931 Annex A Figure A.4
+ */
+FSM q931_global_cr
+{
+	Prolog {
+	}
+	Init {
+		Next_State q931_global_null;
+	}
+	Epilog {
+	}
+	Stimulus Q931_EV_MGMT_DESTROY {
+		/* Terminate the FSM */
+		Next_State *;
+	}
+	Stimulus Q931_EV_MSG_STATUS {
+		/* Ignore STATUS messages. */
+	}
+	Stimulus Q931_EV_MSG_other {
+		Action Send(STATUS(PRI_CAUSE_INVALID_CALL_REFERENCE));
+	}
+
+	State q931_global_null {
+		Prolog {
+			Action Set_State(Q931_GLOBAL_STATE_NULL);
+		}
+		Init {
+		}
+		Epilog {
+		}
+		Stimulus Q931_EV_MSG_RESTART {
+			Action Post_Restart_Channels(Channels);
+			Action Start_T317;
+			Next_State q931_global_restart;
+		}
+		Stimulus Q931_EV_MGMT_RESTART_REQ(Channels) {
+			Action Clear_Count;
+			Action Send(RESTART(Channels));
+			Action Start_T316;
+			Action Post_Restart_Channels(Channels);
+			Action Start_T317;
+			Next_State q931_global_restart_req;
+		}
+	}
+	State q931_global_restart_req {
+		Prolog {
+			Action Set_State(Q931_GLOBAL_STATE_RESTART_REQUEST);
+			Action Set_Restart_Rsp(0);
+			Action Set_Restart_Ack(0);
+		}
+		Init {
+		}
+		Epilog {
+			Action Stop_T316;
+			Action Stop_T317;
+		}
+		Stimulus Q931_EV_TIMEOUT_T316 {
+			Action Inc_Count;
+			Test = Get_Count;
+			Test < 2 {
+				Action Send(RESTART(Channels));
+				Action Start_T316;
+			}
+			Test == 2 {
+				Action Maintenance("No response to RESTART");
+			}
+		}
+		Stimulus Q931_EV_TIMEOUT_T317 {
+			Action Maintenance("What's taking so long for us to restart?");
+		}
+		Stimulus Q931_EV_MSG_RESTART_ACKNOWLEDGE {
+			Action Stop_T316;
+			Test = Get_Restart_Rsp;
+			Test != 0 {
+				Next_State q931_global_null;
+			}
+			Action Set_Restart_Rsp(1);
+		}
+		Stimulus Q931_EV_MGMT_RESTARTED(Channel) {
+			Action Accumulate_Restarted_Channels(Channel);
+			Test = Get_All_Channels_Restarted;
+			Test == Yes {
+				Action Stop_T317;
+				Test = Get_Restart_Ack;
+				Test != 0 {
+					Next_State q931_global_null;
+				}
+				Action Set_Restart_Rsp(1);
+			}
+		}
+	}
+	State q931_global_restart {
+		Prolog {
+			Action Set_State(Q931_GLOBAL_STATE_RESTART);
+		}
+		Init {
+		}
+		Epilog {
+			Action Stop_T317;
+		}
+		Stimulus Q931_EV_TIMEOUT_T317 {
+			Action Maintenance("What's taking so long for us to restart?");
+			/*
+			 * Q.931 Section 5.5 says we should send a RESTART_ACKNOWLEDGE
+			 * with the channels restarted so far.
+			 */
+		}
+		Stimulus Q931_EV_MGMT_RESTARTED(Channel) {
+			Action Accumulate_Restarted_Channels(Channel);
+			Test = Get_All_Channels_Restarted;
+			Test == Yes {
+				Action Send(RESTART_ACKNOWLEDGE);
+				Next_State q931_global_null;
+			}
+		}
+		Stimulus Q931_EV_MSG_RESTART {
+			/* Deviation, we'll ignore the repeated message. */
+		}
+	}
+}

Propchange: team/rmudgett/q931_fsm/doc/q931_global_cr.fsm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/rmudgett/q931_fsm/doc/q931_global_cr.fsm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/rmudgett/q931_fsm/doc/q931_global_cr.fsm
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/rmudgett/q931_fsm/doc/q931_net.fsm
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/q931_fsm/doc/q931_net.fsm?view=auto&rev=2249
==============================================================================
--- team/rmudgett/q931_fsm/doc/q931_net.fsm (added)
+++ team/rmudgett/q931_fsm/doc/q931_net.fsm Thu Mar 10 16:37:02 2011
@@ -1,0 +1,198 @@
+/*
+ * FSM pseudo code used in the design/implementation of the
+ * Q.931 net side.
+ *
+ * Q.931 Section 5
+ * Q.931 Annex A Figure A.6
+ */
+FSM q931_net
+{
+	Prolog {
+	}
+	Init {
+		Next_State q931_net_null;
+	}
+	Epilog {
+	}
+	Stimulus Q931_EV_MGMT_DESTROY {
+		/* Terminate the FSM */
+		Next_State *;
+	}
+	Stimulus Q931_EV_MSG_STATUS {
+	}
+	Stimulus Q931_EV_MSG_RELEASE_COMPLETE {
+	}
+	Stimulus Q931_EV_MSG_other {
+		Action Send(STATUS(PRI_CAUSE_INVALID_CALL_REFERENCE));
+	}
+
+	State q931_net_null {// aka N0
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_NULL);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_call_initiated {// aka N1
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_INITIATED);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_overlap_sending {// aka N2
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_OVERLAP_SENDING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_outgoing_call_proceeding {// aka N3
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_call_delivered {// aka N4
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_DELIVERED);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_call_present {// aka N6
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_PRESENT);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_call_received {// aka N7
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_RECEIVED);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_connect_request {// aka N8
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CONNECT_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_incoming_call_proceeding {// aka N9
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_INCOMING_CALL_PROCEEDING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_active {// aka N10
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_ACTIVE);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_disconnect_request {// aka N11
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_DISCONNECT_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_disconnect_indication {// aka N12
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_DISCONNECT_INDICATION);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_suspend_request {// aka N15
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_SUSPEND_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_resume_request {// aka N17
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_RESUME_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_release_request {// aka N19
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_RELEASE_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_overlap_receiving {// aka N25
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_OVERLAP_RECEIVING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_net_call_independent_service {// aka N31
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_INDEPENDENT_SERVICE);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+}

Propchange: team/rmudgett/q931_fsm/doc/q931_net.fsm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/rmudgett/q931_fsm/doc/q931_net.fsm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/rmudgett/q931_fsm/doc/q931_net.fsm
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm?view=auto&rev=2249
==============================================================================
--- team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm (added)
+++ team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm Thu Mar 10 16:37:02 2011
@@ -1,0 +1,90 @@
+/*
+ * FSM pseudo code used in the design/implementation of the
+ * Q.931 NT PTMP side.
+ *
+ * Q.931 Section 5
+ */
+FSM q931_nt_ptmp
+{
+	Prolog {
+	}
+	Init {
+		Next_State q931_nt_ptmp_null;
+	}
+	Epilog {
+	}
+	Stimulus Q931_EV_MGMT_DESTROY {
+		/* Terminate the FSM */
+		Next_State *;
+	}
+
+	State q931_nt_ptmp_null {// aka N0
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_NULL);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_nt_ptmp_call_present {// aka N6
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_PRESENT);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_nt_ptmp_call_received {// aka N7
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_RECEIVED);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_nt_ptmp_incoming_call_proceeding {// aka N9
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_INCOMING_CALL_PROCEEDING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_nt_ptmp_active {// aka N10
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_ACTIVE);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_nt_ptmp_call_abort {// aka N22
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_ABORT);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_nt_ptmp_overlap_receiving {// aka N25
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_OVERLAP_RECEIVING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+}

Propchange: team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/rmudgett/q931_fsm/doc/q931_nt_ptmp.fsm
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/rmudgett/q931_fsm/doc/q931_user.fsm
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/q931_fsm/doc/q931_user.fsm?view=auto&rev=2249
==============================================================================
--- team/rmudgett/q931_fsm/doc/q931_user.fsm (added)
+++ team/rmudgett/q931_fsm/doc/q931_user.fsm Thu Mar 10 16:37:02 2011
@@ -1,0 +1,198 @@
+/*
+ * FSM pseudo code used in the design/implementation of the
+ * Q.931 user side.
+ *
+ * Q.931 Section 5
+ * Q.931 Annex A Figure A.3
+ */
+FSM q931_user
+{
+	Prolog {
+	}
+	Init {
+		Next_State q931_user_null;
+	}
+	Epilog {
+	}
+	Stimulus Q931_EV_MGMT_DESTROY {
+		/* Terminate the FSM */
+		Next_State *;
+	}
+	Stimulus Q931_EV_MSG_STATUS {
+	}
+	Stimulus Q931_EV_MSG_RELEASE_COMPLETE {
+	}
+	Stimulus Q931_EV_MSG_other {
+		Action Send(STATUS(PRI_CAUSE_INVALID_CALL_REFERENCE));
+	}
+
+	State q931_user_null {// aka U0
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_NULL);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_call_initiated {// aka U1
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_INITIATED);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_overlap_sending {// aka U2
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_OVERLAP_SENDING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_outgoing_call_proceeding {// aka U3
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_call_delivered {// aka U4
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_DELIVERED);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_call_present {// aka U6
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_PRESENT);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_call_received {// aka U7
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_RECEIVED);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_connect_request {// aka U8
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CONNECT_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_incoming_call_proceeding {// aka U9
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_INCOMING_CALL_PROCEEDING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_active {// aka U10
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_ACTIVE);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_disconnect_request {// aka U11
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_DISCONNECT_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_disconnect_indication {// aka U12
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_DISCONNECT_INDICATION);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_suspend_request {// aka U15
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_SUSPEND_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_resume_request {// aka U17
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_RESUME_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_release_request {// aka U19
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_RELEASE_REQUEST);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_overlap_receiving {// aka U25
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_OVERLAP_RECEIVING);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+
+	State q931_user_call_independent_service {// aka U31
+		Prolog {
+			Action Set_State(Q931_CALL_STATE_CALL_INDEPENDENT_SERVICE);
+		}
+		Init {
+		}
+		Epilog {
+		}
+	}
+}

Propchange: team/rmudgett/q931_fsm/doc/q931_user.fsm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/rmudgett/q931_fsm/doc/q931_user.fsm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/rmudgett/q931_fsm/doc/q931_user.fsm
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the libpri-commits mailing list