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