CGA_BlueThoth_Delegate

public protocol CGA_BlueThoth_Delegate : AnyObject

All delegate callbacks are made in the main thread. This is the only delegate for the BlueThoth framework. All events in the system come to this one place.

  • handleError(_:from:) Default implementation

    OPTIONAL: This is called to tell the instance to do whatever it needs to do to handle an error.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func handleError(_ error: CGA_Errors, from: RVS_BlueThoth)

    Parameters

    error

    The error to be handled.

  • updateFrom(_:) Default implementation

    OPTIONAL: This is called to tell the instance to do whatever it needs to do to update its data. NOTE: There may be no changes, or many changes. What has changed is not specified.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func updateFrom(_ centralManager: RVS_BlueThoth)

    Parameters

    centralManager

    The central manager that is calling this.

  • centralManagerPoweredOn(_:) Default implementation

    OPTIONAL: This is called to tell the instance that the state of the Central manager just became “powered on.”

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManagerPoweredOn(_ centralManager: RVS_BlueThoth)

    Parameters

    centralManager

    The central manager that is calling this.

  • OPTIONAL: This is called to tell the instance that a Peripheral device has been connected.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, didConnectThisDevice: CGA_Bluetooth_Peripheral)

    Parameters

    centralManager

    The central manager that is calling this.

    didConnectThisDevice

    The device instance that was connected.

  • OPTIONAL: This is called to tell the instance that a peripheral device is about to be disconnected.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, willDisconnectThisDevice: CGA_Bluetooth_Peripheral)

    Parameters

    centralManager

    The central manager that is calling this.

    willDisconnectThisDevice

    The device instance that will be removed after this call.

  • centralManager(_:deviceInfoChanged:) Default implementation

    OPTIONAL: This is called to tell the instance that a Peripheral device has had some change.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, deviceInfoChanged: CGA_Bluetooth_Peripheral)

    Parameters

    centralManager

    The central manager that is calling this.

    deviceInfoChanged

    The device instance that was changed.

  • OPTIONAL: This is called to tell the instance that a Peripheral device is ready for a write.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, deviceReadyForWrite: CGA_Bluetooth_Peripheral)

    Parameters

    centralManager

    The central manager that is calling this.

    deviceReadyForWrite

    The device instance that is ready for a write.

  • OPTIONAL: This is called to tell the instance that a Service changed.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, changedService: CGA_Bluetooth_Service)

    Parameters

    centralManager

    The central manager that is calling this.

    device

    The device instance that contained the changed Service.

    changedService

    The Service instance that was changed.

  • OPTIONAL: This is called to tell the instance that a Characteristic write with response received its response.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, characteristicWriteComplete: CGA_Bluetooth_Characteristic)

    Parameters

    centralManager

    The central manager that is calling this.

    device

    The device instance that contained the changed Service.

    service

    The Service instance that contained the changed Characteristic.

    characteristicWriteComplete

    The Characteristic that had its write completed.

  • OPTIONAL: This is called to tell the instance that a Characteristic changed its notification state.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, changedCharacteristicNotificationState: CGA_Bluetooth_Characteristic)

    Parameters

    centralManager

    The central manager that is calling this.

    device

    The device instance that contained the changed Service.

    service

    The Service instance that contained the changed Characteristic.

    changedCharacteristicNotificationState

    The Characteristic that was changed.

  • OPTIONAL: This is called to tell the instance that a Characteristic changed its value.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, changedCharacteristic: CGA_Bluetooth_Characteristic)

    Parameters

    centralManager

    The central manager that is calling this.

    device

    The device instance that contained the changed Service.

    service

    The Service instance that contained the changed Characteristic.

    changedCharacteristic

    The Characteristic that was changed.

  • OPTIONAL: This is called to tell the instance that a Descriptor changed its value.

    Default Implementation

    The default does nothing.

    Declaration

    Swift

    func centralManager(_ centralManager: RVS_BlueThoth, device: CGA_Bluetooth_Peripheral, service: CGA_Bluetooth_Service, characteristic: CGA_Bluetooth_Characteristic, changedDescriptor: CGA_Bluetooth_Descriptor)

    Parameters

    centralManager

    The central manager that is calling this.

    device

    The device instance that contained the changed Service.

    service

    The Service instance that contained the changed Characteristic.

    characteristic

    The Characteristic that contains the Descriptor that was changed.

    changedDescriptor

    The Descriptor that was changed.