SMBluetoothDiscoverySensor Class Reference

Inherits from SMSensor : NSObject
Conforms to CBCentralManagerDelegate
Declared in SMBluetoothDiscoverySensor.h
SMBluetoothDiscoverySensor.m

Overview

A sensor for discovering nearby bluetooth devices

Other Methods

– initWithSenseCallback:timeInterval:

Initialises the bluetooth sensor with specified callback and repeat time interval

- (id)initWithSenseCallback:(SenseCallback)callback timeInterval:(NSTimeInterval)secs

Parameters

callback

callback for data

secs

seconds between sensing

Return Value

Bluetooth sensor

Discussion

Initialises the bluetooth sensor with specified callback and repeat time interval

Declared In

SMBluetoothDiscoverySensor.h

Other Methods

+ isAvailable

Checks whether the sensor is available at runtime

+ (BOOL)isAvailable

Return Value

Sensor available

Discussion

Checks whether the sensor is available at runtime

Declared In

SMSensor.h

– initWithSenseCallback:

Initialises an SMSensor with specified callback.

- (id)initWithSenseCallback:(SenseCallback)callback

Parameters

callback

Callback to send the data to

Return Value

SMSensor Instance

Discussion

Initialises an SMSensor with specified callback.

Note: This class can not be instantiated from outside this library. Use the relevant subclasses for a particular sensor

Declared In

SMSensor.h

– sense

Requests data to be sent from the sensor to the callback as soon as it’s available

- (void)sense

Discussion

Requests data to be sent from the sensor to the callback as soon as it’s available

Declared In

SMSensor.h

Extension Methods

  bluetoothManager

Bluetooth manager to gather data from

@property (nonatomic, retain) CBCentralManager *bluetoothManager

Discussion

Bluetooth manager to gather data from

Declared In

SMBluetoothDiscoverySensor.m

  devicesSinceSense

List of devices discovered since the last sense

@property (nonatomic, retain) NSMutableArray *devicesSinceSense

Discussion

List of devices discovered since the last sense

Declared In

SMBluetoothDiscoverySensor.m

  timer

Timer for repeat sensing

@property (nonatomic, retain) NSTimer *timer

Discussion

Timer for repeat sensing

Declared In

SMBluetoothDiscoverySensor.m