summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLReadDID.m
blob: fed18baaad33c36beea433b1154ec37a58e28df6 (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
//  SDLReadDID.m
//


#import "SDLReadDID.h"

#import "SDLNames.h"

@implementation SDLReadDID

- (instancetype)init {
    if (self = [super initWithName:SDLNameReadDID]) {
    }
    return self;
}

- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
    if (self = [super initWithDictionary:dict]) {
    }
    return self;
}

- (void)setEcuName:(NSNumber *)ecuName {
    if (ecuName != nil) {
        [parameters setObject:ecuName forKey:SDLNameECUName];
    } else {
        [parameters removeObjectForKey:SDLNameECUName];
    }
}

- (NSNumber *)ecuName {
    return [parameters objectForKey:SDLNameECUName];
}

- (void)setDidLocation:(NSMutableArray *)didLocation {
    if (didLocation != nil) {
        [parameters setObject:didLocation forKey:SDLNameDIDLocation];
    } else {
        [parameters removeObjectForKey:SDLNameDIDLocation];
    }
}

- (NSMutableArray *)didLocation {
    return [parameters objectForKey:SDLNameDIDLocation];
}

@end