• 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_IHALPROPVALUE_H_
18 #define CPP_VHAL_CLIENT_INCLUDE_IHALPROPVALUE_H_
19 
20 #include <aidl/android/hardware/automotive/vehicle/VehiclePropValue.h>
21 #include <android/hardware/automotive/vehicle/2.0/IVehicle.h>
22 
23 #include <cstdint>
24 #include <vector>
25 
26 namespace android {
27 namespace frameworks {
28 namespace automotive {
29 namespace vhal {
30 
31 class IHalPropValue {
32 public:
33     virtual int32_t getPropId() const = 0;
34 
35     virtual int32_t getAreaId() const = 0;
36 
37     virtual int64_t getTimestamp() const = 0;
38 
39     virtual void setInt32Values(const std::vector<int32_t>& values) = 0;
40 
41     virtual std::vector<int32_t> getInt32Values() const = 0;
42 
43     virtual void setInt64Values(const std::vector<int64_t>& values) = 0;
44 
45     virtual std::vector<int64_t> getInt64Values() const = 0;
46 
47     virtual void setFloatValues(const std::vector<float>& values) = 0;
48 
49     virtual std::vector<float> getFloatValues() const = 0;
50 
51     virtual void setByteValues(const std::vector<uint8_t>& values) = 0;
52 
53     virtual std::vector<uint8_t> getByteValues() const = 0;
54 
55     virtual void setStringValue(const std::string& value) = 0;
56 
57     virtual std::string getStringValue() const = 0;
58 
59     virtual const void* toVehiclePropValue() const = 0;
60 
61     virtual ~IHalPropValue() = default;
62 };
63 
64 }  // namespace vhal
65 }  // namespace automotive
66 }  // namespace frameworks
67 }  // namespace android
68 
69 #endif  // CPP_VHAL_CLIENT_INCLUDE_IHALPROPVALUE_H_
70