xref: /aosp_15_r20/hardware/interfaces/radio/config/1.0/IRadioConfig.hal (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1*4d7e907cSAndroid Build Coastguard Worker/*
2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2018 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 IRadioConfigResponse;
20*4d7e907cSAndroid Build Coastguard Workerimport IRadioConfigIndication;
21*4d7e907cSAndroid Build Coastguard Worker
22*4d7e907cSAndroid Build Coastguard Worker/**
23*4d7e907cSAndroid Build Coastguard Worker * This interface is used by telephony and telecom to talk to cellular radio for the purpose of
24*4d7e907cSAndroid Build Coastguard Worker * radio configuration, and it is not associated with any specific modem or slot.
25*4d7e907cSAndroid Build Coastguard Worker * All the functions have minimum one parameter:
26*4d7e907cSAndroid Build Coastguard Worker * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
27*4d7e907cSAndroid Build Coastguard Worker * duration of a method call. If clients provide colliding serials (including passing the same
28*4d7e907cSAndroid Build Coastguard Worker * serial to different methods), multiple responses (one for each method call) must still be served.
29*4d7e907cSAndroid Build Coastguard Worker */
30*4d7e907cSAndroid Build Coastguard Workerinterface IRadioConfig {
31*4d7e907cSAndroid Build Coastguard Worker
32*4d7e907cSAndroid Build Coastguard Worker    /**
33*4d7e907cSAndroid Build Coastguard Worker     * Set response functions for radio config requests & radio config indications.
34*4d7e907cSAndroid Build Coastguard Worker     *
35*4d7e907cSAndroid Build Coastguard Worker     * @param radioConfigResponse Object containing radio config response functions
36*4d7e907cSAndroid Build Coastguard Worker     * @param radioConfigIndication Object containing radio config indications
37*4d7e907cSAndroid Build Coastguard Worker     */
38*4d7e907cSAndroid Build Coastguard Worker    setResponseFunctions(IRadioConfigResponse radioConfigResponse,
39*4d7e907cSAndroid Build Coastguard Worker            IRadioConfigIndication radioConfigIndication);
40*4d7e907cSAndroid Build Coastguard Worker
41*4d7e907cSAndroid Build Coastguard Worker    /**
42*4d7e907cSAndroid Build Coastguard Worker     * Get SIM Slot status.
43*4d7e907cSAndroid Build Coastguard Worker     *
44*4d7e907cSAndroid Build Coastguard Worker     * Request provides the slot status of all active and inactive SIM slots and whether card is
45*4d7e907cSAndroid Build Coastguard Worker     * present in the slots or not.
46*4d7e907cSAndroid Build Coastguard Worker     *
47*4d7e907cSAndroid Build Coastguard Worker     * @param serial Serial number of request.
48*4d7e907cSAndroid Build Coastguard Worker     *
49*4d7e907cSAndroid Build Coastguard Worker     * Response callback is IRadioConfigResponse.getSimSlotsStatusResponse()
50*4d7e907cSAndroid Build Coastguard Worker     */
51*4d7e907cSAndroid Build Coastguard Worker    oneway getSimSlotsStatus(int32_t serial);
52*4d7e907cSAndroid Build Coastguard Worker
53*4d7e907cSAndroid Build Coastguard Worker    /**
54*4d7e907cSAndroid Build Coastguard Worker     * Set SIM Slot mapping.
55*4d7e907cSAndroid Build Coastguard Worker
56*4d7e907cSAndroid Build Coastguard Worker     * Maps the logical slots to the physical slots. Logical slot is the slot that is seen by modem.
57*4d7e907cSAndroid Build Coastguard Worker     * Physical slot is the actual physical slot. Request maps the physical slot to logical slot.
58*4d7e907cSAndroid Build Coastguard Worker     * Logical slots that are already mapped to the requested physical slot are not impacted.
59*4d7e907cSAndroid Build Coastguard Worker     *
60*4d7e907cSAndroid Build Coastguard Worker     * Example no. of logical slots 1 and physical slots 2:
61*4d7e907cSAndroid Build Coastguard Worker     * The only logical slot (index 0) can be mapped to first physical slot (value 0) or second
62*4d7e907cSAndroid Build Coastguard Worker     * physical slot(value 1), while the other physical slot remains unmapped and inactive.
63*4d7e907cSAndroid Build Coastguard Worker     * slotMap[0] = 1 or slotMap[0] = 0
64*4d7e907cSAndroid Build Coastguard Worker     *
65*4d7e907cSAndroid Build Coastguard Worker     * Example no. of logical slots 2 and physical slots 2:
66*4d7e907cSAndroid Build Coastguard Worker     * First logical slot (index 0) can be mapped to physical slot 1 or 2 and other logical slot
67*4d7e907cSAndroid Build Coastguard Worker     * can be mapped to other physical slot. Each logical slot must be mapped to a physical slot.
68*4d7e907cSAndroid Build Coastguard Worker     * slotMap[0] = 0 and slotMap[1] = 1 or slotMap[0] = 1 and slotMap[1] = 0
69*4d7e907cSAndroid Build Coastguard Worker     *
70*4d7e907cSAndroid Build Coastguard Worker     * @param serial Serial number of request
71*4d7e907cSAndroid Build Coastguard Worker     * @param slotMap Logical to physical slot mapping, size == no. of radio instances. Index is
72*4d7e907cSAndroid Build Coastguard Worker     *        mapping to logical slot and value to physical slot, need to provide all the slots
73*4d7e907cSAndroid Build Coastguard Worker     *        mapping when sending request in case of multi slot device.
74*4d7e907cSAndroid Build Coastguard Worker     *        EX: uint32_t slotMap[logical slot] = physical slot
75*4d7e907cSAndroid Build Coastguard Worker     *        index 0 is the first logical_slot number of logical slots is equal to number of Radio
76*4d7e907cSAndroid Build Coastguard Worker     *        instances and number of physical slots is equal to size of slotStatus in
77*4d7e907cSAndroid Build Coastguard Worker     *        getSimSlotsStatusResponse
78*4d7e907cSAndroid Build Coastguard Worker     *
79*4d7e907cSAndroid Build Coastguard Worker     * Response callback is IRadioConfigResponse.setSimSlotsMappingResponse()
80*4d7e907cSAndroid Build Coastguard Worker     */
81*4d7e907cSAndroid Build Coastguard Worker    oneway setSimSlotsMapping(int32_t serial, vec<uint32_t> slotMap);
82*4d7e907cSAndroid Build Coastguard Worker};
83