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