xref: /aosp_15_r20/hardware/interfaces/wifi/1.6/IWifiRttController.hal (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1/*
2 * Copyright 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package [email protected];
18
19import @1.0::CommandId;
20import @1.0::WifiStatus;
21import @1.4::IWifiRttController;
22import IWifiRttControllerEventCallback;
23
24/**
25 * Interface used to perform RTT(Round trip time) operations.
26 */
27interface IWifiRttController extends @1.4::IWifiRttController {
28    /**
29     * Requests notifications of significant events on this rtt controller.
30     * Multiple calls to this must register multiple callbacks each of which must
31     * receive all events.
32     *
33     * @param callback An instance of the |IWifiRttControllerEventCallback| HIDL
34     *        interface object.
35     * @return status WifiStatus of the operation.
36     *         Possible status codes:
37     *         |WifiStatusCode.SUCCESS|,
38     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
39     */
40    registerEventCallback_1_6(IWifiRttControllerEventCallback callback)
41        generates (WifiStatus status);
42
43    /**
44     * API to request RTT measurement.
45     *
46     * @param cmdId command Id to use for this invocation.
47     * @param rttConfigs Vector of |RttConfig| parameters.
48     * @return status WifiStatus of the operation.
49     *         Possible status codes:
50     *         |WifiStatusCode.SUCCESS|,
51     *         |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
52     *         |WifiStatusCode.ERROR_INVALID_ARGS|,
53     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
54     *         |WifiStatusCode.ERROR_UNKNOWN|
55     */
56    rangeRequest_1_6(CommandId cmdId, vec<RttConfig> rttConfigs) generates (WifiStatus status);
57
58    /**
59     * Get RTT responder information e.g. WiFi channel to enable responder on.
60     *
61     * @return status WifiStatus of the operation.
62     *         Possible status codes:
63     *         |WifiStatusCode.SUCCESS|,
64     *         |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
65     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
66     *         |WifiStatusCode.ERROR_UNKNOWN|
67     * @return info Instance of |RttResponderInfo|.
68     */
69    getResponderInfo_1_6() generates (WifiStatus status, RttResponder info);
70
71    /**
72     * Enable RTT responder mode.
73     *
74     * @param cmdId command Id to use for this invocation.
75     * @parm channelHint Hint of the channel information where RTT responder must
76     *       be enabled on.
77     * @param maxDurationInSeconds Timeout of responder mode.
78     * @param info Instance of |RttResponderInfo|.
79     * @return status WifiStatus of the operation.
80     *         Possible status codes:
81     *         |WifiStatusCode.SUCCESS|,
82     *         |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
83     *         |WifiStatusCode.ERROR_INVALID_ARGS|,
84     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
85     *         |WifiStatusCode.ERROR_UNKNOWN|
86     */
87    enableResponder_1_6(CommandId cmdId, WifiChannelInfo channelHint,
88        uint32_t maxDurationInSeconds, RttResponder info) generates (WifiStatus status);
89
90    /**
91     * RTT capabilities of the device.
92     *
93     * @return status WifiStatus of the operation.
94     *         Possible status codes:
95     *         |WifiStatusCode.SUCCESS|,
96     *         |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
97     *         |WifiStatusCode.ERROR_UNKNOWN|
98     * @return capabilities Instance of |RttCapabilities|.
99     */
100    getCapabilities_1_6() generates (WifiStatus status, RttCapabilities capabilities);
101};
102