comparison g23m/condat/ms/src/aci/dcm_env.h @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : $Workfile::
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 file contains Data connection manager definitions
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef __DCM_ENV_H__
22 #define __DCM_ENV_H__
23
24
25
26 /*
27 * Internal structure of the descriptor of IPU
28 */
29 typedef struct
30 {
31 U8 row_state;
32 U32 api_instance; /* api instance */
33 U16 bearer_handle; /* Bearer handle */
34 U16 app_handle; /* Comm handle of application */
35 U8 bearer_type; /* Used bearer type */
36 U8 apn_valid; /* Flag for apn validation */
37 U8 apn[CDCM_APN_MAX_LEN + 1]; /* Access Point Name */
38 U8 phone_number_valid; /* Flag for phone number validation*/
39 U8 phone_number[CDCM_PHONE_NR_LEN + 1]; /* CSD dial up phone number */
40 U8 user_id_valid; /* Flag for user ID validation */
41 U8 user_id[CDCM_USER_MAX_LEN + 1]; /* User ID */
42 U8 password_valid; /* Flag for password validation */
43 U8 password[CDCM_PASSWORD_MAX_LEN + 1]; /* Password */
44 U16 cid; /* GPRS context ID */
45 U32 ip_address; /* Used IP address */
46 U32 dns1; /* First domain name server */
47 U32 dns2; /* Second domain name server */
48 U32 gateway; /* Gateway address */
49 U16 auth_type; /* Type of authentication */
50 U8 data_compr; /* Flag for data compression */
51 U8 header_compr; /* Flag for header compression */
52 U16 precedence; /* GPRS precedence class */
53 U16 delay; /* GPRS delay class */
54 U16 reliability; /* GPRS reliability class */
55 U16 peak_throughput; /* GPRS peak throughput */
56 U16 mean_throughput; /* GPRS mean throughput */
57 U8 shareable; /* Flag for sharing requested bearer conn */
58 U8 pdp_addr[CDCM_PDP_MAX_LEN + 1];
59 U8 ipaddr[16];
60 }T_DCM_IPU_LIST;
61
62
63 typedef T_DCM_RET (*T_DCM_CALLBACK )(T_DCM_HDR *msg_p);
64
65 /**
66 * The Control Block buffer of DCM, which gathers all 'Global variables'
67 * used by DCM instance.
68 *
69 * A structure should gathers all the 'global variables' of DCM instance.
70 * Indeed, global variable must not be defined in order to avoid using static memory.
71 * A T_DCM_ENV_CTRL_BLK buffer is allocated when initializing DCM instance and is
72 * then always refered by DCM instance when access to 'global variable'
73 * is necessary.
74 */
75 typedef struct
76 {
77 /** Store the current state of the DCM instance */
78 T_DCM_INTERNAL_STATE state[2];
79
80 /** Store the current substate of the DCM instance */
81 T_DCM_INTERNAL_SUBSTATE substate[2];
82
83 /* current row of IPU list in use */
84 U8 current_row;
85
86 /* gsm current total of used rows */
87 U8 gsm_current_total_row;
88
89 /* gprs current total of used rows */
90 U8 gprs_current_total_row;
91
92 /* current network_state */
93 U32 network_state;
94
95 /* structure of IP Users */
96 T_DCM_IPU_LIST ipu_list[DCM_MAX_NUMBER_IPU];
97
98 /* dcm_call_back */
99 T_DCM_CALLBACK dcm_call_back;
100 } T_DCM_ENV_CTRL_BLK;
101
102
103 void dcm_init (void);
104 void dcm_send_message(T_DCM_STATUS_IND_MSG msg, T_DCM_INTERNAL_SUBSTATE sub_state);
105 BOOL dcm_check_data_call(U32 event);
106
107 EXTERN void dcm_display_message(U8 msg_id);
108
109
110 #endif /* __DCM_ENV_H__ */