EMBluetoothLowEnergyConnectionType Class Reference
Inherits from | NSObject |
Conforms to | CBCentralManagerDelegate CBPeripheralDelegate EMConnectionType |
Declared in | EMBluetoothLowEnergyConnectionType.h EMBluetoothLowEnergyConnectionType.m |
Overview
EMBluethoothLowEnergyConnectionType is a concrete EMConnectionType for Bluetooth Low Energy.
If you want the framework to interact with Bluetooth Low Energy devices, add an instance of this class to EMConnectionListManager via the -addConnectionTypeToUpdates: method.
Tasks
Other Methods
-
discoversAllEmmocoBLEDevices
By default, EMBluetoothLowEnergyConnectionType will ‘discover’ devices that have a schema hash matching a schema in your application bundle. Set this flag to ‘YES’ for an instance of this class to discover all Emmoco BLE devices. NOTE: Most applications should not have this enabled.
property
Other Methods
-
– setConnectionDelegate:
The delegate for connection communication
-
– isAvailable
YES if available on the current device, NO if unavailable.
-
– lastReadValue
The last read resource value from the device
-
– startUpdating
Tells the connection to start looking for devices of its type.
-
– stopUpdating
Tells the connection to stop looking for devices of its type.
-
– deviceType
The type of device - this can be set to anything and retreived for printing or examining.
-
– connectToDevice:connectionDelegate:
Establishes a connection with a device
-
– disconnect
disconnects the current device.
-
– fetch:
Fetches a resource. Can be retrieved in “lastReadValue”
-
– fetchSystemResource:
Fetches a system resource. Can be retrieved in “lastReadValue”.
-
– store:
writes a value to a device.
Extension Methods
-
connected
A boolean indicating whether or not there is a connection with a device.
property
Properties
connected
A boolean indicating whether or not there is a connection with a device.
@property (nonatomic, getter=isConnected) BOOL connected
Discussion
A boolean indicating whether or not there is a connection with a device.
Declared In
EMConnectionType.h
discoversAllEmmocoBLEDevices
By default, EMBluetoothLowEnergyConnectionType will ‘discover’ devices that have a schema hash matching a schema in your application bundle. Set this flag to ‘YES’ for an instance of this class to discover all Emmoco BLE devices. NOTE: Most applications should not have this enabled.
@property (nonatomic) BOOL discoversAllEmmocoBLEDevices
Discussion
By default, EMBluetoothLowEnergyConnectionType will ‘discover’ devices that have a schema hash matching a schema in your application bundle. Set this flag to ‘YES’ for an instance of this class to discover all Emmoco BLE devices. NOTE: Most applications should not have this enabled.
Declared In
EMBluetoothLowEnergyConnectionType.h
Instance Methods
connectToDevice:connectionDelegate:
Establishes a connection with a device
- (void)connectToDevice:(EMDeviceBasicDescription *)device connectionDelegate:(id<EMDeviceDelegate>)connDelegate
Discussion
Establishes a connection with a device
Declared In
EMConnectionType.h
deviceType
The type of device - this can be set to anything and retreived for printing or examining.
- (NSString *)deviceType
Discussion
The type of device - this can be set to anything and retreived for printing or examining.
Declared In
EMConnectionType.h
disconnect
disconnects the current device.
- (void)disconnect
Discussion
disconnects the current device.
Declared In
EMConnectionType.h
fetch:
Fetches a resource. Can be retrieved in “lastReadValue”
- (void)fetch:(EMResourceValue *)value
Discussion
Fetches a resource. Can be retrieved in “lastReadValue”
Declared In
EMConnectionType.h
fetchSystemResource:
Fetches a system resource. Can be retrieved in “lastReadValue”.
- (void)fetchSystemResource:(EMResourceValue *)value
Discussion
Fetches a system resource. Can be retrieved in “lastReadValue”.
Declared In
EMConnectionType.h
isAvailable
YES if available on the current device, NO if unavailable.
- (BOOL)isAvailable
Discussion
YES if available on the current device, NO if unavailable.
Declared In
EMConnectionType.h
lastReadValue
The last read resource value from the device
- (EMResourceValue *)lastReadValue
Discussion
The last read resource value from the device
Declared In
EMConnectionType.h
setConnectionDelegate:
The delegate for connection communication
- (void)setConnectionDelegate:(id<EMDeviceDelegate>)connectionDelegate
Discussion
The delegate for connection communication
Declared In
EMConnectionType.h
startUpdating
Tells the connection to start looking for devices of its type.
- (void)startUpdating
Discussion
Tells the connection to start looking for devices of its type.
Declared In
EMConnectionType.h