• Home
Name Date Size #Lines LOC

..--

databroker/03-May-2024-1,179743

publisher/03-May-2024-4,9163,300

scriptexecutorinterface/03-May-2024-21144

sessioncontroller/03-May-2024-322192

systemmonitor/03-May-2024-294156

util/03-May-2024-293161

CarTelemetryService.javaD03-May-202432 KiB703533

MetricsConfigStore.javaD03-May-20245.2 KiB13377

README.mdD03-May-20241.7 KiB7543

ResultStore.javaD03-May-202421.3 KiB548357

UidPackageMapper.javaD03-May-202411.5 KiB302211

README.md

1<!--
2  Copyright (C) 2021 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
17# CarTelemetryService
18
19Source code for AAOS OEM Telemetry solution.
20
21
22## Enabling CarTelemetryService
23
24CarTelemetryService can be enabled with
25
26```
27adb shell cmd car_service enable-feature car_telemetry_service
28```
29
30## Car Shell Command
31
32Run the commands from `$ANDROID_BUILD_TOP`.
33
341. Create a MetricsConfig text proto - `sample_wifi_netstats.textproto`
35
36```
37name: "sample_wifi_netstats"
38version: 1
39subscribers {
40  handler: "onWifiStats"
41  publisher: {
42    connectivity: {
43        transport: TRANSPORT_WIFI
44        oem_type: OEM_NONE
45    }
46  }
47  priority: 0
48}
49script:
50  'function onWifiStats(data, state)\n'
51  '    on_script_finished(data)\n'
52  'end\n'
53```
54
552. Generate MetricsConfig binary proto
56
57```
58./out/host/linux-x86/bin/aprotoc \
59  --encode=android.car.telemetry.MetricsConfig \
60  packages/services/Car/car-lib/src/android/car/telemetry/telemetry.proto \
61  < sample_wifi_netstats.textproto > sample_wifi_netstats.binproto
62```
63
643. Add the config to CarTelemetryService
65
66```
67adb shell cmd car_service telemetry add sample_wifi_netstats < sample_wifi_netstats.binproto
68```
69
704. Get results
71
72```
73adb shell cmd car_service telemetry get-result sample_wifi_netstats
74```
75