• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 package com.android.car.hal;
18 
19 import android.hardware.automotive.vehicle.VehicleAreaConfig;
20 
21 /**
22  * AidlHalAreaConfig is a HalAreaConfig with an AIDL backend.
23  */
24 public final class AidlHalAreaConfig extends HalAreaConfig {
25     private final VehicleAreaConfig mConfig;
26 
AidlHalAreaConfig(VehicleAreaConfig config)27     public AidlHalAreaConfig(VehicleAreaConfig config) {
28         mConfig = config;
29     }
30 
31     /**
32      * Get the area ID.
33      */
34     @Override
getAreaId()35     public int getAreaId() {
36         return mConfig.areaId;
37     }
38 
39     /**
40      * Get the min int value.
41      */
42     @Override
getMinInt32Value()43     public int getMinInt32Value() {
44         return mConfig.minInt32Value;
45     }
46 
47     /**
48      * Get the max int value.
49      */
50     @Override
getMaxInt32Value()51     public int getMaxInt32Value() {
52         return mConfig.maxInt32Value;
53     }
54 
55     /**
56      * Get the min long value.
57      */
58     @Override
getMinInt64Value()59     public long getMinInt64Value() {
60         return mConfig.minInt64Value;
61     }
62 
63     /**
64      * Get the max long value.
65      */
66     @Override
getMaxInt64Value()67     public long getMaxInt64Value() {
68         return mConfig.maxInt64Value;
69     }
70 
71     /**
72      * Get the min float value.
73      */
74     @Override
getMinFloatValue()75     public float getMinFloatValue() {
76         return mConfig.minFloatValue;
77     }
78 
79     /**
80      * Get the max float value.
81      */
82     @Override
getMaxFloatValue()83     public float getMaxFloatValue() {
84         return mConfig.maxFloatValue;
85     }
86 }
87