1 /*
2  * Copyright (C) 2016 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 package android.car;
17 
18 import android.annotation.IntDef;
19 import android.car.hardware.CarPropertyConfig;
20 
21 import java.lang.annotation.Retention;
22 import java.lang.annotation.RetentionPolicy;
23 
24 /**
25  * Object used to indicate area value for car properties which have area type
26  * {@link VehicleAreaType#VEHICLE_AREA_TYPE_WHEEL}.
27  * <p>
28  * The constants defined by {@link VehicleAreaWheel} indicate the position for area type
29  * {@link VehicleAreaType#VEHICLE_AREA_TYPE_WHEEL}. A property can have a single or a combination of
30  * positions. Developers can query the position using
31  * {@link android.car.hardware.property.CarPropertyManager#getAreaId(int, int)}.
32  * </p><p>
33  * Refer to {@link CarPropertyConfig#getAreaIds()} for more information about areaId.
34  * </p>
35  */
36 
37 // This class is only designed to provide constants for VehicleAreaWheel. The constants should
38 // exactly be same as VehicleAreaWheel in /hardware/interfaces/automotive/vehicle/2.0/types.hal.
39 public final class VehicleAreaWheel {
40     /** Unknown wheel*/
41     public static final int WHEEL_UNKNOWN = 0x00;
42     /** Constant for left front wheel.*/
43     public static final int WHEEL_LEFT_FRONT = 0x01;
44     /** Constant for right front wheel.*/
45     public static final int WHEEL_RIGHT_FRONT = 0x02;
46     /** Constant for left rear wheel.*/
47     public static final int WHEEL_LEFT_REAR = 0x04;
48     /** Constant for right rear wheel.*/
49     public static final int WHEEL_RIGHT_REAR = 0x08;
50 
51     /** @hide */
52     @IntDef(prefix = {"WHEEL_"}, value = {
53             WHEEL_UNKNOWN,
54             WHEEL_LEFT_FRONT,
55             WHEEL_RIGHT_FRONT,
56             WHEEL_LEFT_REAR,
57             WHEEL_RIGHT_REAR
58     })
59     @Retention(RetentionPolicy.SOURCE)
60 
61     public  @interface Enum {}
VehicleAreaWheel()62     private VehicleAreaWheel() {}
63 }
64 
65