blob: 0db1d2c72b7ee2d68ee87ea50802aec395f9868c [file] [log] [blame]
Ahmed ElArabawyd73b64c2022-01-13 09:20:15 -08001/*
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 android.hardware.wifi@1.6;
18
19import @1.0::CommandId;
20import @1.0::WifiStatus;
21import @1.4::IWifiRttController;
22import IWifiRttControllerEventCallback;
23/**
24 * Interface used to perform RTT(Round trip time) operations.
25 */
26interface IWifiRttController extends @1.4::IWifiRttController {
27 /**
28 * Requests notifications of significant events on this rtt controller.
29 * Multiple calls to this must register multiple callbacks each of which must
30 * receive all events.
31 *
32 * @param callback An instance of the |IWifiRttControllerEventCallback| HIDL
33 * interface object.
34 * @return status WifiStatus of the operation.
35 * Possible status codes:
36 * |WifiStatusCode.SUCCESS|,
37 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
38 */
39 registerEventCallback_1_6(IWifiRttControllerEventCallback callback)
40 generates (WifiStatus status);
41
42 /**
43 * API to request RTT measurement.
44 *
45 * @param cmdId command Id to use for this invocation.
46 * @param rttConfigs Vector of |RttConfig| parameters.
47 * @return status WifiStatus of the operation.
48 * Possible status codes:
49 * |WifiStatusCode.SUCCESS|,
50 * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
51 * |WifiStatusCode.ERROR_INVALID_ARGS|,
52 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
53 * |WifiStatusCode.ERROR_UNKNOWN|
54 */
55 rangeRequest_1_6(CommandId cmdId, vec<RttConfig> rttConfigs) generates (WifiStatus status);
56
57 /**
58 * Get RTT responder information e.g. WiFi channel to enable responder on.
59 *
60 * @return status WifiStatus of the operation.
61 * Possible status codes:
62 * |WifiStatusCode.SUCCESS|,
63 * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
64 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
65 * |WifiStatusCode.ERROR_UNKNOWN|
66 * @return info Instance of |RttResponderInfo|.
67 */
68 getResponderInfo_1_6() generates (WifiStatus status, RttResponder info);
69
70 /**
71 * Enable RTT responder mode.
72 *
73 * @param cmdId command Id to use for this invocation.
74 * @parm channelHint Hint of the channel information where RTT responder must
75 * be enabled on.
76 * @param maxDurationInSeconds Timeout of responder mode.
77 * @param info Instance of |RttResponderInfo|.
78 * @return status WifiStatus of the operation.
79 * Possible status codes:
80 * |WifiStatusCode.SUCCESS|,
81 * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
82 * |WifiStatusCode.ERROR_INVALID_ARGS|,
83 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
84 * |WifiStatusCode.ERROR_UNKNOWN|
85 */
86 enableResponder_1_6(CommandId cmdId, WifiChannelInfo channelHint,
87 uint32_t maxDurationInSeconds, RttResponder info) generates (WifiStatus status);
88
89 /**
90 * RTT capabilities of the device.
91 *
92 * @return status WifiStatus of the operation.
93 * Possible status codes:
94 * |WifiStatusCode.SUCCESS|,
95 * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|,
96 * |WifiStatusCode.ERROR_UNKNOWN|
97 * @return capabilities Instance of |RttCapabilities|.
98 */
99 getCapabilities_1_6() generates (WifiStatus status, RttCapabilities capabilities);
100};