|
Tizen HAL API
1.0
|
The Location provides functions for location service.
#include <hal-location.h>
The location HAL provides common abstraction interfaces to control location services and get information about location.
| FUNCTION | PRE-STATE | POST-STATE | SYNC TYPE |
|---|---|---|---|
| hal_location_get_backend() | N/A | N/A | SYNC |
| hal_location_put_backend() | N/A | N/A | SYNC |
| hal_location_init() | N/A | INITIALIZED | SYNC |
| hal_location_deinit() | INITIALIZED | N/A | SYNC |
| hal_location_request() | INITIALIZED | INITIALIZED | SYNC |
Typedefs | |
| typedef int(* | gps_event_cb )(gps_event_info_s *gps_event_info, void *user_data) |
| Callback function. | |
| typedef struct _hal_backend_location_funcs | hal_backend_location_funcs |
| HAL Backend Location Functions. | |
Defines | |
| #define | HAL_LOCATION_MAX_REQUESTER_ID_LEN (128) |
| Max length of requester ID. | |
| #define | HAL_LOCATION_MAX_CLIENT_NAME_LEN (128) |
| Max length of client name. | |
| #define | HAL_LOCATION_MAX_SUPL_URL_LEN (128) |
| Max length of SUPL URL. | |
| #define | HAL_LOCATION_MAX_GPS_NUM_SAT_USED (12) |
| Maximum number of satellite which is in used. | |
| #define | HAL_LOCATION_MAX_GPS_NUM_SAT_IN_VIEW (32) |
| Maximum number of satellite which is in view. | |
| struct hal_location_pos_data_s |
This structure defines the GPS position data.
Data Fields | |
| time_t | timestamp |
| double | latitude |
| double | longitude |
| double | altitude |
| double | speed |
| double | bearing |
| double | hor_accuracy |
| double | ver_accuracy |
Altitude data (in meter)
Direction from true north(in degree)
Horizontal position error(in meter)
Latitude data (in degree)
Longitude data (in degree)
Speed (in m/s)
Timestamp
Vertical position error(in meter)
| struct hal_location_batch_data_s |
This structure defines the GPS batch data.
Data Fields | |
| int | num_of_location |
| hal_location_pos_data_s * | data |
Number of batch data
| struct hal_location_sv_info_s |
| struct hal_location_sv_data_s |
This structure defines the GPS satellite in view data.
Data Fields | |
| time_t | timestamp |
| unsigned char | pos_valid |
| int | num_of_sat |
| hal_location_sv_info_s | sat [(32)] |
Number of satellites in view
| unsigned char hal_location_sv_data_s::pos_valid |
TRUE, if position is valid
Satellite information
Timestamp
| struct hal_location_nmea_data_s |
| struct hal_location_geofence_data_s |
This structure defines the geofence data.
Data Fields | |
| int | geofence_id |
| double | latitude |
| double | longitude |
| int | radius |
Geofence ID
Latitude data (in degree)
Longitude data (in degree)
Radius data (in meters)
| struct hal_location_mobile_info_s |
| struct hal_location_gps_qos_param_s |
This structure is used to get the Extra Fix request parameters.
Data Fields | |
| int | accuracy |
| int | tbf |
| int | num_fixes |
| unsigned char | timeout |
accuracy
num fixes
time between fixes
| unsigned char hal_location_gps_qos_param_s::timeout |
session timeout
| struct hal_location_gps_start_session_ev_info_s |
Start session response event data.
Data Fields | |
| hal_location_gps_error_e | error |
| struct hal_location_gps_stop_session_ev_info_s |
Response of stop session.
Data Fields | |
| hal_location_gps_error_e | error |
| struct hal_location_gps_set_option_ev_info_s |
Set option response event data.
Data Fields | |
| hal_location_gps_error_e | error |
| struct hal_location_gps_change_interval_ev_info_s |
Change interval response event data.
Data Fields | |
| hal_location_gps_error_e | error |
| struct hal_location_gps_pos_ev_info_s |
Position data from GPS.
Data Fields | |
| hal_location_gps_error_e | error |
| hal_location_pos_data_s | pos |
Position data
| struct hal_location_gps_batch_ev_info_s |
Batch data from GPS.
Data Fields | |
| hal_location_gps_error_e | error |
| hal_location_batch_data_s | batch |
| struct hal_location_gps_sv_ev_info_s |
Satellite data from GPS.
Data Fields | |
| hal_location_gps_error_e | error |
| hal_location_sv_data_s | sv |
Satellite data
| struct hal_location_gps_nmea_ev_info_s |
NMEA data from GPS.
Data Fields | |
| hal_location_gps_error_e | error |
| hal_location_nmea_data_s | nmea |
| struct hal_location_agps_verification_ev_info_s |
This structure defines the values for GPS Verification message indication.
Data Fields | |
| hal_location_agps_notify_e | notify_type |
| hal_location_agps_supl_format_e | supl_format |
| hal_location_agps_encoding_scheme_e | datacoding_scheme |
| char | requester_id [(128)] |
| char | client_name [(128)] |
| int | resp_timer |
Specifies client name
Specifies requester type
Specifies notification type refer enum tapi_gps_notify_type_t
Specifies requester ID
Response timer
Specifies encoding type refer enum tapi_gps_encoding_type_t
| struct hal_location_gps_factory_test_ev_info_s |
Factory test result information.
Data Fields | |
| hal_location_gps_error_e | error |
| int | prn |
| double | snr |
Specifies Pseudo Random Noise value
Specifies Signal to Noise Ratio value
| struct hal_location_gps_dns_query_ev_info_s |
DNS query request information.
Data Fields | |
| hal_location_gps_error_e | error |
| char | domain_name [(128)] |
Domain name
| struct hal_location_geofence_transition_ev_info_s |
Geofence transition information.
Data Fields | |
| time_t | geofence_timestamp |
| int | geofence_id |
| hal_location_pos_data_s | pos |
| hal_location_geofence_zone_state_e | state |
Geofence ID
Timestamp
Geofence zone state
| struct hal_location_geofence_status_ev_info_s |
Geofecne status information.
Data Fields | |
| hal_location_geofence_status_e | status |
| hal_location_pos_data_s | last_pos |
| struct hal_location_geofence_event_s |
Geofence event information.
Data Fields | |
| int | geofence_id |
| hal_location_geofence_error_e | error |
Geofence ID
| struct xtra_request_info_s |
XTRA request information. Used by Wearable profile only.
Data Fields | |
| xtra_request_type_e | xtra_id |
| hal_location_xtra_request_error_e | error |
XTRA request type
| struct ref_data_request_info_s |
Reference data request information.
Data Fields | |
| time_t | timeout |
Timeout
| union gps_event_data_u |
GPS event info.
Verification indication
Batch indication
Change interval response
DNS query indication
Factory test response
Geofence event response
Geofence status indication
Callback related with Geofence. Geofence transition indication
NMEA indication
Callback related with Indication Position indication
Reference data request indication
Set option response
Callback related with Response Start session response
Stop session response
Satellite indication
Callback related with XTRA. Used by Wearable profile only. XTRA request indication
| struct gps_event_info_s |
GPS Event Info.
Data Fields | |
| hal_location_gps_event_id_e | event_id |
| gps_event_data_u | event_data |
GPS event information data
GPS asynchronous event id
| struct hal_location_agps_supl_ni_info_s |
| struct hal_location_agps_supl_ni_nomodem_info_s |
SUPL network-initiated information in case of no-modem.
Data Fields | |
| char * | msg_body |
| int | msg_size |
| char | imsi [16] |
| int | mcc |
| int | mnc |
| int | lac |
| int | psc |
| int | cid |
| int | status |
Cell id
IMSI
Location area code
SUPL NI message body
SUPL NI message size
Primary Srambling code
Return code of Status
| struct hal_location_geofence_action_data_s |
Geofence action data type.
Data Fields | |
| hal_location_geofence_data_s | geofence |
| hal_location_geofence_zone_state_e | last_state |
| int | monitor_states |
| int | notification_responsiveness_ms |
| int | unknown_timer_ms |
Monitor states
Notification responsiveness in milliseconds
Unknown timer in milliseconds
| struct hal_location_gps_action_start_data_s |
GPS action start data.
Data Fields | |
| int | interval |
| int | period |
| int | session_status |
Interval
Emulator
Emulator
| struct hal_location_gps_action_change_interval_data_s |
GPS action change interval data.
Data Fields | |
| int | interval |
| struct hal_location_gps_action_set_ref_location_s |
| struct hal_location_gps_action_set_ref_time_s |
GPS action to set ref time.
Data Fields | |
| int | result |
| int | reason |
| int | method |
| int64_t | ntp_timestamp |
| int64_t | elapsed_systime |
| int | uncertainty |
Milliseconds since boot, including time spent in sleep
Timestamp from NTP
Half of round trip time in milliseconds
| struct _hal_backend_location_funcs |
HAL Backend Location Functions.
Data Fields | |
| int(* | init )(gps_event_cb gps_event_cb, void *user_data) |
| int(* | deinit )(gps_failure_reason_e *reason_code) |
| int(* | request )(hal_location_gps_action_e gps_action, void *gps_action_data, gps_failure_reason_e *reason_code) |
| int(* _hal_backend_location_funcs::deinit)(gps_failure_reason_e *reason_code) |
Deinitialize GPS
| int(* _hal_backend_location_funcs::init)(gps_event_cb gps_event_cb, void *user_data) |
Initialize GPS
| int(* _hal_backend_location_funcs::request)(hal_location_gps_action_e gps_action, void *gps_action_data, gps_failure_reason_e *reason_code) |
Request GPS action
| #define HAL_LOCATION_MAX_CLIENT_NAME_LEN (128) |
Max length of client name.
| #define HAL_LOCATION_MAX_GPS_NUM_SAT_IN_VIEW (32) |
Maximum number of satellite which is in view.
| #define HAL_LOCATION_MAX_GPS_NUM_SAT_USED (12) |
Maximum number of satellite which is in used.
| #define HAL_LOCATION_MAX_REQUESTER_ID_LEN (128) |
Max length of requester ID.
| #define HAL_LOCATION_MAX_SUPL_URL_LEN (128) |
Max length of SUPL URL.
| typedef int(* gps_event_cb)(gps_event_info_s *gps_event_info, void *user_data) |
Callback function.
| typedef struct _hal_backend_location_funcs hal_backend_location_funcs |
HAL Backend Location Functions.
| enum gps_failure_reason_e |
Transport Error Cause.
Cell information type.
This enumeration defines values for GPS encoding type for GPS verification message.
This enumeration defines values for notify type for GPS verification message.
This enumeration defines values for GPS encoding type for GPS verification message.
This enumeration has the SSL certification type.
This enumeration defines values for requester type for GPS verification message.
Mobile service type.
This enumeration has geofence service error type.
GPS action type.
GPS asynchronous event type.
| enum xtra_request_type_e |