1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 1 /*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 2 +-----------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 3 | Project :
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 4 | Modul :
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 5 +-----------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 6 | Copyright 2002 Texas Instruments Berlin, AG
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 7 | All rights reserved.
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 8 |
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 9 | This file is confidential and a trade secret of Texas
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 10 | Instruments Berlin, AG
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 11 | The receipt of or possession of this file does not convey
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 12 | any rights to reproduce or disclose its contents or to
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 13 | manufacture, use, or sell anything it may describe, in
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 14 | whole, or in part, without the specific written consent of
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 15 | Texas Instruments Berlin, AG.
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 16 +-----------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 17 | Purpose : This modul is part of the entity PPP and implements all
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 18 | functions to handles the incoming process internal signals as
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 19 | described in the SDL-documentation (RT-statemachine)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 20 +-----------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 21 */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 22
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 23 #define ENTITY_PPP
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 24
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 25 /*==== INCLUDES =============================================================*/
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 26
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 27 #include "typedefs.h" /* to get Condat data types */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 28 #include "vsi.h" /* to get a lot of macros */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 29 #include "macdef.h" /* to get a lot of macros */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 30 #include "custom.h" /* to get a lot of macros */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 31 /*lint -efile(766,gsm.h) */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 32 #include "gsm.h" /* to get a lot of macros */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 33 /*lint -efile(766,cnf_ppp.h) */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 34 #include "cnf_ppp.h" /* to get cnf-definitions */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 35 /*lint -efile(766,mon_ppp.h) */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 36 #include "mon_ppp.h" /* to get mon-definitions */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 37 #include "prim.h" /* to get the definitions of used SAP and directions */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 38 #include "dti.h" /* to get the DTILIB definitions */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 39 #include "ppp.h" /* to get the global entity definitions */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 40
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 41 /*==== CONST ================================================================*/
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 42
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 43 /*==== LOCAL VARS ===========================================================*/
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 44
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 45 /*==== PRIVATE FUNCTIONS ====================================================*/
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 46
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 47 /*==== PUBLIC FUNCTIONS =====================================================*/
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 48
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 49
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 50
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 51 /*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 52 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 53 | Function : sig_arb_rt_parameters_req
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 54 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 55 | Description : Handles the internal signal SIG_ARB_RT_PARAMETERS_REQ. It
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 56 | initializes the timer value.
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 57 |
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 58 | Parameters : rt_time - restart time in seconds
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 59 |
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 60 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 61 */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 62 GLOBAL void sig_arb_rt_parameters_req ( UBYTE rt_time )
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 63 {
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 64 TRACE_ISIG( "sig_arb_rt_parameters_req" );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 65
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 66 switch( GET_STATE( PPP_SERVICE_RT ) )
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 67 {
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 68 case RT_STOPPED:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 69 case RT_STARTED:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 70 ppp_data->rt.time=(T_TIME)rt_time * 1000; /* convert sec. to msec. */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 71 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 72
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 73 default:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 74 TRACE_ERROR( "SIG_ARB_RT_PARAMETERS_REQ unexpected" );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 75 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 76 }
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 77 } /* sig_arb_rt_parameters_req() */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 78
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 79
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 80
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 81 /*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 82 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 83 | Function : sig_any_rt_rrt_req
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 84 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 85 | Description : Handles the internal signal SIG_ANY_RT_RRT_REQ. It (re)starts
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 86 | the timer.
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 87 |
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 88 | Parameters : no parameters
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 89 |
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 90 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 91 */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 92 GLOBAL void sig_any_rt_rrt_req ()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 93 {
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 94 TRACE_ISIG( "sig_any_rt_rrt_req" );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 95
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 96 vsi_t_start (VSI_CALLER RT_INDEX, ppp_data->rt.time); /*lint !e534 Ignoring return value */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 97
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 98 switch( GET_STATE( PPP_SERVICE_RT ) )
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 99 {
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 100 case RT_STOPPED:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 101 SET_STATE( PPP_SERVICE_RT, RT_STARTED );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 102 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 103
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 104 case RT_STARTED:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 105 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 106
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 107 default:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 108 TRACE_ERROR( "SIG_ANY_RT_RRT_REQ unexpected" );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 109 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 110 }
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 111 } /* sig_any_rt_rrt_req() */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 112
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 113
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 114
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 115 /*
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 116 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 117 | Function : sig_any_rt_srt_req
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 118 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 119 | Description : Handles the internal signal SIG_ANY_RT_SRT_REQ. It stops the
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 120 | timer.
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 121 |
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 122 | Parameters : no parameters
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 123 |
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 124 +------------------------------------------------------------------------------
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 125 */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 126 GLOBAL void sig_any_rt_srt_req ()
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 127 {
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 128 TRACE_ISIG( "sig_any_rt_srt_req" );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 129
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 130 vsi_t_stop (VSI_CALLER RT_INDEX); /*lint !e534 Ignoring return value */
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 131
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 132 switch( GET_STATE( PPP_SERVICE_RT ) )
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 133 {
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 134 case RT_STARTED:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 135 SET_STATE( PPP_SERVICE_RT, RT_STOPPED );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 136 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 137
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 138 case RT_STOPPED:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 139 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 140
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 141 default:
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 142 TRACE_ERROR( "SIG_ANY_RT_SRT_REQ unexpected" );
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 143 break;
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 144 }
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
+ − 145 } /* sig_any_rt_srt_req() */