LEInputFormat Class Reference
Inherits from | NSObject |
Declared in | LEInputFormat.h |
Overview
This class represent a configuration of a Input (sensor). At any time a sensor can be in just one mode, and the details of this mode is captured by this class.
For senors types recognized by the SDK (like the tilt and motion sensor) you will not need to know about the details of this class as the implementation of these services in the SDK handles this for you.
If you need to access an Input that is not recognized by the SDK you will need to create and send an input format for the corresponding service. See the LEGenericService documentation for an example.
Tasks
Other Methods
-
+ inputFormatWithConnectID:typeID:mode:deltaInterval:unit:notificationsEnabled:
-
– inputFormatBySettingMode:
-
– inputFormatBySettingMode:unit:
-
– inputFormatBySettingDeltaInterval:
-
– inputFormatBySettingNotificationsEnabled:
Check for equality
-
– isEqualToFormat:
-
revision
property -
connectID
property -
typeID
property -
mode
property -
deltaInterval
property -
unit
property -
notificationsEnabled
property -
numberOfBytes
property
Properties
connectID
The connectID of the corresponding service, see [LEService connectInfo]
@property (nonatomic, readonly) uint8_t connectID
Discussion
The connectID of the corresponding service, see [LEService connectInfo]
Declared In
LEInputFormat.h
deltaInterval
The delta interval. When notifications are enabled the service will only receive updates if the value has change with ‘delta interval’ or more since last reading
@property (nonatomic, readonly) uint32_t deltaInterval
Discussion
The delta interval. When notifications are enabled the service will only receive updates if the value has change with ‘delta interval’ or more since last reading
Declared In
LEInputFormat.h
mode
The mode of the Input
@property (nonatomic, readonly) uint8_t mode
Discussion
The mode of the Input
Declared In
LEInputFormat.h
notificationsEnabled
YES if new values are send whenever the value of the Input changes beyond delta interval
@property (nonatomic, readonly, getter=isNotificationsEnabled) BOOL notificationsEnabled
Discussion
YES if new values are send whenever the value of the Input changes beyond delta interval
Declared In
LEInputFormat.h
numberOfBytes
The number of bytes to be expected in the Input data payload (set by the Device)
@property (nonatomic, readonly) uint8_t numberOfBytes
Discussion
The number of bytes to be expected in the Input data payload (set by the Device)
Declared In
LEInputFormat.h
revision
The revision of the Input Format (set by the Device). When a new Input Format is set for a service the Device will send the updated Input Format through the [LEServiceDelegate service:didUpdateInputFormatFrom:to]. The Device will assign a revision number to the new Input Format. The revision number is matched against the revision format when receiving values for the corresponding service.
@property (nonatomic, readonly) uint8_t revision
Discussion
The revision of the Input Format (set by the Device). When a new Input Format is set for a service the Device will send the updated Input Format through the [LEServiceDelegate service:didUpdateInputFormatFrom:to]. The Device will assign a revision number to the new Input Format. The revision number is matched against the revision format when receiving values for the corresponding service.
Declared In
LEInputFormat.h
typeID
The typeID of the corresponding service, see [LEService connectInfo]
@property (nonatomic, readonly) uint8_t typeID
Discussion
The typeID of the corresponding service, see [LEService connectInfo]
Declared In
LEInputFormat.h
Class Methods
inputFormatWithConnectID:typeID:mode:deltaInterval:unit:notificationsEnabled:
Create a new instance of an LEInputFormat.
+ (instancetype)inputFormatWithConnectID:(uint8_t)connectID typeID:(uint8_t)typeID mode:(uint8_t)mode deltaInterval:(uint32_t)deltaInterval unit:(LEInputFormatUnit)unit notificationsEnabled:(BOOL)notificationsEnabled
Parameters
- connectID
The connectID of the service, see [LEService connectInfo].
- typeID
The type of the IO, see [LEService connectInfo].
- mode
The mode of the IO (Inputs/Senors may support a number of different modes)
- deltaInterval
The delta interval
- unit
The unit the sensor should return values in
- notificationsEnabled
YES if the device should send updates when the value changes.
Discussion
Create a new instance of an LEInputFormat.
Declared In
LEInputFormat.h
Instance Methods
inputFormatBySettingDeltaInterval:
Creates a copy of this input format with a new delta interval
- (instancetype)inputFormatBySettingDeltaInterval:(uint32_t)interval
Parameters
- interval
The new delta interval
Discussion
Creates a copy of this input format with a new delta interval
Declared In
LEInputFormat.h
inputFormatBySettingMode:
Creates a copy of this input format with a new mode
- (instancetype)inputFormatBySettingMode:(uint8_t)mode
Parameters
- mode
The new mode
Discussion
Creates a copy of this input format with a new mode
Declared In
LEInputFormat.h
inputFormatBySettingMode:unit:
- (instancetype)inputFormatBySettingMode:(uint8_t)mode unit:(LEInputFormatUnit)unit
Declared In
LEInputFormat.h
inputFormatBySettingNotificationsEnabled:
Creates a copy of this input format with a new value for notifications enabled
- (instancetype)inputFormatBySettingNotificationsEnabled:(BOOL)enabled
Parameters
- enabled
YES if the sensor should send updates when the value changes
Discussion
Creates a copy of this input format with a new value for notifications enabled
Declared In
LEInputFormat.h