blob: babe86f60e77f6e32bb790304403bca0b5d34395 [file] [log] [blame]
Sooraj Sasindran55092ae2017-07-20 02:28:44 -07001/*
2 * Copyright (C) 2017 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.radio@1.2;
18
19import @1.1::IRadio;
Eric Schwarzenbach21c6dc32017-12-13 15:52:15 -080020import @1.1::RadioAccessNetworks;
Sooraj Sasindran55092ae2017-07-20 02:28:44 -070021
22/**
23 * This interface is used by telephony and telecom to talk to cellular radio.
24 * All the functions have minimum one parameter:
25 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
26 * duration of a method call. If clients provide colliding serials (including passing the same
27 * serial to different methods), multiple responses (one for each method call) must still be served.
28 * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
29 */
30interface IRadio extends @1.1::IRadio {
31
32 /**
33 * Starts a network scan
34 *
35 * @param serial Serial number of request.
36 * @param request Defines the radio networks/bands/channels which need to be scanned.
37 *
38 * Response function is IRadioResponse.startNetworkScanResponse()
39 */
40 oneway startNetworkScan_1_2(int32_t serial, NetworkScanRequest request);
Eric Schwarzenbach21c6dc32017-12-13 15:52:15 -080041
42 /**
43 * Sets the indication filter.
44 *
45 * Prevents the reporting of specified unsolicited indications from the radio. This is used
46 * for power saving in instances when those indications are not needed. If unset, defaults to
47 * @1.2::IndicationFilter:ALL.
48 *
49 * @param serial Serial number of request.
50 * @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the
51 * indications are enabled. See @1.2::IndicationFilter for the definition of each bit.
52 *
53 * Response callback is IRadioResponse.setIndicationFilterResponse()
54 */
55 oneway setIndicationFilter_1_2(int32_t serial, bitfield<IndicationFilter> indicationFilter);
56
57 /**
58 * Sets the signal strength reporting criteria.
59 *
60 * The resulting reporting criteria are the AND of all the supplied criteria.
61 *
62 * Note: Reporting criteria must be individually set for each RAN. If unset, reporting criteria
63 * for that RAN are implementation-defined.
64 *
65 * Response callback is IRadioResponse.setSignalStrengthReportingCriteriaResponse().
66 *
67 * @param serial Serial number of request.
68 * @param hysteresisMs A hysteresis time in milliseconds to prevent flapping. A value of 0
69 * disables hysteresis.
70 * @param hysteresisDb An interval in dB defining the required magnitude change between reports.
71 * hysteresisDb must be smaller than the smallest threshold delta. An
72 * interval value of 0 disables hysteresis.
73 * @param thresholdsDbm A vector of trigger thresholds in dBm. A vector size of 0 disables the
74 * use of thresholds for reporting.
75 * @param ran The type of network for which to apply these thresholds.
76 */
77 oneway setSignalStrengthReportingCriteria(int32_t serial, int32_t hysteresisMs,
78 int32_t hysteresisDb, vec<int32_t> thresholdsDbm, RadioAccessNetworks ran);
79
80 /**
81 * Sets the link capacity reporting criteria.
82 *
83 * The resulting reporting criteria are the AND of all the supplied criteria.
84 *
85 * Note: Reporting criteria must be individually set for each RAN. If unset, reporting criteria
86 * for that RAN are implementation-defined.
87 *
88 * Response callback is IRadioResponse.setLinkCapacityReportingCriteriaResponse().
89 *
90 * @param serial Serial number of request.
91 * @param hysteresisMs A hysteresis time in milliseconds to prevent flapping. A value of 0
92 * disables hysteresis.
93 * @param hysteresisDlKbps An interval in kbps defining the required magnitude change between DL
94 * reports. hysteresisDlKbps must be smaller than the smallest threshold
95 * delta. A value of 0 disables hysteresis.
96 * @param hysteresisUlKbps An interval in kbps defining the required magnitude change between UL
97 * reports. hysteresisUlKbps must be smaller than the smallest threshold
98 * delta. A value of 0 disables hysteresis.
99 * @param thresholdsDownlinkKbps A vector of trigger thresholds in kbps for downlink reports. A
100 * vector size of 0 disables the use of DL thresholds for
101 * reporting.
102 * @param thresholdsUplinkKbps A vector of trigger thresholds in kbps for uplink reports. A
103 * vector size of 0 disables the use of UL thresholds for reporting.
104 * @param ran The type of network for which to apply these thresholds.
105 */
106 oneway setLinkCapacityReportingCriteria(int32_t serial, int32_t hysteresisMs,
107 int32_t hysteresisDlKbps, int32_t hysteresisUlKbps, vec<int32_t> thresholdsDownlinkKbps,
108 vec<int32_t> thresholdsUplinkKbps, RadioAccessNetworks ran);
Sooraj Sasindran55092ae2017-07-20 02:28:44 -0700109};