OSDN Git Service

Add annotations to create gnss-base.h
authorHridya Valsaraju <hridya@google.com>
Tue, 22 Nov 2016 16:17:23 +0000 (08:17 -0800)
committerHridya Valsaraju <hridya@google.com>
Mon, 23 Jan 2017 16:41:15 +0000 (08:41 -0800)
This is required to make sure that the constants in gps.h does not
ever go out of sync with the enums created out of them in the HAL
interface definition.

Test: mm

Change-Id: I103cf46d198e9f5de9e0cfd64f2795f0094ecb39

15 files changed:
gnss/1.0/IAGnss.hal
gnss/1.0/IAGnssCallback.hal
gnss/1.0/IAGnssRil.hal
gnss/1.0/IAGnssRilCallback.hal
gnss/1.0/IGnss.hal
gnss/1.0/IGnssBatching.hal
gnss/1.0/IGnssCallback.hal
gnss/1.0/IGnssGeofenceCallback.hal
gnss/1.0/IGnssMeasurement.hal
gnss/1.0/IGnssMeasurementCallback.hal
gnss/1.0/IGnssNavigationMessage.hal
gnss/1.0/IGnssNavigationMessageCallback.hal
gnss/1.0/IGnssNiCallback.hal
gnss/1.0/types.hal
update-base-files.sh

