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