xref: /aosp_15_r20/hardware/interfaces/gnss/2.0/IGnssDebug.hal (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1*4d7e907cSAndroid Build Coastguard Worker/*
2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2019 The Android Open Source Project
3*4d7e907cSAndroid Build Coastguard Worker *
4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at
7*4d7e907cSAndroid Build Coastguard Worker *
8*4d7e907cSAndroid Build Coastguard Worker *      http://www.apache.org/licenses/LICENSE-2.0
9*4d7e907cSAndroid Build Coastguard Worker *
10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License.
15*4d7e907cSAndroid Build Coastguard Worker */
16*4d7e907cSAndroid Build Coastguard Worker
17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected];
18*4d7e907cSAndroid Build Coastguard Worker
19*4d7e907cSAndroid Build Coastguard Workerimport @1.0::IGnssDebug;
20*4d7e907cSAndroid Build Coastguard Worker
21*4d7e907cSAndroid Build Coastguard Worker/** Extended interface for DEBUG support. */
22*4d7e907cSAndroid Build Coastguard Workerinterface IGnssDebug extends @1.0::IGnssDebug {
23*4d7e907cSAndroid Build Coastguard Worker
24*4d7e907cSAndroid Build Coastguard Worker    /** Extending SatelliteData, replacing the GnssConstellationType. */
25*4d7e907cSAndroid Build Coastguard Worker    struct SatelliteData {
26*4d7e907cSAndroid Build Coastguard Worker        /**
27*4d7e907cSAndroid Build Coastguard Worker         * GNSS Satellite info.
28*4d7e907cSAndroid Build Coastguard Worker         *
29*4d7e907cSAndroid Build Coastguard Worker         * In this version of the HAL, the field 'constellation' in the v1_0 struct is deprecated,
30*4d7e907cSAndroid Build Coastguard Worker         * and is no longer used by the framework. The constellation type is instead reported in
31*4d7e907cSAndroid Build Coastguard Worker         * @2.0::IGnssDebug.SatelliteData.constellation.
32*4d7e907cSAndroid Build Coastguard Worker         */
33*4d7e907cSAndroid Build Coastguard Worker        @1.0::IGnssDebug.SatelliteData v1_0;
34*4d7e907cSAndroid Build Coastguard Worker
35*4d7e907cSAndroid Build Coastguard Worker        /** Defines the constellation type of the given SV. */
36*4d7e907cSAndroid Build Coastguard Worker        GnssConstellationType constellation;
37*4d7e907cSAndroid Build Coastguard Worker    };
38*4d7e907cSAndroid Build Coastguard Worker
39*4d7e907cSAndroid Build Coastguard Worker    /**
40*4d7e907cSAndroid Build Coastguard Worker     * Provides a set of debug information that is filled by the GNSS chipset when the method
41*4d7e907cSAndroid Build Coastguard Worker     * getDebugData() is invoked.
42*4d7e907cSAndroid Build Coastguard Worker     */
43*4d7e907cSAndroid Build Coastguard Worker    struct DebugData {
44*4d7e907cSAndroid Build Coastguard Worker        /** Current best known position. */
45*4d7e907cSAndroid Build Coastguard Worker        @1.0::IGnssDebug.PositionDebug position;
46*4d7e907cSAndroid Build Coastguard Worker
47*4d7e907cSAndroid Build Coastguard Worker        /** Current best know time estimate. */
48*4d7e907cSAndroid Build Coastguard Worker        @1.0::IGnssDebug.TimeDebug time;
49*4d7e907cSAndroid Build Coastguard Worker
50*4d7e907cSAndroid Build Coastguard Worker        /**
51*4d7e907cSAndroid Build Coastguard Worker         * Provides a list of the available satellite data, for all
52*4d7e907cSAndroid Build Coastguard Worker         * satellites and constellations the device can track,
53*4d7e907cSAndroid Build Coastguard Worker         * including GnssConstellationType UNKNOWN.
54*4d7e907cSAndroid Build Coastguard Worker         */
55*4d7e907cSAndroid Build Coastguard Worker        vec<SatelliteData> satelliteDataArray;
56*4d7e907cSAndroid Build Coastguard Worker    };
57*4d7e907cSAndroid Build Coastguard Worker
58*4d7e907cSAndroid Build Coastguard Worker    /**
59*4d7e907cSAndroid Build Coastguard Worker     * This methods requests position, time and satellite ephemeris debug information from the HAL.
60*4d7e907cSAndroid Build Coastguard Worker     *
61*4d7e907cSAndroid Build Coastguard Worker     * @return ret debugData information from GNSS Hal that contains the current best known
62*4d7e907cSAndroid Build Coastguard Worker     * position, best known time estimate and a complete list of constellations that the device can
63*4d7e907cSAndroid Build Coastguard Worker     * track.
64*4d7e907cSAndroid Build Coastguard Worker     */
65*4d7e907cSAndroid Build Coastguard Worker    getDebugData_2_0() generates (DebugData debugData);
66*4d7e907cSAndroid Build Coastguard Worker};
67