index 2cce519..b8f5746 100644 (file)
@@ -22,6 +22,7 @@ import IAGnssCallback;
  * Extended interface for AGNSS support.
  */
 interface IAGnss {
+    @export(name="", value_prefix="APN_IP_")
     enum ApnIpType : uint8_t {
         INVALID  = 0,
         IPV4     = 1,
index 1984725..fe2e101 100644 (file)
@@ -19,11 +19,13 @@ package android.hardware.gnss@1.0;
 /** Callback structure for the AGNSS interface. */
 interface IAGnssCallback {
     /** AGNSS type **/
+    @export(name="", value_prefix="AGPS_")
     enum AGnssType : uint8_t {
         TYPE_SUPL         = 1,
         TYPE_C2K          = 2
     };
 
+    @export(name="", value_prefix="GNSS_")
     enum AGnssStatusValue : uint8_t {
         /** GNSS requests data connection for AGNSS. */
         REQUEST_AGNSS_DATA_CONN  = 1,
@@ -40,6 +42,7 @@ interface IAGnssCallback {
     /*
      * Represents the status of AGNSS augmented to support IPv4.
      */
+    @export(name="", value_prefix="GPS_")
     struct AGnssStatusIpV4 {
         AGnssType type;
         AGnssStatusValue status;
index 499b874..6292273 100644 (file)
@@ -25,12 +25,14 @@ import IAGnssRilCallback;
  * location, unique subscriber ID, phone number string and network availability changes.
  */
 interface IAGnssRil {
+    @export(name="", value_prefix="AGPS_SETID_TYPE_")
     enum SetIDType : uint8_t {
         NONE    = 0,
         IMSI    = 1,
         MSISDM  = 2
     };
 
+    @export(name="", value_prefix="AGPS_RIL_NETWORK_TYPE_")
     enum NetworkType : uint8_t {
         MOBILE  = 0,
         WIFI    = 1,
@@ -41,6 +43,7 @@ interface IAGnssRil {
         WIMAX   = 6,
     };
 
+    @export(name="", value_prefix="AGPS_REF_LOCATION_TYPE_")
     enum AGnssRefLocationType : uint8_t {
         GSM_CELLID   = 1,
         UMTS_CELLID  = 2,
index ba29bd0..2d64e54 100644 (file)
@@ -22,6 +22,7 @@ package android.hardware.gnss@1.0;
  */
 interface IAGnssRilCallback {
     /* Kinds of SET ID that can be requested */
+    @export(name="", value_prefix="AGPS_RIL_REQUEST_SETID_")
     enum ID : uint32_t {
         IMSI    = 1 << 0L,
         MSISDN  = 1 << 1L,
index 24a5371..5cde79e 100644 (file)
@@ -28,9 +28,10 @@ import IGnssGeofencing;
 import IGnssNi;
 import IGnssXtra;
 
-/* Represents the standard GNSS interface. */
+/* Represents the standard GNSS (Global Navigation Satellite System) interface. */
 interface IGnss {
     /* Requested operational mode for GNSS operation. */
+    @export(name="", value_prefix="GPS_POSITION_MODE_")
     enum GnssPositionMode : uint8_t {
         /** Mode for running GNSS standalone (no assistance). */
         STANDALONE  = 0,
@@ -44,6 +45,7 @@ interface IGnss {
     };
 
     /* Requested recurrence mode for GNSS operation. */
+    @export(name="", value_prefix="GPS_POSITION_")
     enum GnssPositionRecurrence : uint32_t {
         /** Receive GNSS fixes on a recurring basis at a specified period. */
         RECURRENCE_PERIODIC  = 0,
@@ -55,6 +57,7 @@ interface IGnss {
      * Flags used to specify which aiding data to delete when calling
      * deleteAidingData().
      */
+    @export(name="", value_prefix="GPS_")
     enum GnssAidingData : uint16_t {
         DELETE_EPHEMERIS    = 0x0001,
         DELETE_ALMANAC      = 0x0002,
index 4f0695d..4d5affa 100644 (file)
@@ -42,6 +42,7 @@ interface IGnssBatching {
     /*
      * Enum which holds the bit masks for batching control.
      */
+    @export(name="", value_prefix="FLP_BATCH_")
     enum Flag : uint8_t {
         /*
          * If this flag is set, the hardware implementation
index eb66d78..1fe48f1 100644 (file)
@@ -23,6 +23,7 @@ package android.hardware.gnss@1.0;
  */
 interface IGnssCallback {
     /* Flags for the gnssSetCapabilities callback. */
+    @export(name="", value_prefix="GPS_CAPABILITY_")
     enum Capabilities : uint32_t {
         /*
          * GNSS HAL schedules fixes for RECURRENCE_PERIODIC mode.
@@ -47,6 +48,7 @@ interface IGnssCallback {
     };
 
     /* GNSS status event values. */
+    @export(name="", value_prefix="GPS_STATUS_")
     enum GnssStatusValue : uint8_t {
         /** GNSS status unknown. */
         NONE           = 0,
@@ -63,6 +65,7 @@ interface IGnssCallback {
     /*
      * Flags that indicate information about the satellite
      */
+    @export(name="", value_prefix="GNSS_SV_FLAGS_")
     enum GnssSvFlags : uint8_t {
         NONE                  = 0,
         HAS_EPHEMERIS_DATA    = 1 << 0,
index 5c70c5e..722317e 100644 (file)
@@ -91,17 +91,20 @@ package android.hardware.gnss@1.0;
  */
 
 interface IGnssGeofenceCallback {
+    @export(name="", value_prefix="GPS_GEOFENCE_")
     enum GeofenceTransition : int32_t {
         ENTERED   = (1 << 0L),
         EXITED    = (1 << 1L),
         UNCERTAIN = (1 << 2L),
     };
 
+    @export(name="", value_prefix="GPS_GEOFENCE_")
     enum GeofenceAvailability : int32_t {
         UNAVAILABLE = (1 << 0L),
         AVAILABLE   = (1 << 1L),
     };
 
+    @export(name="", value_prefix="GPS_GEOFENCE_")
     enum GeofenceStatus : int32_t {
         OPERATION_SUCCESS        = 0,
         ERROR_TOO_MANY_GEOFENCES = -100,
index 5174273..8329442 100644 (file)
@@ -22,6 +22,7 @@ import IGnssMeasurementCallback;
  * Extended interface for GNSS Measurements support.
  */
 interface IGnssMeasurement {
+    @export(name="", value_prefix="GPS_MEASUREMENT_")
     enum GnssMeasurementStatus : int32_t {
         SUCCESS = 0,
         ERROR_ALREADY_INIT = -100,
index de640ae..472583a 100644 (file)
@@ -21,6 +21,7 @@ interface IGnssMeasurementCallback {
     /*
      * Flags to indicate what fields in GnssClock are valid.
      */
+    @export(name="", value_prefix="GNSS_CLOCK_")
     enum GnssClockFlags : uint16_t {
         /** A valid 'leap second' is stored in the data structure. */
         HAS_LEAP_SECOND        = 1 << 0,
@@ -41,6 +42,7 @@ interface IGnssMeasurementCallback {
     /*
      * Flags to indicate what fields in GnssMeasurement are valid.
      */
+    @export(name="", value_prefix="GNSS_MEASUREMENT_")
     enum GnssMeasurementFlags : uint32_t {
         /** A valid 'snr' is stored in the data structure. */
         HAS_SNR                        = 1 << 0,
@@ -60,6 +62,7 @@ interface IGnssMeasurementCallback {
      * Enumeration of available values for the GNSS Measurement's multipath
      * indicator.
      */
+    @export(name="", value_prefix="GNSS_MULTIPATH_")
     enum GnssMultipathIndicator : uint8_t {
         /** The indicator is not available or unknown. */
         INDICATOR_UNKNOWN      = 0,
@@ -82,6 +85,7 @@ interface IGnssMeasurementCallback {
      * If GNSS is still searching for a satellite, the corresponding state must be
      * set to STATE_UNKNOWN(0).
      */
+    @export(name="", value_prefix="GNSS_MEASUREMENT_")
     enum GnssMeasurementState : uint32_t {
         STATE_UNKNOWN                = 0,
         STATE_CODE_LOCK              = 1 << 0,
@@ -105,6 +109,7 @@ interface IGnssMeasurementCallback {
     /*
      * Flags indicating the Accumulated Delta Range's states.
      */
+    @export(name="", value_prefix="GNSS_")
     enum GnssAccumulatedDeltaRangeState : uint16_t {
         ADR_STATE_UNKNOWN    = 0,
         ADR_STATE_VALID      = 1 << 0,
index 11f2096..ddd9169 100644 (file)
@@ -22,6 +22,7 @@ import IGnssNavigationMessageCallback;
  * Extended interface for GNSS navigation message reporting support.
  */
 interface IGnssNavigationMessage {
+    @export(name="", value_prefix="GPS_NAVIGATION_MESSAGE_")
     enum GnssNavigationMessageStatus : int32_t {
         SUCCESS = 0,
         ERROR_ALREADY_INIT = -100,
index 0cffa67..2e6b853 100644 (file)
@@ -25,6 +25,7 @@ interface IGnssNavigationMessageCallback {
      * For convenience, first byte is the GnssConstellationType on which that signal
      * is typically transmitted.
      */
+    @export(name="", value_prefix="GNSS_NAVIGATION_MESSAGE_TYPE_")
     enum GnssNavigationMessageType : int16_t {
         UNKNOWN    = 0,
         /** GNSS L1 C/A message contained in the structure.  */
@@ -56,6 +57,7 @@ interface IGnssNavigationMessageCallback {
      * No need to send any navigation message that contains words with parity error
      * and cannot be corrected.
      */
+    @export(name="navigation_message_status", value_prefix="NAV_MESSAGE_STATUS_")
     enum NavigationMessageStatus : uint16_t {
         PARITY_PASSED  = (1 << 0),
         PARITY_REBUILT = (1 << 1),
index a7abad9..c5fb223 100644 (file)
@@ -21,6 +21,7 @@ interface IGnssNiCallback {
     /*
      * GnssNiType constants
      */
+    @export(name="", value_prefix="GPS_NI_TYPE_")
     enum GnssNiType : uint8_t {
         VOICE           = 1,
         UMTS_SUPL       = 2,
@@ -30,6 +31,7 @@ interface IGnssNiCallback {
     /*
      * GnssNiNotifyFlags constants
      */
+    @export(name="", value_prefix="GPS_NI_")
     enum GnssNiNotifyFlags : uint32_t {
         /** NI requires notification */
         NEED_NOTIFY      = 0x0001,
@@ -43,6 +45,7 @@ interface IGnssNiCallback {
      * GNSS NI responses, used to define the response in
      * NI structures
      */
+    @export(name="", value_prefix="GPS_NI_")
     enum GnssUserResponseType : uint8_t {
         RESPONSE_ACCEPT  = 1,
         RESPONSE_DENY    = 2,
@@ -52,6 +55,7 @@ interface IGnssNiCallback {
     /*
      * NI data encoding scheme
      */
+    @export(name="", value_prefix="GPS_")
     enum GnssNiEncodingType : int32_t {
         ENC_NONE              = 0,
         ENC_SUPL_GSM_DEFAULT  = 1,
index 2721d44..d5e0e9b 100644 (file)
@@ -16,6 +16,7 @@
 
 package android.hardware.gnss@1.0;
 
+@export(name="", value_prefix="GNSS_MAX_")
 enum GnssMax : uint32_t {
 /** Maximum number of SVs for gnssSvStatusCb(). */
     SVS_COUNT = 64,
@@ -27,6 +28,8 @@ typedef int64_t GnssUtcTime;
 /*
  * Constellation type of GnssSvInfo
  */
+
+@export(name="", value_prefix="GNSS_CONSTELLATION_")
 enum GnssConstellationType : uint8_t {
     UNKNOWN = 0,
     GPS     = 1,
@@ -38,6 +41,7 @@ enum GnssConstellationType : uint8_t {
 };
 
 /** Bit mask to indicate which values are valid in a GnssLocation object. */
+@export(name="", value_prefix="GPS_LOCATION_")
 enum GnssLocationFlags : uint16_t {
     /** GnssLocation has valid latitude and longitude. */
     HAS_LAT_LONG              = 0x0001,
index e2331f5..1eb6b51 100755 (executable)
@@ -25,6 +25,9 @@ hidl-gen $options \
 hidl-gen $options \
          -o hardware/libhardware/include/hardware/nfc-base.h \
          android.hardware.nfc@1.0
+hidl-gen $options \
+         -o hardware/libhardware/include/hardware/gnss-base.h \
+         android.hardware.gnss@1.0
 
 # system/core
 hidl-gen $options \