blob: f38e97d0d60b3948b9187709050727ca81d7c390 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
|
// SDLOnVehicleData.m
//
#import "SDLOnVehicleData.h"
#import "NSMutableDictionary+Store.h"
#import "SDLAirbagStatus.h"
#import "SDLBeltStatus.h"
#import "SDLBodyInformation.h"
#import "SDLClusterModeStatus.h"
#import "SDLDeviceStatus.h"
#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
#import "SDLFuelRange.h"
#import "SDLGPSData.h"
#import "SDLHeadLampStatus.h"
#import "SDLMyKey.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
#import "SDLTireStatus.h"
NS_ASSUME_NONNULL_BEGIN
@implementation SDLOnVehicleData
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
self = [super initWithName:SDLRPCFunctionNameOnVehicleData];
if (!self) {
return nil;
}
return self;
}
#pragma clang diagnostic pop
- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin prndl:(nullable SDLPRNDL)prndl tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering {
self = [self init];
if (!self) {
return nil;
}
self.gps = gps;
self.speed = @(speed);
self.rpm = rpm;
self.instantFuelConsumption = @(instantFuelConsumption);
self.fuelRange = fuelRange;
self.externalTemperature = @(externalTemperature);
self.turnSignal = turnSignal;
self.vin = vin;
self.prndl = prndl;
self.tirePressure = tirePressure;
self.odometer = odometer;
self.beltStatus = beltStatus;
self.bodyInformation = bodyInformation;
self.deviceStatus = deviceStatus;
self.driverBraking = driverBraking;
self.wiperStatus = wiperStatus;
self.headLampStatus = headLampStatus;
self.engineTorque = @(engineTorque);
self.accPedalPosition = @(accPedalPosition);
self.steeringWheelAngle = @(steeringWheelAngle);
self.engineOilLife = @(engineOilLife);
self.electronicParkBrakeStatus = electronicParkBrakeStatus;
self.cloudAppVehicleID = cloudAppVehicleID;
self.eCallInfo = eCallInfo;
self.airbagStatus = airbagStatus;
self.emergencyEvent = emergencyEvent;
self.clusterModeStatus = clusterModeStatus;
self.myKey = myKey;
self.handsOffSteering = handsOffSteering;
return self;
}
- (void)setGps:(nullable SDLGPSData *)gps {
[self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS];
}
- (nullable SDLGPSData *)gps {
return [self.parameters sdl_objectForName:SDLRPCParameterNameGPS ofClass:SDLGPSData.class error:nil];
}
- (void)setSpeed:(nullable NSNumber<SDLFloat> *)speed {
[self.parameters sdl_setObject:speed forName:SDLRPCParameterNameSpeed];
}
- (nullable NSNumber<SDLFloat> *)speed {
return [self.parameters sdl_objectForName:SDLRPCParameterNameSpeed ofClass:NSNumber.class error:nil];
}
- (void)setRpm:(nullable NSNumber<SDLInt> *)rpm {
[self.parameters sdl_setObject:rpm forName:SDLRPCParameterNameRPM];
}
- (nullable NSNumber<SDLInt> *)rpm {
return [self.parameters sdl_objectForName:SDLRPCParameterNameRPM ofClass:NSNumber.class error:nil];
}
- (void)setFuelLevel:(nullable NSNumber<SDLFloat> *)fuelLevel {
[self.parameters sdl_setObject:fuelLevel forName:SDLRPCParameterNameFuelLevel];
}
- (nullable NSNumber<SDLFloat> *)fuelLevel {
return [self.parameters sdl_objectForName:SDLRPCParameterNameFuelLevel ofClass:NSNumber.class error:nil];
}
- (void)setFuelLevel_State:(nullable SDLComponentVolumeStatus)fuelLevel_State {
[self.parameters sdl_setObject:fuelLevel_State forName:SDLRPCParameterNameFuelLevelState];
}
- (nullable SDLComponentVolumeStatus)fuelLevel_State {
return [self.parameters sdl_enumForName:SDLRPCParameterNameFuelLevelState error:nil];
}
- (void)setFuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange {
[self.parameters sdl_setObject:fuelRange forName:SDLRPCParameterNameFuelRange];
}
- (nullable NSArray<SDLFuelRange *> *)fuelRange {
return [self.parameters sdl_objectsForName:SDLRPCParameterNameFuelRange ofClass:SDLFuelRange.class error:nil];
}
- (void)setInstantFuelConsumption:(nullable NSNumber<SDLFloat> *)instantFuelConsumption {
[self.parameters sdl_setObject:instantFuelConsumption forName:SDLRPCParameterNameInstantFuelConsumption];
}
- (nullable NSNumber<SDLFloat> *)instantFuelConsumption {
return [self.parameters sdl_objectForName:SDLRPCParameterNameInstantFuelConsumption ofClass:NSNumber.class error:nil];
}
- (void)setExternalTemperature:(nullable NSNumber<SDLFloat> *)externalTemperature {
[self.parameters sdl_setObject:externalTemperature forName:SDLRPCParameterNameExternalTemperature];
}
- (nullable NSNumber<SDLFloat> *)externalTemperature {
return [self.parameters sdl_objectForName:SDLRPCParameterNameExternalTemperature ofClass:NSNumber.class error:nil];
}
- (void)setVin:(nullable NSString *)vin {
[self.parameters sdl_setObject:vin forName:SDLRPCParameterNameVIN];
}
- (nullable NSString *)vin {
return [self.parameters sdl_objectForName:SDLRPCParameterNameVIN ofClass:NSString.class error:nil];
}
- (void)setPrndl:(nullable SDLPRNDL)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
- (nullable SDLPRNDL)prndl {
return [self.parameters sdl_enumForName:SDLRPCParameterNamePRNDL error:nil];
}
- (void)setTirePressure:(nullable SDLTireStatus *)tirePressure {
[self.parameters sdl_setObject:tirePressure forName:SDLRPCParameterNameTirePressure];
}
- (nullable SDLTireStatus *)tirePressure {
return [self.parameters sdl_objectForName:SDLRPCParameterNameTirePressure ofClass:SDLTireStatus.class error:nil];
}
- (void)setOdometer:(nullable NSNumber<SDLInt> *)odometer {
[self.parameters sdl_setObject:odometer forName:SDLRPCParameterNameOdometer];
}
- (nullable NSNumber<SDLInt> *)odometer {
return [self.parameters sdl_objectForName:SDLRPCParameterNameOdometer ofClass:NSNumber.class error:nil];
}
- (void)setBeltStatus:(nullable SDLBeltStatus *)beltStatus {
[self.parameters sdl_setObject:beltStatus forName:SDLRPCParameterNameBeltStatus];
}
- (nullable SDLBeltStatus *)beltStatus {
return [self.parameters sdl_objectForName:SDLRPCParameterNameBeltStatus ofClass:SDLBeltStatus.class error:nil];
}
- (void)setBodyInformation:(nullable SDLBodyInformation *)bodyInformation {
[self.parameters sdl_setObject:bodyInformation forName:SDLRPCParameterNameBodyInformation];
}
- (nullable SDLBodyInformation *)bodyInformation {
return [self.parameters sdl_objectForName:SDLRPCParameterNameBodyInformation ofClass:SDLBodyInformation.class error:nil];
}
- (void)setDeviceStatus:(nullable SDLDeviceStatus *)deviceStatus {
[self.parameters sdl_setObject:deviceStatus forName:SDLRPCParameterNameDeviceStatus];
}
- (nullable SDLDeviceStatus *)deviceStatus {
return [self.parameters sdl_objectForName:SDLRPCParameterNameDeviceStatus ofClass:SDLDeviceStatus.class error:nil];
}
- (void)setDriverBraking:(nullable SDLVehicleDataEventStatus)driverBraking {
[self.parameters sdl_setObject:driverBraking forName:SDLRPCParameterNameDriverBraking];
}
- (nullable SDLVehicleDataEventStatus)driverBraking {
return [self.parameters sdl_enumForName:SDLRPCParameterNameDriverBraking error:nil];
}
- (void)setWiperStatus:(nullable SDLWiperStatus)wiperStatus {
[self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus];
}
- (nullable SDLWiperStatus)wiperStatus {
return [self.parameters sdl_enumForName:SDLRPCParameterNameWiperStatus error:nil];
}
- (void)setHeadLampStatus:(nullable SDLHeadLampStatus *)headLampStatus {
[self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus];
}
- (nullable SDLHeadLampStatus *)headLampStatus {
return [self.parameters sdl_objectForName:SDLRPCParameterNameHeadLampStatus ofClass:SDLHeadLampStatus.class error:nil];
}
- (void)setEngineOilLife:(nullable NSNumber<SDLFloat> *)engineOilLife {
[self.parameters sdl_setObject:engineOilLife forName:SDLRPCParameterNameEngineOilLife];
}
- (nullable NSNumber<SDLFloat> *)engineOilLife {
return [self.parameters sdl_objectForName:SDLRPCParameterNameEngineOilLife ofClass:NSNumber.class error:nil];
}
- (void)setEngineTorque:(nullable NSNumber<SDLFloat> *)engineTorque {
[self.parameters sdl_setObject:engineTorque forName:SDLRPCParameterNameEngineTorque];
}
- (nullable NSNumber<SDLFloat> *)engineTorque {
return [self.parameters sdl_objectForName:SDLRPCParameterNameEngineTorque ofClass:NSNumber.class error:nil];
}
- (void)setAccPedalPosition:(nullable NSNumber<SDLFloat> *)accPedalPosition {
[self.parameters sdl_setObject:accPedalPosition forName:SDLRPCParameterNameAccelerationPedalPosition];
}
- (nullable NSNumber<SDLFloat> *)accPedalPosition {
return [self.parameters sdl_objectForName:SDLRPCParameterNameAccelerationPedalPosition ofClass:NSNumber.class error:nil];
}
- (void)setSteeringWheelAngle:(nullable NSNumber<SDLFloat> *)steeringWheelAngle {
[self.parameters sdl_setObject:steeringWheelAngle forName:SDLRPCParameterNameSteeringWheelAngle];
}
- (nullable NSNumber<SDLFloat> *)steeringWheelAngle {
return [self.parameters sdl_objectForName:SDLRPCParameterNameSteeringWheelAngle ofClass:NSNumber.class error:nil];
}
- (void)setECallInfo:(nullable SDLECallInfo *)eCallInfo {
[self.parameters sdl_setObject:eCallInfo forName:SDLRPCParameterNameECallInfo];
}
- (nullable SDLECallInfo *)eCallInfo {
return [self.parameters sdl_objectForName:SDLRPCParameterNameECallInfo ofClass:SDLECallInfo.class error:nil];
}
- (void)setAirbagStatus:(nullable SDLAirbagStatus *)airbagStatus {
[self.parameters sdl_setObject:airbagStatus forName:SDLRPCParameterNameAirbagStatus];
}
- (nullable SDLAirbagStatus *)airbagStatus {
return [self.parameters sdl_objectForName:SDLRPCParameterNameAirbagStatus ofClass:SDLAirbagStatus.class error:nil];
}
- (void)setEmergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent {
[self.parameters sdl_setObject:emergencyEvent forName:SDLRPCParameterNameEmergencyEvent];
}
- (nullable SDLEmergencyEvent *)emergencyEvent {
return [self.parameters sdl_objectForName:SDLRPCParameterNameEmergencyEvent ofClass:SDLEmergencyEvent.class error:nil];
}
- (void)setClusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus {
[self.parameters sdl_setObject:clusterModeStatus forName:SDLRPCParameterNameClusterModeStatus];
}
- (nullable SDLClusterModeStatus *)clusterModeStatus {
return [self.parameters sdl_objectForName:SDLRPCParameterNameClusterModeStatus ofClass:SDLClusterModeStatus.class error:nil];
}
- (void)setMyKey:(nullable SDLMyKey *)myKey {
[self.parameters sdl_setObject:myKey forName:SDLRPCParameterNameMyKey];
}
- (nullable SDLMyKey *)myKey {
return [self.parameters sdl_objectForName:SDLRPCParameterNameMyKey ofClass:SDLMyKey.class error:nil];
}
- (void)setElectronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus {
[self.parameters sdl_setObject:electronicParkBrakeStatus forName:SDLRPCParameterNameElectronicParkBrakeStatus];
}
- (nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus {
return [self.parameters sdl_enumForName:SDLRPCParameterNameElectronicParkBrakeStatus error:nil];
}
- (void)setTurnSignal:(nullable SDLTurnSignal)turnSignal {
[self.parameters sdl_setObject:turnSignal forName:SDLRPCParameterNameTurnSignal];
}
- (nullable SDLTurnSignal)turnSignal {
return [self.parameters sdl_enumForName:SDLRPCParameterNameTurnSignal error:nil];
}
- (void)setCloudAppVehicleID:(nullable NSString *)cloudAppVehicleID {
[self.parameters sdl_setObject:cloudAppVehicleID forName:SDLRPCParameterNameCloudAppVehicleID];
}
- (nullable NSString *)cloudAppVehicleID {
return [self.parameters sdl_objectForName:SDLRPCParameterNameCloudAppVehicleID ofClass:NSString.class error:nil];
}
- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(NSObject *)vehicleDataState {
[self.parameters sdl_setObject:vehicleDataState forName:vehicleDataName];
}
- (nullable NSObject *)getOEMCustomVehicleData:(NSString *)vehicleDataName {
return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSObject.class error:nil];
}
- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering {
[self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
}
- (nullable NSNumber<SDLBool> *)handsOffSteering {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error];
}
@end
NS_ASSUME_NONNULL_END
|