• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 package android.car.hardware;
18 
19 import android.car.hardware.CarDiagnosticEvent;
20 import android.car.hardware.ICarDiagnosticEventListener;
21 
22 /** @hide */
23 interface ICarDiagnostic {
24     /**
25      * Register a callback (or update registration) for diagnostic events.
26      */
registerOrUpdateDiagnosticListener(int frameType, int rate, in ICarDiagnosticEventListener listener)27     boolean registerOrUpdateDiagnosticListener(int frameType, int rate,
28         in ICarDiagnosticEventListener listener) = 1;
29 
30     /**
31      * Get the value for the most recent live frame data available.
32      */
getLatestLiveFrame()33     CarDiagnosticEvent getLatestLiveFrame() = 2;
34 
35     /**
36      * Get the list of timestamps for which there exist a freeze frame stored.
37      */
getFreezeFrameTimestamps()38     long[] getFreezeFrameTimestamps() = 3;
39 
40     /**
41      * Get the value for the freeze frame stored given a timestamp.
42      */
getFreezeFrame(long timestamp)43     CarDiagnosticEvent getFreezeFrame(long timestamp) = 4;
44 
45     /**
46      * Erase freeze frames given timestamps (or all, if no timestamps).
47      */
clearFreezeFrames(in long[] timestamps)48      boolean clearFreezeFrames(in long[] timestamps) = 5;
49 
50     /**
51      * Stop receiving diagnostic events for a given callback.
52      */
unregisterDiagnosticListener(int frameType, in ICarDiagnosticEventListener callback)53      void unregisterDiagnosticListener(int frameType,
54          in ICarDiagnosticEventListener callback) = 6;
55 }