• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022, 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 #ifndef CPP_VHAL_CLIENT_INCLUDE_IHALPROPCONFIG_H_
18 #define CPP_VHAL_CLIENT_INCLUDE_IHALPROPCONFIG_H_
19 
20 #include <cstdint>
21 #include <vector>
22 
23 namespace android {
24 namespace frameworks {
25 namespace automotive {
26 namespace vhal {
27 
28 class IHalAreaConfig {
29 public:
30     virtual int32_t getAreaId() const = 0;
31 
32     virtual int32_t getMinInt32Value() const = 0;
33 
34     virtual int32_t getMaxInt32Value() const = 0;
35 
36     virtual int64_t getMinInt64Value() const = 0;
37 
38     virtual int64_t getMaxInt64Value() const = 0;
39 
40     virtual float getMinFloatValue() const = 0;
41 
42     virtual float getMaxFloatValue() const = 0;
43 
44     virtual ~IHalAreaConfig() = default;
45 };
46 
47 class IHalPropConfig {
48 public:
49     virtual int32_t getPropId() const = 0;
50 
51     virtual int32_t getAccess() const = 0;
52 
53     virtual int32_t getChangeMode() const = 0;
54 
55     virtual const IHalAreaConfig* getAreaConfigs() const = 0;
56 
57     virtual size_t getAreaConfigSize() const = 0;
58 
59     virtual std::vector<int32_t> getConfigArray() const = 0;
60 
61     virtual std::string getConfigString() const = 0;
62 
63     virtual float getMinSampleRate() const = 0;
64 
65     virtual float getMaxSampleRate() const = 0;
66 
67     virtual ~IHalPropConfig() = default;
68 };
69 
70 }  // namespace vhal
71 }  // namespace automotive
72 }  // namespace frameworks
73 }  // namespace android
74 
75 #endif  // CPP_VHAL_CLIENT_INCLUDE_IHALPROPCONFIG_H_
76