EMDeviceBasicDescription.h
1.98 KB
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
#import "EMSignalStrengthFilter.h"
@protocol EMConnectionType;
/**
* EMDeviceBasicDescription is a class used to describe basic device characteristics throughout the entire framework.
* All devices, regardless of connection type, will have these properties.
*
* All classes implementing the EMConnectionType protocol will receive and deliver device information in the form of an EMDeviceBasicDescription.
*/
@interface EMDeviceBasicDescription : NSObject
/**
* The name of the device used thoughout the framework.
* Like the unique_identifier, this property needs to be unique.
*/
@property (nonatomic, strong) NSString *name;
/**
* A concrete EMConnectionType instance that will be used to send messages to the device.
*/
@property (nonatomic, strong) id<EMConnectionType> connectionType;
/*
* An object that can describe the device to the provided connection type.
* For example, for bluetooth, this might be an instance of CBPeripheral.
*/
@property (nonatomic, strong) id deviceObject;
/**
* A value between -100 and 0 used to describe signal strength.
*/
@property (nonatomic) float signalStrength;
/**
* The signal strength filter for smoothing
*/
@property (nonatomic, strong) id<EMSignalStrengthFilter> signalStrengthFilter;
/**
Data that was discovered along with the device.
Ex: When dealing with bluetooth, this is the advertising packet data
*/
@property (nonatomic, strong) NSData *advertiseData;
/**
* An object taken from the advertise data based on the advertise resource in the device's schema
* Possible classes: NSString, NSNumber, NSDictionary, NSArray, NSData
*/
@property (nonatomic, strong) id advertiseObject;
/**
The first six characters of the device's schema
*/
@property (nonatomic, strong) NSString *shortSchemaHash;
/**
The name of the schema file in your bundle that relates to this device.
NOTE: Many devices do not broadcast this information. In this case, this property will not be set
*/
@property (nonatomic, strong) NSString *schemaFilePath;
@end