1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2022 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License. 16 --> 17 18<!-- Each config is enclosed by <config> tags, a config must include "name", "version" and 19"script_name" attributes. The "script_name" should correspond to a script name of a lua script in 20the res/raw/ folder. 21 22Each config must have a pair of <subscribers> tags that encloses one or more 23<subscriber> tags. 24 25Each <subscriber> must contain "handler" and "priority" attributes, where handler is the name of 26the entry function in the lua script and priority is used to prioritize tasks in low system 27resource environments, from 1 to 100, with 1 having most priority. 28 29Each <subscriber> must also contain one and only one <publisher> that's the publisher the 30subscriber listens to for data. 31 32The <publisher> has a "type" attribute that denotes one of the several types of publishers 33available (refer to the telemetry proto for all types). Depending on the type, the enclosed 34tags will be different since each type of publisher requires different settings. The format 35is simply <setting_fieldd_name>SETTING_VALUE</setting_field_name> for each of the publisher 36fields (refer to telemetry proto for each type's fields). --> 37 38<configs> 39 <config 40 name="wifi_with_session_metrics_config" 41 version="1" 42 script_name="conn_sessions"> 43 <subscribers> 44 <subscriber 45 handler="onConnectivityDataWithSession" 46 priority="1"> 47 <publisher 48 type="connectivity"> 49 <transport>TRANSPORT_WIFI</transport> 50 <oem_type>OEM_NONE</oem_type> 51 </publisher> 52 </subscriber> 53 </subscribers> 54 </config> 55 <config 56 name="cellular_with_session_metrics_config" 57 version="1" 58 script_name="conn_sessions"> 59 <subscribers> 60 <subscriber 61 handler="onConnectivityDataWithSession" 62 priority="1"> 63 <publisher 64 type="connectivity"> 65 <transport>TRANSPORT_CELLULAR</transport> 66 <oem_type>OEM_NONE</oem_type> 67 </publisher> 68 </subscriber> 69 </subscribers> 70 </config> 71 <config 72 name="ethernet_with_session_metrics_config" 73 version="1" 74 script_name="conn_sessions"> 75 <subscribers> 76 <subscriber 77 handler="onConnectivityDataWithSession" 78 priority="1"> 79 <publisher 80 type="connectivity"> 81 <transport>TRANSPORT_ETHERNET</transport> 82 <oem_type>OEM_NONE</oem_type> 83 </publisher> 84 </subscriber> 85 </subscribers> 86 </config> 87</configs> 88