summaryrefslogtreecommitdiff
path: root/automotive/telemetry/aidl/android/frameworks/automotive/telemetry/ICarTelemetry.aidl
blob: c71d6706bd15131016608d3506af984a324b23d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * Copyright (c) 2021, 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.frameworks.automotive.telemetry;

import android.frameworks.automotive.telemetry.CallbackConfig;
import android.frameworks.automotive.telemetry.CarData;
import android.frameworks.automotive.telemetry.ICarTelemetryCallback;

/**
 * This service collects data from varios other services, buffers them, and delivers to the
 * listening scripts running in CarTelemetryService.
 */
@VintfStability
interface ICarTelemetry {
  /**
   * Sends a list of CarData to CarTelemetry.
   *
   * <p>Note that Binder has 1MB data limit from all the clients combined, please keep that in
   * mind when writing frequent data.
   *
   * @throws IllegalArgumentException if total {@code dataList#content} size is more than 10KB.
   */
  void write(in CarData[] dataList);

  /**
   * Adds a ICarTelemetryCallback.
   *
   * <p>Make sure to call {@code removeCallback} when the callback is no longer active
   * or when the CallbackConfig needs to be updated.
   *
   * @param callback The callback to receive cartelemetryd updates.
   */
  void addCallback(in CallbackConfig config, in ICarTelemetryCallback callback);

  /**
   * Removes a ICarTelemetryCallback from receiving updates from cartelemetryd.
   *
   * @param callback The callback to receive cartelemetryd updates.
   */
  void removeCallback(in ICarTelemetryCallback callback);
}