blob: 95cf6151a5406ace5a736785c7acd7ccb5ac696a [file] [log] [blame]
Malcolm Chenf168f0b2018-11-26 15:16:10 -08001/*
2 * Copyright (C) 2018 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.3;
18
19import @1.2::IRadio;
Malcolm Chended43992018-11-27 20:23:13 -080020import @1.1::RadioAccessSpecifier;
Malcolm Chenf168f0b2018-11-26 15:16:10 -080021
22/**
Malcolm Chended43992018-11-27 20:23:13 -080023 * Note: IRadio 1.3 is an intermediate layer between Android P and Android Q. It's specifically
24 * designed for CBRS related interfaces. All other interfaces for Q are added in IRadio 1.4.
25 *
Malcolm Chenf168f0b2018-11-26 15:16:10 -080026 * This interface is used by telephony and telecom to talk to cellular radio.
27 * All the functions have minimum one parameter:
28 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
29 * duration of a method call. If clients provide colliding serials (including passing the same
30 * serial to different methods), multiple responses (one for each method call) must still be served.
31 * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
32 */
33interface IRadio extends @1.2::IRadio {
Malcolm Chended43992018-11-27 20:23:13 -080034 /**
35 * Specify which bands modem's background scan must act on.
36 * If specifyChannels is true, it only scans bands specified in specifiers.
37 * If specifyChannels is false, it scans all bands.
38 *
39 * For example, CBRS is only on LTE band 48. By specifying this band,
40 * modem saves more power.
41 *
42 * @param serial Serial number of request.
43 * @param specifyChannels whether to scan bands defined in specifiers.
44 * @param specifiers which bands to scan. Only used if specifyChannels is true.
45 *
46 * Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
47 */
48 oneway setSystemSelectionChannels(int32_t serial, bool specifyChannels,
49 vec<RadioAccessSpecifier> specifiers);
50
51 /**
Nazanin Bakhshi22df0692019-02-27 10:10:29 -080052 * Toggle logical modem on and off. The difference with setRadioPower is,
53 * setRadioPower affects all logical modems while this controls just one.
Malcolm Chended43992018-11-27 20:23:13 -080054 *
55 * @param serial Serial number of request.
56 * @param on True to turn on the logical modem, otherwise turn it off.
57 *
58 * Response function is IRadioResponse.enableModemResponse()
59 */
60 oneway enableModem(int32_t serial, bool on);
Nazanin Bakhshida4e7932019-01-17 10:05:10 -080061
62 /**
Nazanin Bakhshi22df0692019-02-27 10:10:29 -080063 * Request status of logical modem. It returns isEnabled=true if the logical modem is on.
64 * This method is the getter method for enableModem.
Nazanin Bakhshida4e7932019-01-17 10:05:10 -080065 *
66 * @param serial Serial number of request.
67 *
68 * Response function is IRadioResponse.getModemStackStatusResponse()
69 */
70 oneway getModemStackStatus(int32_t serial);
71};