AmazonFreeRTOSManager

public class AmazonFreeRTOSManager : NSObject
extension AmazonFreeRTOSManager: CBCentralManagerDelegate
extension AmazonFreeRTOSManager: CBPeripheralDelegate

FreeRTOS manager.

  • Shared instence of FreeRTOS manager.

    Declaration

    Swift

    public static let shared: AmazonFreeRTOSManager
  • Enable debug messages.

    Declaration

    Swift

    public var isDebug: Bool
  • Debug messages.

    Declaration

    Swift

    public var debugMessages: String
  • Service UUIDs in the advertising packets.

    Declaration

    Swift

    public var advertisingServiceUUIDs: [CBUUID]
  • The FreeRTOS devices using peripheral identifier as key.

    Declaration

    Swift

    public var devices: [UUID : AmazonFreeRTOSDevice]
  • BLE Central Manager of the FreeRTOS manager.

    Declaration

    Swift

    public var central: CBCentralManager?
  • Initializes a new FreeRTOS manager.

    Declaration

    Swift

    public override init()

    Return Value

    A new FreeRTOS manager.

  • Start scan for FreeRTOS devices.

    Precondition

    central is ready and not scanning.

    Declaration

    Swift

    public func startScanForDevices()
  • Stop scan for FreeRTOS devices.

    Precondition

    central is ready and is scanning.

    Declaration

    Swift

    public func stopScanForDevices()
  • Disconnect. Clear all contexts. Scan for FreeRTOS devices.

    Declaration

    Swift

    public func rescanForDevices()
  • CBCentralManagerDelegate

    Declaration

    Swift

    public func centralManagerDidUpdateState(_ central: CBCentralManager)
  • CBCentralManagerDelegate

    Declaration

    Swift

    public func centralManager(_: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber)
  • CBCentralManagerDelegate

    Declaration

    Swift

    public func centralManager(_: CBCentralManager, didConnect peripheral: CBPeripheral)
  • CBCentralManagerDelegate

    Declaration

    Swift

    public func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?)
  • CBCentralManagerDelegate

    Declaration

    Swift

    public func centralManager(_: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?)
  • CBPeripheralDelegate

    Declaration

    Swift

    public func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?)
  • CBPeripheralDelegate

    Declaration

    Swift

    public func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?)
  • CBPeripheralDelegate

    Declaration

    Swift

    public func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?)
  • CBPeripheralDelegate

    Declaration

    Swift

    public func peripheral(_ peripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?)
  • Process data of AfrVersion characteristic from peripheral.

    Declaration

    Swift

    public func didUpdateValueForAfrVersion(peripheral: CBPeripheral, characteristic: CBCharacteristic)

    Parameters

    peripheral

    The FreeRTOS peripheral.

    characteristic

    The AfrVersion characteristic.

  • Process data of BrokerEndpoint characteristic from peripheral.

    Declaration

    Swift

    public func didUpdateValueForBrokerEndpoint(peripheral: CBPeripheral, characteristic: CBCharacteristic)

    Parameters

    peripheral

    The FreeRTOS peripheral.

    characteristic

    The BrokerEndpoint characteristic.

  • Process data of Mtu characteristic from peripheral. It will also triger on mtu value change.

    Declaration

    Swift

    public func didUpdateValueForMtu(peripheral: CBPeripheral, characteristic: CBCharacteristic)

    Parameters

    peripheral

    The FreeRTOS peripheral.

    characteristic

    The Mtu characteristic.

  • Process data of AfrPlatform characteristic from peripheral.

    Declaration

    Swift

    public func didUpdateValueForAfrPlatform(peripheral: CBPeripheral, characteristic: CBCharacteristic)

    Parameters

    peripheral

    The FreeRTOS peripheral.

    characteristic

    The AfrPlatform characteristic.

  • Process data of AfrDevId characteristic from peripheral.

    Declaration

    Swift

    public func didUpdateValueForAfrDevId(peripheral: CBPeripheral, characteristic: CBCharacteristic)

    Parameters

    peripheral

    The FreeRTOS peripheral.

    characteristic

    The AfrDevId characteristic.