Service
public class Service
extension Service: Equatable
                Service is a class implementing ReactiveX which wraps CoreBluetooth functions related to interaction with CBService
- 
                  
                  
Intance of CoreBluetooth service class
Declaration
Swift
public let service: CBService - 
                  
                  
Peripheral to which this service belongs
Declaration
Swift
public let peripheral: Peripheral - 
                  
                  
True if service is primary service
Declaration
Swift
public var isPrimary: Bool { get } - 
                  
                  
Service’s UUID
Declaration
Swift
public var uuid: CBUUID { get } - 
                  
                  
Service’s included services
Declaration
Swift
public var includedServices: [Service]? { get } - 
                  
                  
Service’s characteristics
Declaration
Swift
public var characteristics: [Characteristic]? { get } - 
                  
                  
Function that triggers characteristics discovery for specified Services and identifiers. Discovery is called after subscribtion to
Observableis made.Observable can ends with following errors:
BluetoothError.characteristicsDiscoveryFailedBluetoothError.peripheralDisconnectedBluetoothError.destroyedBluetoothError.bluetoothUnsupportedBluetoothError.bluetoothUnauthorizedBluetoothError.bluetoothPoweredOffBluetoothError.bluetoothInUnknownStateBluetoothError.bluetoothResetting
Declaration
Swift
public func discoverCharacteristics(_ characteristicUUIDs: [CBUUID]?) -> Single<[Characteristic]>Parameters
identifiersIdentifiers of characteristics that should be discovered. If
nil- all of the characteristics will be discovered. If you’ll pass empty array - none of them will be discovered.Return Value
Singlethat emitsnextwith array ofCharacteristicinstances, once they’re discovered. If not all requested characteristics are discovered,RxError.noElementserror is emmited. - 
                  
                  
Function that triggers included services discovery for specified services. Discovery is called after subscribtion to
Observableis made.Observable can ends with following errors:
BluetoothError.includedServicesDiscoveryFailedBluetoothError.peripheralDisconnectedBluetoothError.destroyedBluetoothError.bluetoothUnsupportedBluetoothError.bluetoothUnauthorizedBluetoothError.bluetoothPoweredOffBluetoothError.bluetoothInUnknownStateBluetoothError.bluetoothResetting
Declaration
Swift
public func discoverIncludedServices(_ includedServiceUUIDs: [CBUUID]?) -> Single<[Service]>Parameters
includedServiceUUIDsIdentifiers of included services that should be discovered. If
nil- all of the included services will be discovered. If you’ll pass empty array - none of them will be discovered.Return Value
Singlethat emitsnextwith array ofServiceinstances, once they’re discovered. If not all requested services are discovered,RxError.noElementserror is emmited. 
View on GitHub
        Service Class Reference