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