yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | /***************************************************************************** |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2005 |
| 8 | * |
| 9 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 10 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| 11 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 12 | * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 13 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 14 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 15 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 16 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 17 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 18 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 19 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 20 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 21 | * |
| 22 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 23 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 24 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 25 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 26 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 27 | * |
| 28 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | |
| 36 | /******************************************************************************* |
| 37 | * Filename: |
| 38 | * --------- |
| 39 | * gps_struct.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * MAUI |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * This file is intends for local parameter declaration about GIS sap |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | *============================================================================== |
| 54 | * HISTORY |
| 55 | * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 56 | *------------------------------------------------------------------------------ |
| 57 | * removed! |
| 58 | * |
| 59 | * removed! |
| 60 | * removed! |
| 61 | * removed! |
| 62 | * removed! |
| 63 | * removed! |
| 64 | * removed! |
| 65 | * removed! |
| 66 | * |
| 67 | * removed! |
| 68 | * removed! |
| 69 | * removed! |
| 70 | * |
| 71 | * removed! |
| 72 | * removed! |
| 73 | * removed! |
| 74 | * |
| 75 | * removed! |
| 76 | * removed! |
| 77 | * removed! |
| 78 | * |
| 79 | * removed! |
| 80 | * removed! |
| 81 | * removed! |
| 82 | * |
| 83 | * removed! |
| 84 | * removed! |
| 85 | * removed! |
| 86 | * |
| 87 | * removed! |
| 88 | * removed! |
| 89 | * removed! |
| 90 | * |
| 91 | * removed! |
| 92 | * removed! |
| 93 | * removed! |
| 94 | * |
| 95 | * removed! |
| 96 | * removed! |
| 97 | * removed! |
| 98 | * |
| 99 | * removed! |
| 100 | * removed! |
| 101 | * removed! |
| 102 | * |
| 103 | * removed! |
| 104 | * removed! |
| 105 | * removed! |
| 106 | * |
| 107 | * removed! |
| 108 | * removed! |
| 109 | * removed! |
| 110 | * |
| 111 | * removed! |
| 112 | * removed! |
| 113 | * removed! |
| 114 | * |
| 115 | * removed! |
| 116 | * removed! |
| 117 | * removed! |
| 118 | * |
| 119 | * removed! |
| 120 | * removed! |
| 121 | * removed! |
| 122 | * |
| 123 | * removed! |
| 124 | * removed! |
| 125 | * removed! |
| 126 | * |
| 127 | * removed! |
| 128 | * removed! |
| 129 | * removed! |
| 130 | * |
| 131 | * removed! |
| 132 | * removed! |
| 133 | * removed! |
| 134 | * |
| 135 | * removed! |
| 136 | * removed! |
| 137 | * removed! |
| 138 | * |
| 139 | * removed! |
| 140 | * removed! |
| 141 | * removed! |
| 142 | * |
| 143 | *------------------------------------------------------------------------------ |
| 144 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 145 | *============================================================================== |
| 146 | *******************************************************************************/ |
| 147 | #ifndef __GPS_STRUCT_H__ |
| 148 | #define __GPS_STRUCT_H__ |
| 149 | |
| 150 | #ifdef __GPS_SUPPORT__ |
| 151 | #include "dcl.h" |
| 152 | #endif |
| 153 | |
| 154 | #include "gps2lcsp_enum.h" |
| 155 | #include "kal_public_api.h" |
| 156 | #include "kal_public_defs.h" |
| 157 | #include "kal_general_types.h" |
| 158 | #include "agps_md_interface.h" |
| 159 | |
| 160 | typedef enum |
| 161 | { |
| 162 | MMI_GPS_ATE_EVENT_POWER_ON, |
| 163 | MMI_GPS_ATE_EVENT_POWER_OFF, |
| 164 | MMI_GPS_ATE_EVENT_COMMAND |
| 165 | |
| 166 | } gps_ate_event_type_enum; |
| 167 | |
| 168 | typedef struct |
| 169 | { |
| 170 | LOCAL_PARA_HDR |
| 171 | gps_ate_event_type_enum event; |
| 172 | kal_uint16 cmd_length; |
| 173 | kal_uint8 cmd_buf[256]; |
| 174 | } gps_ate_test_req_struct; |
| 175 | |
| 176 | typedef enum |
| 177 | { |
| 178 | GPS_PARSER_P_VERSION = 0, |
| 179 | GPS_PARSER_P_GPS_MODE_SWITCH_OK, |
| 180 | GPS_PARSER_P_SYSTEM_START_OK, |
| 181 | GPS_PARSER_P_INTERNAL_VERSION, |
| 182 | GPS_PARSER_P_GPS_FIXED, |
| 183 | GPS_PARSER_P_GPS_BT_VPORT_LOST, |
| 184 | GPS_PARSER_P_GPS_BT_VPORT_CONN, |
| 185 | GPS_PARSER_P_GPS_FIXED_AND_TIME_OK, |
| 186 | GPS_PARSER_P_END |
| 187 | } gps_parser_p_info_enum; |
| 188 | |
| 189 | |
| 190 | typedef struct |
| 191 | { |
| 192 | LOCAL_PARA_HDR |
| 193 | kal_eventgrpid event_id; |
| 194 | module_type module_id; |
| 195 | kal_uint16 port; |
| 196 | kal_int16 mode; |
| 197 | kal_int32 *return_val; |
| 198 | }gps_uart_open_req_struct; |
| 199 | |
| 200 | typedef struct |
| 201 | { |
| 202 | LOCAL_PARA_HDR |
| 203 | kal_eventgrpid event_id; |
| 204 | module_type module_id; |
| 205 | kal_uint16 port; |
| 206 | }gps_uart_read_req_struct; |
| 207 | |
| 208 | typedef struct |
| 209 | { |
| 210 | LOCAL_PARA_HDR |
| 211 | kal_eventgrpid event_id; |
| 212 | module_type module_id; |
| 213 | kal_uint16 port; |
| 214 | kal_bool is_rawdata; |
| 215 | kal_char* buffer; |
| 216 | kal_uint32 length; |
| 217 | kal_int16 cmd; |
| 218 | kal_int32 *return_val; |
| 219 | kal_uint32 *return_written; |
| 220 | }gps_uart_write_req_struct; |
| 221 | |
| 222 | typedef struct |
| 223 | { |
| 224 | LOCAL_PARA_HDR |
| 225 | kal_eventgrpid event_id; |
| 226 | module_type module_id; |
| 227 | kal_uint16 port; |
| 228 | kal_int16 mode; /*mdi_gps_uart_work_mode_enum*/ |
| 229 | }gps_uart_close_req_struct; |
| 230 | |
| 231 | typedef struct |
| 232 | { |
| 233 | LOCAL_PARA_HDR |
| 234 | kal_uint16 port; |
| 235 | kal_int16 type; /*mdi_gps_parser_info_enum*/ |
| 236 | kal_char* buffer; |
| 237 | }gps_uart_nmea_location_struct; |
| 238 | |
| 239 | |
| 240 | typedef struct |
| 241 | { |
| 242 | LOCAL_PARA_HDR |
| 243 | kal_uint32 length; |
| 244 | kal_uint16 port; |
| 245 | kal_char* buffer; |
| 246 | }gps_uart_nmea_sentence_struct; |
| 247 | |
| 248 | |
| 249 | typedef struct |
| 250 | { |
| 251 | LOCAL_PARA_HDR |
| 252 | kal_uint16 port; |
| 253 | module_type module_id; |
| 254 | }gps_uart_raw_data_struct; |
| 255 | |
| 256 | |
| 257 | typedef struct |
| 258 | { |
| 259 | LOCAL_PARA_HDR |
| 260 | kal_uint16 port; |
| 261 | }gps_uart_debug_raw_data_struct; |
| 262 | |
| 263 | typedef struct |
| 264 | { |
| 265 | kal_int8 hour; |
| 266 | kal_int8 minute; |
| 267 | kal_int8 second; |
| 268 | kal_int8 millisecond; |
| 269 | } gps_nmea_utc_time_struct; |
| 270 | |
| 271 | typedef struct |
| 272 | { |
| 273 | kal_int8 year; |
| 274 | kal_int8 month; |
| 275 | kal_int8 day; |
| 276 | } gps_nmea_utc_date_struct; |
| 277 | |
| 278 | |
| 279 | typedef struct |
| 280 | { |
| 281 | gps_nmea_utc_time_struct utc_time; |
| 282 | gps_nmea_utc_date_struct utc_date; |
| 283 | } gps_p_info_gps_fix_struct; |
| 284 | |
| 285 | |
| 286 | typedef struct |
| 287 | { |
| 288 | kal_uint16 port; |
| 289 | } gps_p_info_gps_vport_struct; |
| 290 | |
| 291 | |
| 292 | |
| 293 | typedef union { |
| 294 | gps_p_info_gps_fix_struct gps_fix; |
| 295 | gps_p_info_gps_vport_struct vport; |
| 296 | } gps_p_info_union; |
| 297 | |
| 298 | |
| 299 | typedef struct |
| 300 | { |
| 301 | LOCAL_PARA_HDR |
| 302 | gps_parser_p_info_enum type; |
| 303 | gps_p_info_union p_info; |
| 304 | }gps_uart_p_info_ind_struct; |
| 305 | |
| 306 | |
| 307 | #ifdef __GPS_SUPPORT__ |
| 308 | typedef struct |
| 309 | { |
| 310 | LOCAL_PARA_HDR |
| 311 | DCL_RTC_DATA_T previous_rtc; |
| 312 | DCL_RTC_DATA_T new_rtc; |
| 313 | }rtc_gps_time_change_ind_struct; |
| 314 | #endif |
| 315 | |
| 316 | |
| 317 | typedef struct |
| 318 | { |
| 319 | LOCAL_PARA_HDR |
| 320 | gps_error_code_enum error_code; |
| 321 | } gps_lct_op_error_struct; |
| 322 | |
| 323 | |
| 324 | typedef struct |
| 325 | { |
| 326 | LOCAL_PARA_HDR |
| 327 | kal_uint16 bitmap; |
| 328 | } gps_assist_bit_mask_ind_struct; |
| 329 | |
| 330 | typedef struct |
| 331 | { |
| 332 | LOCAL_PARA_HDR |
| 333 | kal_uint16 port; /*set to GPS_DEFAULT_PORT*/ |
| 334 | kal_int16 prefer_gps_mode; /*mb ma*/ |
| 335 | }gps_uart_open_switch_req_struct; |
| 336 | |
| 337 | typedef struct |
| 338 | { |
| 339 | LOCAL_PARA_HDR |
| 340 | kal_uint16 port; /*set to GPS_DEFAULT_PORT*/ |
| 341 | }gps_uart_close_switch_req_struct; |
| 342 | |
| 343 | #ifdef __GPS_SUPPORT__ |
| 344 | typedef enum |
| 345 | { |
| 346 | GPS_AREA_SHAPE_CIRCLE, |
| 347 | GPS_AREA_SHAPE_RECTANGLE, |
| 348 | GPS_AREA_SHAPE_END |
| 349 | } gps_area_shape_enum; |
| 350 | |
| 351 | typedef enum |
| 352 | { |
| 353 | GPS_AREA_DIRECTION_ENTER, |
| 354 | GPS_AREA_DIRECTION_LEAVE, |
| 355 | GPS_AREA_DIRECTION_END |
| 356 | } gps_area_direction_enum; |
| 357 | |
| 358 | typedef struct |
| 359 | { |
| 360 | kal_uint32 latitude; |
| 361 | kal_uint32 longtitude; |
| 362 | kal_int8 north_south; /*N for North and S for South*/ |
| 363 | kal_int8 west_east; /*W for West and E for East*/ |
| 364 | kal_uint32 rad; /*unit is m*/ |
| 365 | } gps_area_shape_circle_struct; |
| 366 | |
| 367 | typedef struct |
| 368 | { |
| 369 | kal_uint32 latitude1; |
| 370 | kal_uint32 longtitude1; |
| 371 | kal_int8 north_south1; /*N for North and S for South*/ |
| 372 | kal_int8 west_east1; /*W for West and E for East*/ |
| 373 | kal_uint32 latitude2; |
| 374 | kal_uint32 longtitude2; |
| 375 | kal_int8 north_south2; /*N for North and S for South*/ |
| 376 | kal_int8 west_east2; /*W for West and E for East*/ |
| 377 | } gps_area_shape_rectangle_struct; |
| 378 | |
| 379 | |
| 380 | |
| 381 | // MSG_ID_GPS_AREA_EVENT_ADD_REQ |
| 382 | typedef struct |
| 383 | { |
| 384 | LOCAL_PARA_HDR |
| 385 | |
| 386 | kal_int32 transaction_id; /* after add the request GPS will return result with the same id to caller */ |
| 387 | gps_area_shape_enum shape; /*the shape of request*/ |
| 388 | kal_bool is_continue_report; /*if GPS should send MSG once or continue*/ |
| 389 | gps_area_direction_enum direction; /*start send MSG after enter or leave*/ |
| 390 | union { |
| 391 | gps_area_shape_circle_struct circle; |
| 392 | gps_area_shape_rectangle_struct rectangle; |
| 393 | } choice; |
| 394 | } gps_area_event_add_req_struct; |
| 395 | |
| 396 | // MSG_ID_GPS_AREA_EVENT_ADD_RSP |
| 397 | typedef struct |
| 398 | { |
| 399 | LOCAL_PARA_HDR |
| 400 | |
| 401 | kal_int32 transaction_id; /* after process the request GPS will send result with associated id to caller */ |
| 402 | // kal_bool is_match; /* is request match, MUST fill this field to inform UAGPS_CP position difference calculation result */ |
| 403 | kal_bool is_add_ok; /*MMI_FALSE when too many request*/ |
| 404 | #ifdef __AGPS_SUPPORT__ |
| 405 | // gps_pos_result_struct pos_result; /* when is_match == KAL_TRUE, also necessary to carry this result */ |
| 406 | |
| 407 | // kal_bool utran_gps_ref_time_result_valid; |
| 408 | // utran_gps_ref_time_result_struct utran_gps_ref_time_result; |
| 409 | #endif |
| 410 | } gps_area_event_add_rsp_struct; |
| 411 | |
| 412 | // MSG_ID_GPS_AREA_EVENT_ADD_RSP |
| 413 | typedef struct |
| 414 | { |
| 415 | LOCAL_PARA_HDR |
| 416 | |
| 417 | kal_int32 transaction_id; /* after process the request GPS will send result with associated id to caller */ |
| 418 | kal_uint32 latitude; |
| 419 | kal_uint32 longtitude; |
| 420 | kal_int8 north_south; /*N for North and S for South*/ |
| 421 | kal_int8 east_west; /*W for West and E for East*/ |
| 422 | |
| 423 | } gps_area_event_happen_ind_struct; |
| 424 | |
| 425 | // MSG_ID_GPS_AREA_EVENT_DEL_REQ |
| 426 | typedef struct |
| 427 | { |
| 428 | LOCAL_PARA_HDR |
| 429 | |
| 430 | kal_int32 transaction_id; /* send the id to GPS let it delete the request */ |
| 431 | |
| 432 | } gps_area_event_del_req_struct; |
| 433 | #endif /*__GPS_SUPPORT__*/ |
| 434 | |
| 435 | #ifdef UNIT_TEST |
| 436 | |
| 437 | // MSG_ID_GPS_UT_SET_EVENT_IND |
| 438 | typedef struct |
| 439 | { |
| 440 | LOCAL_PARA_HDR |
| 441 | kal_eventgrpid event_id; |
| 442 | kal_uint32 events; |
| 443 | kal_uint8 operation; |
| 444 | kal_int32 ret_address; |
| 445 | kal_int32 ret_value; |
| 446 | |
| 447 | } gps_ut_set_event_ind_struct; |
| 448 | |
| 449 | // MSG_ID_GPS_UT_WRITE_DATA_IND |
| 450 | typedef struct |
| 451 | { |
| 452 | LOCAL_PARA_HDR |
| 453 | kal_uint8 data_buffer[100]; |
| 454 | |
| 455 | } gps_ut_write_data_ind_struct; |
| 456 | |
| 457 | |
| 458 | // MSG_ID_GPS_UT_LBS_HEADER_IND |
| 459 | typedef struct |
| 460 | { |
| 461 | LOCAL_PARA_HDR |
| 462 | kal_uint32 version; //use AGPS_MD_INTERFACE_VERSION |
| 463 | agps_md_type type; //refer to agps_md_type |
| 464 | kal_uint8 len; |
| 465 | } gps_ut_lbs_header_ind_struct; |
| 466 | |
| 467 | |
| 468 | #endif |
| 469 | |
| 470 | #endif /*__GPS_STRUCT_H__*/ |
| 471 | |