Simple C

C code posted
created at 08 Aug 04:59, updated at 10 Aug 19:45

Edit | Back
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
//
//  JCanLiebherr.m
//
//  Created by Bailey Yu on 2012-07-31.
//  Copyright (c) 2012 Leica GeoSystems. All rights reserved.
//

#include <JMineOPS/JMineOPS.h>
#include <JCan/JCan.h>

@interface JCanLiebherr : CanInterface {
}
@end

@implementation JCanLiebherr
- (id)initWithProperties:(NSDictionary *)aProps {
    [super initWithProperties:aProps];
    canMask = 0;
    return self;
}

- (void)start {
    [super start];
    [super propAlarmTimeout:10];
}

- (void)receiveData:(NSData *)aData
           forCanId:(u_int)aCanId {
    [JAMS log:@"lieb" format:@"receive(0x%x), data: %@", aCanId, aData];
    NSArray *sensors = [self sensorsForIdentity:[NSNumber numberWithInt:aCanId]];
    [self updateSensors:sensors withPacket:aData];
}
@end
779 Bytes in 2 ms with coderay