keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 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 CAR_VEHICLE_NETWORK_SERVICE_H_ |
| 18 | #define CAR_VEHICLE_NETWORK_SERVICE_H_ |
| 19 | |
| 20 | #include <stdint.h> |
| 21 | #include <sys/types.h> |
| 22 | |
| 23 | #include <memory> |
| 24 | |
| 25 | #include <hardware/hardware.h> |
| 26 | #include <hardware/vehicle.h> |
| 27 | |
| 28 | #include <binder/BinderService.h> |
| 29 | #include <binder/IBinder.h> |
| 30 | #include <binder/IPCThreadState.h> |
| 31 | #include <cutils/compiler.h> |
| 32 | #include <utils/threads.h> |
| 33 | #include <utils/KeyedVector.h> |
| 34 | #include <utils/List.h> |
| 35 | #include <utils/RefBase.h> |
| 36 | #include <utils/SortedVector.h> |
| 37 | #include <utils/StrongPointer.h> |
| 38 | #include <utils/TypeHelpers.h> |
| 39 | |
| 40 | #include <IVehicleNetwork.h> |
| 41 | #include <IVehicleNetworkListener.h> |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 42 | #include <HandlerThread.h> |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 43 | |
| 44 | |
| 45 | namespace android { |
| 46 | |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 47 | // ---------------------------------------------------------------------------- |
| 48 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 49 | class VehicleNetworkService; |
| 50 | |
| 51 | /** |
| 52 | * MessageHandler to dispatch HAL callbacks to pre-defined handler thread context. |
| 53 | * Init / release is handled in the handler thread to allow upper layer to allocate resource |
| 54 | * for the thread. |
| 55 | */ |
| 56 | class VehicleHalMessageHandler : public MessageHandler { |
| 57 | enum { |
keunyoung | e4c90c4 | 2015-11-16 18:42:52 -0800 | [diff] [blame] | 58 | HAL_EVENT = 0, |
| 59 | HAL_ERROR = 1, |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 60 | }; |
| 61 | |
| 62 | /** |
| 63 | * For dispatching HAL event in batch. Hal events coming in this time frame will be batched |
| 64 | * together. |
| 65 | */ |
| 66 | static const int DISPATCH_INTERVAL_MS = 16; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 67 | static const int NUM_PROPERTY_EVENT_LISTS = 2; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 68 | public: |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 69 | // not passing VNS as sp as this is held by VNS always. |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 70 | VehicleHalMessageHandler(const sp<Looper>& mLooper, VehicleNetworkService& service); |
| 71 | virtual ~VehicleHalMessageHandler(); |
| 72 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 73 | void handleHalEvent(vehicle_prop_value_t *eventData); |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 74 | void handleHalError(VehicleHalError* error); |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 75 | void handleMockStart(); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 76 | |
| 77 | private: |
| 78 | void handleMessage(const Message& message); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 79 | void doHandleHalEvent(); |
| 80 | void doHandleHalError(); |
| 81 | |
| 82 | private: |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 83 | mutable Mutex mLock; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 84 | const sp<Looper> mLooper; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 85 | VehicleNetworkService& mService; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 86 | int mFreeListIndex; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 87 | List<vehicle_prop_value_t*> mHalPropertyList[NUM_PROPERTY_EVENT_LISTS]; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 88 | int64_t mLastDispatchTime; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 89 | List<VehicleHalError*> mHalErrors; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 90 | }; |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 91 | // ---------------------------------------------------------------------------- |
| 92 | class SubscriptionInfo { |
| 93 | public: |
| 94 | float sampleRate; |
| 95 | int32_t zones; |
| 96 | SubscriptionInfo() |
| 97 | : sampleRate(0), |
| 98 | zones(0) {}; |
| 99 | SubscriptionInfo(float aSampleRate, int32_t aZones) |
| 100 | : sampleRate(aSampleRate), |
| 101 | zones(aZones) {}; |
| 102 | SubscriptionInfo(const SubscriptionInfo& info) |
| 103 | : sampleRate(info.sampleRate), |
| 104 | zones(info.zones) {}; |
| 105 | }; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 106 | |
| 107 | // ---------------------------------------------------------------------------- |
| 108 | |
| 109 | class HalClient : public virtual RefBase { |
| 110 | public: |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 111 | HalClient(const sp<IVehicleNetworkListener> &listener, pid_t pid, uid_t uid) : |
| 112 | mListener(listener), |
| 113 | mPid(pid), |
| 114 | mUid(uid), |
| 115 | mMonitoringHalRestart(false), |
| 116 | mMonitoringHalError(false) { |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | ~HalClient() { |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 120 | mSubscriptionInfos.clear(); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | pid_t getPid() { |
| 124 | return mPid; |
| 125 | } |
| 126 | |
| 127 | uid_t getUid() { |
| 128 | return mUid; |
| 129 | } |
| 130 | |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 131 | SubscriptionInfo* getSubscriptionInfo(int32_t property) { |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 132 | Mutex::Autolock autoLock(mLock); |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 133 | ssize_t index = mSubscriptionInfos.indexOfKey(property); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 134 | if (index < 0) { |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 135 | return NULL; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 136 | } |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 137 | return &mSubscriptionInfos.editValueAt(index); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 138 | } |
| 139 | |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 140 | void setSubscriptionInfo(int32_t property, float sampleRate, int32_t zones) { |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 141 | Mutex::Autolock autoLock(mLock); |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 142 | SubscriptionInfo info(sampleRate, zones); |
| 143 | mSubscriptionInfos.add(property, info); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | bool removePropertyAndCheckIfActive(int32_t property) { |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 147 | Mutex::Autolock autoLock(mLock); |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 148 | mSubscriptionInfos.removeItem(property); |
| 149 | return mSubscriptionInfos.size() > 0 || mMonitoringHalRestart || mMonitoringHalError; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | void removeAllProperties() { |
| 153 | Mutex::Autolock autoLock(mLock); |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 154 | mSubscriptionInfos.clear(); |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | bool isActive() { |
| 158 | Mutex::Autolock autoLock(mLock); |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 159 | return mSubscriptionInfos.size() > 0 || mMonitoringHalRestart || mMonitoringHalError; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | void setHalRestartMonitoringState(bool state) { |
| 163 | Mutex::Autolock autoLock(mLock); |
| 164 | mMonitoringHalRestart = state; |
| 165 | } |
| 166 | |
| 167 | bool isMonitoringHalRestart() { |
| 168 | Mutex::Autolock autoLock(mLock); |
| 169 | return mMonitoringHalRestart; |
| 170 | } |
| 171 | |
| 172 | void setHalErrorMonitoringState(bool state) { |
| 173 | Mutex::Autolock autoLock(mLock); |
| 174 | mMonitoringHalError = state; |
| 175 | } |
| 176 | |
| 177 | bool isMonitoringHalError() { |
| 178 | Mutex::Autolock autoLock(mLock); |
| 179 | return mMonitoringHalError; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | const sp<IVehicleNetworkListener>& getListener() { |
| 183 | return mListener; |
| 184 | } |
| 185 | |
| 186 | const sp<IBinder> getListenerAsBinder() { |
| 187 | return IInterface::asBinder(mListener); |
| 188 | } |
| 189 | |
| 190 | // no lock here as this should be called only from single event looper thread |
| 191 | void addEvent(vehicle_prop_value_t* event) { |
| 192 | mEvents.push_back(event); |
| 193 | } |
| 194 | |
| 195 | // no lock here as this should be called only from single event looper thread |
| 196 | void clearEvents() { |
| 197 | mEvents.clear(); |
| 198 | } |
| 199 | |
| 200 | // no lock here as this should be called only from single event looper thread |
| 201 | List<vehicle_prop_value_t*>& getEventList() { |
| 202 | return mEvents; |
| 203 | } |
| 204 | |
| 205 | // no lock here as this should be called only from single event looper thread |
| 206 | status_t dispatchEvents(){ |
| 207 | ALOGV("dispatchEvents, num Events:%d", mEvents.size()); |
| 208 | sp<VehiclePropValueListHolder> events(new VehiclePropValueListHolder(&mEvents, |
| 209 | false /*deleteInDestructor */)); |
| 210 | ASSERT_OR_HANDLE_NO_MEMORY(events.get(), return NO_MEMORY); |
| 211 | mListener->onEvents(events); |
| 212 | mEvents.clear(); |
| 213 | return NO_ERROR; |
| 214 | } |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 215 | |
| 216 | void dispatchHalError(int32_t errorCode, int32_t property, int32_t operation) { |
| 217 | mListener->onHalError(errorCode, property, operation); |
| 218 | } |
| 219 | |
| 220 | void dispatchHalRestart(bool inMocking) { |
| 221 | mListener->onHalRestart(inMocking); |
| 222 | } |
| 223 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 224 | private: |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 225 | mutable Mutex mLock; |
| 226 | const sp<IVehicleNetworkListener> mListener; |
| 227 | const pid_t mPid; |
| 228 | const uid_t mUid; |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 229 | KeyedVector<int32_t, SubscriptionInfo> mSubscriptionInfos; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 230 | List<vehicle_prop_value_t*> mEvents; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 231 | bool mMonitoringHalRestart; |
| 232 | bool mMonitoringHalError; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 233 | }; |
| 234 | |
| 235 | class HalClientSpVector : public SortedVector<sp<HalClient> >, public RefBase { |
| 236 | protected: |
| 237 | virtual int do_compare(const void* lhs, const void* rhs) const { |
| 238 | sp<HalClient>& lh = * (sp<HalClient> * )(lhs); |
| 239 | sp<HalClient>& rh = * (sp<HalClient> * )(rhs); |
| 240 | return compare_type(lh.get(), rh.get()); |
| 241 | } |
| 242 | }; |
| 243 | |
| 244 | // ---------------------------------------------------------------------------- |
| 245 | |
keunyoung | d32f4e6 | 2015-09-21 11:33:06 -0700 | [diff] [blame] | 246 | /** |
| 247 | * Keeps cached value of property values. |
| 248 | * For internal property, static property, and on_change property, caching makes sense. |
| 249 | */ |
| 250 | class PropertyValueCache { |
| 251 | public: |
| 252 | PropertyValueCache(); |
| 253 | virtual ~PropertyValueCache(); |
| 254 | void writeToCache(const vehicle_prop_value_t& value); |
| 255 | bool readFromCache(vehicle_prop_value_t* value); |
| 256 | |
| 257 | private: |
| 258 | KeyedVector<int32_t, vehicle_prop_value_t*> mCache; |
| 259 | }; |
| 260 | |
| 261 | // ---------------------------------------------------------------------------- |
| 262 | |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 263 | class MockDeathHandler: public IBinder::DeathRecipient { |
| 264 | public: |
| 265 | MockDeathHandler(VehicleNetworkService& vns) : |
| 266 | mService(vns) {}; |
| 267 | |
| 268 | virtual void binderDied(const wp<IBinder>& who); |
| 269 | |
| 270 | private: |
| 271 | VehicleNetworkService& mService; |
| 272 | }; |
| 273 | |
| 274 | // ---------------------------------------------------------------------------- |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 275 | class VehicleNetworkService : |
| 276 | public BinderService<VehicleNetworkService>, |
| 277 | public BnVehicleNetwork, |
| 278 | public IBinder::DeathRecipient { |
| 279 | public: |
| 280 | static const char* getServiceName() ANDROID_API { return IVehicleNetwork::SERVICE_NAME; }; |
| 281 | |
| 282 | VehicleNetworkService(); |
| 283 | ~VehicleNetworkService(); |
| 284 | virtual status_t dump(int fd, const Vector<String16>& args); |
| 285 | void release(); |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 286 | status_t onHalEvent(const vehicle_prop_value_t *eventData, bool isInjection = false); |
| 287 | status_t onHalError(int32_t errorCode, int32_t property, int32_t operation, |
| 288 | bool isInjection = false); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 289 | /** |
| 290 | * Called by VehicleHalMessageHandler for batching events |
| 291 | */ |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 292 | void dispatchHalEvents(List<vehicle_prop_value_t*>& events); |
| 293 | void dispatchHalError(VehicleHalError* error); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 294 | virtual sp<VehiclePropertiesHolder> listProperties(int32_t property = 0); |
| 295 | virtual status_t setProperty(const vehicle_prop_value_t& value); |
| 296 | virtual status_t getProperty(vehicle_prop_value_t* value); |
| 297 | virtual status_t subscribe(const sp<IVehicleNetworkListener> &listener, int32_t property, |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 298 | float sampleRate, int32_t zones); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 299 | virtual void unsubscribe(const sp<IVehicleNetworkListener> &listener, int32_t property); |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 300 | virtual status_t injectEvent(const vehicle_prop_value_t& value); |
| 301 | virtual status_t startMocking(const sp<IVehicleNetworkHalMock>& mock); |
| 302 | virtual void stopMocking(const sp<IVehicleNetworkHalMock>& mock); |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 303 | virtual status_t injectHalError(int32_t errorCode, int32_t property, int32_t operation); |
| 304 | virtual status_t startErrorListening(const sp<IVehicleNetworkListener> &listener); |
| 305 | virtual void stopErrorListening(const sp<IVehicleNetworkListener> &listener); |
| 306 | virtual status_t startHalRestartMonitoring(const sp<IVehicleNetworkListener> &listener); |
| 307 | virtual void stopHalRestartMonitoring(const sp<IVehicleNetworkListener> &listener); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 308 | virtual void binderDied(const wp<IBinder>& who); |
keunyoung | d32f4e6 | 2015-09-21 11:33:06 -0700 | [diff] [blame] | 309 | bool isPropertySubsribed(int32_t property); |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 310 | |
| 311 | void handleHalMockDeath(const wp<IBinder>& who); |
Keun-young Park | 737cdfb | 2016-02-12 15:11:39 -0800 | [diff] [blame] | 312 | protected: |
| 313 | virtual bool isOperationAllowed(int32_t property, bool isWrite); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 314 | private: |
| 315 | // RefBase |
| 316 | virtual void onFirstRef(); |
| 317 | status_t loadHal(); |
| 318 | void closeHal(); |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 319 | vehicle_prop_config_t const * findConfigLocked(int32_t property); |
| 320 | bool isGettableLocked(int32_t property); |
keunyoung | 38ba530 | 2015-10-14 13:50:21 -0700 | [diff] [blame] | 321 | bool isSettableLocked(int32_t property, int32_t valueType); |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 322 | bool isSubscribableLocked(int32_t property); |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 323 | static bool isZonedProperty(vehicle_prop_config_t const * config); |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 324 | sp<HalClient> findClientLocked(sp<IBinder>& ibinder); |
| 325 | sp<HalClient> findOrCreateClientLocked(sp<IBinder>& ibinder, |
| 326 | const sp<IVehicleNetworkListener> &listener); |
| 327 | sp<HalClientSpVector> findClientsVectorForPropertyLocked(int32_t property); |
| 328 | sp<HalClientSpVector> findOrCreateClientsVectorForPropertyLocked(int32_t property); |
| 329 | bool removePropertyFromClientLocked(sp<IBinder>& ibinder, sp<HalClient>& client, |
| 330 | int32_t property); |
| 331 | void handleHalRestartAndGetClientsToDispatchLocked(List<sp<HalClient> >& clientsToDispatch); |
| 332 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 333 | static int eventCallback(const vehicle_prop_value_t *eventData); |
keunyoung | 38ba530 | 2015-10-14 13:50:21 -0700 | [diff] [blame] | 334 | static int errorCallback(int32_t errorCode, int32_t property, int32_t operation); |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 335 | private: |
| 336 | static VehicleNetworkService* sInstance; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 337 | sp<HandlerThread> mHandlerThread; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 338 | sp<VehicleHalMessageHandler> mHandler; |
| 339 | mutable Mutex mLock; |
| 340 | vehicle_module_t* mModule; |
| 341 | vehicle_hw_device_t* mDevice; |
| 342 | sp<VehiclePropertiesHolder> mProperties; |
| 343 | KeyedVector<sp<IBinder>, sp<HalClient> > mBinderToClientMap; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 344 | // client subscribing properties |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 345 | KeyedVector<int32_t, sp<HalClientSpVector> > mPropertyToClientsMap; |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 346 | KeyedVector<int32_t, SubscriptionInfo> mSubscriptionInfos; |
keunyoung | e4c90c4 | 2015-11-16 18:42:52 -0800 | [diff] [blame] | 347 | KeyedVector<int32_t, int> mEventsCount; |
keunyoung | d32f4e6 | 2015-09-21 11:33:06 -0700 | [diff] [blame] | 348 | PropertyValueCache mCache; |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 349 | bool mMockingEnabled; |
| 350 | sp<IVehicleNetworkHalMock> mHalMock; |
| 351 | sp<VehiclePropertiesHolder> mPropertiesForMocking; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 352 | sp<MockDeathHandler> mHalMockDeathHandler; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 353 | }; |
| 354 | |
| 355 | }; |
| 356 | |
| 357 | #endif /* CAR_VEHICLE_NETWORK_SERVICE_H_ */ |