2017-07-20 11:28:44 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package android.hardware.radio@1.2;
|
|
|
|
|
|
|
|
import @1.1::IRadio;
|
2017-12-14 00:52:15 +01:00
|
|
|
import @1.1::RadioAccessNetworks;
|
2018-01-12 02:19:33 +01:00
|
|
|
import @1.0::DataProfileInfo;
|
|
|
|
import @1.0::RadioTechnology;
|
2017-07-20 11:28:44 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This interface is used by telephony and telecom to talk to cellular radio.
|
|
|
|
* All the functions have minimum one parameter:
|
|
|
|
* serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
|
|
|
|
* duration of a method call. If clients provide colliding serials (including passing the same
|
|
|
|
* serial to different methods), multiple responses (one for each method call) must still be served.
|
|
|
|
* setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
|
|
|
|
*/
|
|
|
|
interface IRadio extends @1.1::IRadio {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Starts a network scan
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param request Defines the radio networks/bands/channels which need to be scanned.
|
|
|
|
*
|
2021-02-19 05:55:26 +01:00
|
|
|
* Response function is IRadioResponse.startNetworkScanResponse() which may return
|
|
|
|
* RadioError:REQUEST_NOT_SUPPORTED if @1.4::IRadio or higher is supported.
|
|
|
|
*
|
|
|
|
* DEPRECATED in @1.4 or higher, use @1.4::IRadio.startNetworkScan_1_4() instead.
|
2017-07-20 11:28:44 +02:00
|
|
|
*/
|
|
|
|
oneway startNetworkScan_1_2(int32_t serial, NetworkScanRequest request);
|
2017-12-14 00:52:15 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the indication filter.
|
|
|
|
*
|
|
|
|
* Prevents the reporting of specified unsolicited indications from the radio. This is used
|
|
|
|
* for power saving in instances when those indications are not needed. If unset, defaults to
|
|
|
|
* @1.2::IndicationFilter:ALL.
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the
|
2018-02-13 20:08:17 +01:00
|
|
|
* indications are enabled. See @1.2::IndicationFilter for the definition of each bit.
|
2017-12-14 00:52:15 +01:00
|
|
|
*
|
|
|
|
* Response callback is IRadioResponse.setIndicationFilterResponse()
|
|
|
|
*/
|
|
|
|
oneway setIndicationFilter_1_2(int32_t serial, bitfield<IndicationFilter> indicationFilter);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the signal strength reporting criteria.
|
|
|
|
*
|
2018-06-21 20:46:42 +02:00
|
|
|
* The resulting reporting rules are the AND of all the supplied criteria. For each RAN
|
|
|
|
* The thresholdsDbm and hysteresisDb apply to only the following measured quantities:
|
|
|
|
* -GERAN - RSSI
|
|
|
|
* -CDMA2000 - RSSI
|
|
|
|
* -UTRAN - RSCP
|
|
|
|
* -EUTRAN - RSRP
|
2017-12-14 00:52:15 +01:00
|
|
|
*
|
2018-06-21 20:46:42 +02:00
|
|
|
* Note: Reporting criteria must be individually set for each RAN. For any unset reporting
|
|
|
|
* criteria, the value is implementation-defined.
|
2017-12-14 00:52:15 +01:00
|
|
|
*
|
2018-06-21 20:46:42 +02:00
|
|
|
* Note: As this mechanism generally only constrains reports based on one measured quantity per
|
|
|
|
* RAN, if multiple measured quantities must be used to trigger a report for a given RAN, the
|
|
|
|
* only valid field may be hysteresisMs: hysteresisDb and thresholdsDbm must be set to zero and
|
|
|
|
* length zero respectively. If either hysteresisDb or thresholdsDbm is set, then reports shall
|
|
|
|
* only be triggered by the respective measured quantity, subject to the applied constraints.
|
|
|
|
*
|
|
|
|
* Response callback is IRadioResponse.setSignalStrengthReportingCriteriaResponse()
|
2017-12-14 00:52:15 +01:00
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param hysteresisMs A hysteresis time in milliseconds to prevent flapping. A value of 0
|
2018-02-13 20:08:17 +01:00
|
|
|
* disables hysteresis.
|
2017-12-14 00:52:15 +01:00
|
|
|
* @param hysteresisDb An interval in dB defining the required magnitude change between reports.
|
2018-06-21 20:46:42 +02:00
|
|
|
* hysteresisDb must be smaller than the smallest threshold delta. An interval value of 0
|
|
|
|
* disables hysteresis.
|
2017-12-14 00:52:15 +01:00
|
|
|
* @param thresholdsDbm A vector of trigger thresholds in dBm. A vector size of 0 disables the
|
2018-02-13 20:08:17 +01:00
|
|
|
* use of thresholds for reporting.
|
2018-02-13 22:41:59 +01:00
|
|
|
* @param accessNetwork The type of network for which to apply these thresholds.
|
2017-12-14 00:52:15 +01:00
|
|
|
*/
|
|
|
|
oneway setSignalStrengthReportingCriteria(int32_t serial, int32_t hysteresisMs,
|
2018-02-13 22:41:59 +01:00
|
|
|
int32_t hysteresisDb, vec<int32_t> thresholdsDbm, AccessNetwork accessNetwork);
|
2017-12-14 00:52:15 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the link capacity reporting criteria.
|
|
|
|
*
|
|
|
|
* The resulting reporting criteria are the AND of all the supplied criteria.
|
|
|
|
*
|
|
|
|
* Note: Reporting criteria must be individually set for each RAN. If unset, reporting criteria
|
|
|
|
* for that RAN are implementation-defined.
|
|
|
|
*
|
|
|
|
* Response callback is IRadioResponse.setLinkCapacityReportingCriteriaResponse().
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param hysteresisMs A hysteresis time in milliseconds to prevent flapping. A value of 0
|
2018-02-13 20:08:17 +01:00
|
|
|
* disables hysteresis.
|
2017-12-14 00:52:15 +01:00
|
|
|
* @param hysteresisDlKbps An interval in kbps defining the required magnitude change between DL
|
2018-02-13 20:08:17 +01:00
|
|
|
* reports. hysteresisDlKbps must be smaller than the smallest threshold delta. A value of 0
|
|
|
|
* disables hysteresis.
|
2017-12-14 00:52:15 +01:00
|
|
|
* @param hysteresisUlKbps An interval in kbps defining the required magnitude change between UL
|
2018-02-13 20:08:17 +01:00
|
|
|
* reports. hysteresisUlKbps must be smaller than the smallest threshold delta. A value of 0
|
|
|
|
* disables hysteresis.
|
2017-12-14 00:52:15 +01:00
|
|
|
* @param thresholdsDownlinkKbps A vector of trigger thresholds in kbps for downlink reports. A
|
2018-02-13 20:08:17 +01:00
|
|
|
* vector size of 0 disables the use of DL thresholds for reporting.
|
2017-12-14 00:52:15 +01:00
|
|
|
* @param thresholdsUplinkKbps A vector of trigger thresholds in kbps for uplink reports. A
|
2018-02-13 20:08:17 +01:00
|
|
|
* vector size of 0 disables the use of UL thresholds for reporting.
|
2018-02-13 22:41:59 +01:00
|
|
|
* @param accessNetwork The type of network for which to apply these thresholds.
|
2017-12-14 00:52:15 +01:00
|
|
|
*/
|
|
|
|
oneway setLinkCapacityReportingCriteria(int32_t serial, int32_t hysteresisMs,
|
|
|
|
int32_t hysteresisDlKbps, int32_t hysteresisUlKbps, vec<int32_t> thresholdsDownlinkKbps,
|
2018-02-13 22:41:59 +01:00
|
|
|
vec<int32_t> thresholdsUplinkKbps, AccessNetwork accessNetwork);
|
2018-01-12 02:19:33 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
|
|
|
|
* the data connection must be added to data calls and a unsolDataCallListChanged() must be
|
|
|
|
* sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
|
|
|
|
* lost due to many factors, including deactivateDataCall() being issued, the radio powered
|
|
|
|
* off, reception lost or even transient factors like congestion. This data call list is
|
|
|
|
* returned by getDataCallList() and dataCallListChanged().
|
|
|
|
*
|
|
|
|
* The Radio is expected to:
|
|
|
|
* - Create one data call context.
|
|
|
|
* - Create and configure a dedicated interface for the context.
|
|
|
|
* - The interface must be point to point.
|
|
|
|
* - The interface is configured with one or more addresses and is capable of sending and
|
|
|
|
* receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128
|
|
|
|
* for IPv6.
|
|
|
|
* - Must not modify routing configuration related to this interface; routing management is
|
|
|
|
* exclusively within the purview of the Android OS.
|
|
|
|
* - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
|
|
|
|
* in the response of getDataRegistrationState.
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param accessNetwork The access network to setup the data call. If the data connection cannot
|
|
|
|
* be established on the specified access network, the setup request must be failed.
|
|
|
|
* @param dataProfileInfo Data profile info.
|
|
|
|
* @param modemCognitive Indicates that the requested profile has previously been provided via
|
|
|
|
* setDataProfile().
|
|
|
|
* @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
|
|
|
|
* @param isRoaming Indicates whether or not the framework has requested this setupDataCall for
|
|
|
|
* a roaming network. The 'protocol' parameter in the old RIL API must be filled
|
|
|
|
* accordingly based on the roaming condition. Note this is for backward compatibility with
|
|
|
|
* the old radio modem. The modem must not use this param for any other reason.
|
|
|
|
* @param reason The request reason. Must be DataRequestReason.NORMAL or
|
|
|
|
* DataRequestReason.HANDOVER.
|
|
|
|
* @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link
|
|
|
|
* addresses of the existing data connection. The format is IP address with optional "/"
|
|
|
|
* prefix length (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
|
|
|
|
* "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
|
|
|
|
* the prefix length is absent, then the addresses are assumed to be point to point with
|
|
|
|
* IPv4 with prefix length 32 or IPv6 with prefix length 128. This parameter must be ignored
|
|
|
|
* unless reason is DataRequestReason.HANDOVER.
|
|
|
|
* @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS
|
|
|
|
* addresses of the existing data connection. The format is defined in RFC-4291 section
|
|
|
|
* 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless
|
|
|
|
* reason is DataRequestReason.HANDOVER.
|
|
|
|
*
|
|
|
|
* Response function is IRadioResponse.setupDataCallResponse()
|
|
|
|
*/
|
|
|
|
oneway setupDataCall_1_2(int32_t serial, AccessNetwork accessNetwork,
|
|
|
|
DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
|
|
|
|
bool isRoaming, DataRequestReason reason, vec<string> addresses, vec<string> dnses);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deactivate packet data connection and remove from the data call list. An
|
|
|
|
* unsolDataCallListChanged() must be sent when data connection is deactivated.
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param cid Data call id.
|
|
|
|
* @param reason The request reason. Must be normal, handover, or shutdown.
|
|
|
|
*
|
|
|
|
* Response function is IRadioResponse.deactivateDataCallResponse()
|
|
|
|
*/
|
|
|
|
oneway deactivateDataCall_1_2(int32_t serial, int32_t cid, DataRequestReason reason);
|
2017-07-20 11:28:44 +02:00
|
|
|
};
|