Pixels Plugin for Unity
Enable communications with Pixels dice using Bluetooth Low Energy.
|
A collection of Objective-C classes that provides a simplified access to Bluetooth Low Energy peripherals. More...
Classes | |
class | SGBleCentralManagerDelegate |
Implementation of CBCentralManagerDelegate protocol. Stores and notifies of discovered Bluetooth Low Energy (BLE) peripherals, also notifies of peripherals connection events and of the host device Bluetooth radio state changes. More... | |
class | SGBlePeripheralQueue |
Implementation of the CBPeripheralDelegate protocol. Queues up operations to be performed with a Bluetooth Low Energy (BLE) peripheral, run them sequentially and notify of their outcome. More... | |
class | SGBleRequest |
Internal type, represents a Bluetooth operation to be performed on a peripheral. Used by SGBlePeripheralQueue. More... | |
Typedefs | |
typedef NSError *_Nullable(^ | SGBleRequestExecuteHandler) () |
Internal type, runs the Bluetooth operation associated with a SGBleRequest object. | |
typedef void(^ | SGBleRequestCompletionHandler) (NSError *_Nullable error) |
Internal type, completion handler for operations associated with a SGBleRequest object. | |
typedef void(^ | SGBlePeripheralDiscoveryHandler) (CBPeripheral *_Nonnull peripheral, NSDictionary< NSString *, id > *_Nonnull advertisementData, NSNumber *_Nonnull rssi) |
Peripheral discovery handler. | |
typedef void(^ | SGBleConnectionEventHandler) (CBPeripheral *_Nonnull peripheral, SGBleConnectionEvent connectionEvent, NSError *_Nullable error) |
Peripheral connection event handler. | |
typedef void(^ | SGBleCharacteristicValueEventHandler) (SGBlePeripheralQueue *_Nonnull peripheralQueue, CBCharacteristic *_Nonnull characteristic, NSError *_Nullable error) |
Peripheral connection event handler. | |
A collection of Objective-C classes that provides a simplified access to Bluetooth Low Energy peripherals.
The Systemic Games Bluetooth Low Energy library for Apple devices provides classes for scanning for Bluetooth Low Energy (BLE) peripherals, connecting to and communicating with them. Those classes are based on the Apple's Core Bluetooth framework.
The SGBleCentralManagerDelegate class implements the Apple CBCentralManagerDelegate protocol. It stores and notifies of discovered BLE peripherals, also notifies of peripherals connection events and of the host device Bluetooth radio state changes.
The SGBlePeripheralQueue class implements the Apple CBPeripheralDelegate protocol. It queues BLE operations to be performed with a BLE peripheral, run them sequentially and notify of their outcome. The next request is run one the current one completes (whether successfully or not).
This library also includes a set of C functions to be called from Unity for acessing Bluetooth devices.
Below is a diagram of the main classes of this library:
anonymous enum |
Peripheral connection events.
anonymous enum |
Peripheral connection events reasons.
anonymous enum |
Error codes.