Service
@available(swift 4.0)
@available(iOS 10.0, tvOS 10.0, watchOS 3.0, macOS 10.12, *)
open class Service
extension Service: Encodable
extension Service: Hashable
extension Service: Equatable
Bluetooth Service base Class
-
Name of the Service
Declaration
Swift
open internal(set) var name: String { get }
-
Service UUID String
Declaration
Swift
open internal(set) var uuidString: String { get }
-
Uniform Type Identifier
Declaration
Swift
open private(set) var uniformIdentifier: String { get }
-
Creates a Bluetooth Service
Declaration
Swift
public init(name: String, uuidString: String, uniformIdentifier: String)
Parameters
name
Service Name
uuidString
UUID String
uniformIdentifier
Uniform Type Information
-
Pairing Service
Declaration
Swift
class var hapPairing: ServiceHapPairing { get }
-
Protocol Information Service
Declaration
Swift
class var hapProtocolInformationService: ServiceHapProtocolInformationService { get }
-
Accessory Information
Declaration
Swift
class var hapAccessoryInformation: ServiceHapAccessoryInformation { get }
-
Fan
Declaration
Swift
class var hapFan: ServiceHapFan { get }
-
Fan Version 2
Declaration
Swift
class var hapAdvancedFan: ServiceHapAdvancedFan { get }
-
Garage Door Opener
Declaration
Swift
class var hapGarageDoorOpener: ServiceHapGarageDoorOpener { get }
-
Lightbulb
Declaration
Swift
class var hapLightbulb: ServiceHapLightbulb { get }
-
Lock Management
Declaration
Swift
class var hapLockManagement: ServiceHapLockManagement { get }
-
Lock Mechanism
Declaration
Swift
class var hapLockMechanism: ServiceHapLockMechanism { get }
-
Outlet
Declaration
Swift
class var hapOutlet: ServiceHapOutlet { get }
-
Switch
Declaration
Swift
class var hapSwitch: ServiceHapSwitch { get }
-
Thermostat
Declaration
Swift
class var hapThermostat: ServiceHapThermostat { get }
-
Air Quality Sensor
Declaration
Swift
class var hapAirQualitySensor: ServiceHapAirQualitySensor { get }
-
Security System
Declaration
Swift
class var hapSecuritySystem: ServiceHapSecuritySystem { get }
-
Carbon Monoxide Sensor
Declaration
Swift
class var hapCarbonMonoxideSensor: ServiceHapCarbonMonoxideSensor { get }
-
Contact Sensor
Declaration
Swift
class var hapContactSensor: ServiceHapContactSensor { get }
-
Door
Declaration
Swift
class var hapDoor: ServiceHapDoor { get }
-
Humidity Sensor
Declaration
Swift
class var hapHumiditySensor: ServiceHapHumiditySensor { get }
-
Leak Sensor
Declaration
Swift
class var hapLeakSensor: ServiceHapLeakSensor { get }
-
Light Sensor
Declaration
Swift
class var hapLightSensor: ServiceHapLightSensor { get }
-
Motion Sensor
Declaration
Swift
class var hapMotionSensor: ServiceHapMotionSensor { get }
-
Occupancy Sensor
Declaration
Swift
class var hapOccupancySensor: ServiceHapOccupancySensor { get }
-
Smoke Sensor
Declaration
Swift
class var hapSmokeSensor: ServiceHapSmokeSensor { get }
-
Stateless Programmable Switch
Declaration
Swift
class var hapStatelessProgrammableSwitch: ServiceHapStatelessProgrammableSwitch { get }
-
Temperature Sensor
Declaration
Swift
class var hapTemperatureSensor: ServiceHapTemperatureSensor { get }
-
Window
Declaration
Swift
class var hapWindow: ServiceHapWindow { get }
-
Window Covering
Declaration
Swift
class var hapWindowCovering: ServiceHapWindowCovering { get }
-
Battery Service
Declaration
Swift
class var hapBatteryService: ServiceHapBatteryService { get }
-
Carbon Dioxide Sensor
Declaration
Swift
class var hapCarbonDioxideSensor: ServiceHapCarbonDioxideSensor { get }
-
Camera RTP Stream Management
Declaration
Swift
class var hapCameraRtpStreamManagement: ServiceHapCameraRtpStreamManagement { get }
-
Microphone
Declaration
Swift
class var hapMicrophone: ServiceHapMicrophone { get }
-
Speaker
Declaration
Swift
class var hapSpeaker: ServiceHapSpeaker { get }
-
Doorbell
Declaration
Swift
class var hapDoorbell: ServiceHapDoorbell { get }
-
Slat
Declaration
Swift
class var hapSlat: ServiceHapSlat { get }
-
Filter Maintenance
Declaration
Swift
class var hapFilterMaintenance: ServiceHapFilterMaintenance { get }
-
Air Purifier
Declaration
Swift
class var hapAirPurifier: ServiceHapAirPurifier { get }
-
Humidifier Dehumidifier
Declaration
Swift
class var hapHeaterCooler: ServiceHapHeaterCooler { get }
-
Heater Cooler
Declaration
Swift
class var hapHumidifierDehumidifier: ServiceHapHumidifierDehumidifier { get }
-
Service Label
Declaration
Swift
class var hapServiceLabel: ServiceHapServiceLabel { get }
-
Irrigation System
Declaration
Swift
class var hapIrrigationSystem: ServiceHapIrrigationSystem { get }
-
Valve
Declaration
Swift
class var hapValve: ServiceHapValve { get }
-
Faucet
Declaration
Swift
class var hapFaucet: ServiceHapFaucet { get }
-
Encodes this value into the given encoder.
If the value fails to encode anything,
encoder
will encode an empty keyed container in its place.This function throws an error if any values are invalid for the given encoder’s format.
Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
encoder
The encoder to write data to.
-
Hashes the essential components of this value by feeding them into the given hasher.
Implement this method to conform to the
Hashable
protocol. The components used for hashing must be the same as the components compared in your type’s==
operator implementation. Callhasher.combine(_:)
with each of these components.Important
Never call
finalize()
onhasher
. Doing so may become a compile-time error in the future.Declaration
Swift
public func hash(into hasher: inout Hasher)
Parameters
hasher
The hasher to use when combining the components of this instance.
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
a
andb
,a == b
implies thata != b
isfalse
.Declaration
Swift
public static func == (lhs: Service, rhs: Service) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.
-
Apple MIDI
Declaration
Swift
class var appleMidi: ServiceAppleMidi { get }
-
CycleOps Bike Trainer
Declaration
Swift
class var cycleOps: ServiceCycleOps { get }
-
Dropcam
Declaration
Swift
class var dropcam: ServiceDropcam { get }
-
Elite Trainer
Declaration
Swift
class var eliteTrainer: ServiceEliteTrainer { get }
-
GymConnect Service
Declaration
Swift
class var gymConnect: ServiceGymConnect { get }
-
Google Glass
Declaration
Swift
class var googleGlass: ServiceGoogleGlass { get }
-
Komoot
Declaration
Swift
class var komoot: ServiceKomoot { get }
-
Myo Armband Classifier Event
Declaration
Swift
class var myArmbandClassifierEvent: ServiceMyoClassifierEvent { get }
-
Myo Armband Control
Declaration
Swift
class var myoArmbandControl: ServiceMyoControl { get }
-
Myo Armband IMU
Declaration
Swift
class var myoArmbandImu: ServiceMyoImu { get }
-
Myo Armband Raw EMG Data
Declaration
Swift
class var myoArmbandRawEMGData: ServiceMyoRawEMGData { get }
-
Nordic Legacy Device Firmware Update
Declaration
Swift
class var nordicLegacyDeviceFirmwareUpdate: ServiceNordicLegacyDeviceFirmwareUpdate { get }
-
Nordic Secure Device Firmware Update
Declaration
Swift
class var nordicSecureDeviceFirmwareUpdate: ServiceNordicSecureDeviceFirmwareUpdate { get }
-
North Pole Engineering AWE Diagnostics
Declaration
Swift
class var northPoleAweDiagnostics: ServiceNorthPoleAweDiagnostics { get }
-
North Pole Engineering AWE Heart Rate
Declaration
Swift
class var northPoleAweHeartRate: ServiceNorthPoleAweHeartRate { get }
-
Tacx ANT-FEC
Declaration
Swift
class var tacxAntFec: ServiceTacxAntFec { get }
-
Texas Instruments Firmware Update
Declaration
Swift
class var texasInstrumentsFirmwareUpdate: ServiceTexasInstrumentsFirmwareUpdate { get }
-
Texas Instruments Sensor Tag Accelerometer
Declaration
Swift
class var texasInstrumentsSensorTagAccelerometer: ServiceTexasInstrumentsSensorTagAccelerometer { get }
-
Texas Instruments Sensor Tag Barometer
Declaration
Swift
class var texasInstrumentsSensorTagBarometer: ServiceTexasInstrumentsSensorTagBarometer { get }
-
Texas Instruments Sensor Tag Connection Control
Declaration
Swift
class var texasInstrumentsSensorTagControl: ServiceTexasInstrumentsSensorTagControl { get }
-
Texas Instruments Sensor Tag Gyroscope
Declaration
Swift
class var texasInstrumentsSensorTagGyroscope: ServiceTexasInstrumentsSensorTagGyroscope { get }
-
Texas Instruments Sensor Tag Humidity
Declaration
Swift
class var texasInstrumentsSensorTagHumidity: ServiceTexasInstrumentsSensorTagHumidity { get }
-
Texas Instruments Sensor Tag Magnetometer
Declaration
Swift
class var texasInstrumentsSensorTagMagnetometer: ServiceTexasInstrumentsSensorTagMagnetometer { get }
-
Texas Instruments Sensor Tag Temperature
Declaration
Swift
class var texasInstrumentsSensorTagTemperature: ServiceTexasInstrumentsSensorTagTemperature { get }
-
Wahoo Fitness Firmware Update
Declaration
Swift
class var wahooFitnessFirmwareUpdate: ServiceWahooFitnessFirmwareUpdate { get }
-
Alert Notification
Declaration
Swift
class var alertNotification: ServiceAlertNotification { get }
-
Audio Input Control
Declaration
Swift
class var audioInputControl: ServiceAudioInputControl { get }
-
Automation IO
Declaration
Swift
class var automationInputOutput: ServiceAutomationInputOutput { get }
-
Battery
Declaration
Swift
class var battery: ServiceBattery { get }
-
Binary Sensor
Declaration
Swift
class var binarySensor: ServiceBinarySensor { get }
-
Blood Pressure
Declaration
Swift
class var bloodPressure: ServiceBloodPressure { get }
-
Body Composition
Declaration
Swift
class var bodyComposition: ServiceBodyComposition { get }
-
Bond Management
Declaration
Swift
class var bondManagement: ServiceBondManagement { get }
-
Constant Tone Extension
Declaration
Swift
class var constantToneExtension: ServiceConstantToneExtension { get }
-
Continuous Glucose Monitoring
Declaration
Swift
class var continuousGlucoseMonitoring: ServiceContinuousGlucoseMonitoring { get }
-
Coordinated Set Identification
Declaration
Swift
class var coordinatedSetIdentification: ServiceCoordinatedSetIdentification { get }
-
Current Time
Declaration
Swift
class var currentTime: ServiceCurrentTime { get }
-
Cycling Power
Declaration
Swift
class var cyclingPower: ServiceCyclingPower { get }
-
Cycling Speed and Cadence
Declaration
Swift
class var cyclingSpeedAndCadence: ServiceCyclingSpeedAndCadence { get }
-
Device Information
Declaration
Swift
class var deviceInformation: ServiceDeviceInformation { get }
-
Device Time
Declaration
Swift
class var deviceTime: ServiceDeviceTime { get }
-
Emergency Configuration
Declaration
Swift
class var emergencyConfiguration: ServiceEmergencyConfiguration { get }
-
Environmental Sensing
Declaration
Swift
class var environmentalSensing: ServiceEnvironmentalSensing { get }
-
Fitness Machine
Declaration
Swift
class var fitnessMachine: ServiceFitnessMachine { get }
-
Generic Access
Declaration
Swift
class var genericAccess: ServiceGenericAccess { get }
-
Generic Attribute
Declaration
Swift
class var genericAttribute: ServiceGenericAttribute { get }
-
Generic Media Control
Declaration
Swift
class var genericMediaControl: ServiceGenericMediaControl { get }
-
Generic Telephone Bearer
Declaration
Swift
class var genericTelephoneBearer: ServiceGenericTelephoneBearer { get }
-
Glucose
Declaration
Swift
class var glucose: ServiceGlucose { get }
-
Health Thermometer
Declaration
Swift
class var healthThermometer: ServiceHealthThermometer { get }
-
Heart Rate
Declaration
Swift
class var heartRate: ServiceHeartRate { get }
-
HTTP Proxy
Declaration
Swift
class var httpProxy: ServiceHttpProxy { get }
-
Human Interface Device
Declaration
Swift
class var humanInterfaceDevice: ServiceHumanInterfaceDevice { get }
-
Immediate Alert
Declaration
Swift
class var immediateAlert: ServiceImmediateAlert { get }
-
Indoor Positioning
Declaration
Swift
class var indoorPositioning: ServiceIndoorPositioning { get }
-
Insulin Delivery
Declaration
Swift
class var insulinDelivery: ServiceInsulinDelivery { get }
-
Internet Protocol Support
Declaration
Swift
class var internetProtocolSupport: ServiceInternetProtocolSupport { get }
-
Link Loss
Declaration
Swift
class var linkLoss: ServiceLinkLoss { get }
-
Location and Navigation
Declaration
Swift
class var locationAndNavigation: ServiceLocationAndNavigation { get }
-
Media Control
Declaration
Swift
class var mediaControl: ServiceMediaControl { get }
-
Mesh Provisioning
Declaration
Swift
class var meshProvisioning: ServiceMeshProvisioning { get }
-
Mesh Proxy
Declaration
Swift
class var meshProxy: ServiceMeshProxy { get }
-
Microphone Control
Declaration
Swift
class var microphoneControl: ServiceMicrophoneControl { get }
-
Next Daylight Savings Time (DST) Change
Declaration
Swift
class var nextDSTChange: ServiceNextDSTChange { get }
-
Object Transfer
Declaration
Swift
class var objectTransfer: ServiceObjectTransfer { get }
-
Phone Alert Status
Declaration
Swift
class var phoneAlertStatus: ServicePhoneAlertStatus { get }
-
Physical Activity Monitor
Declaration
Swift
class var physicalActivityMonitor: ServicePhysicalActivityMonitor { get }
-
Pulse Oximeter
Declaration
Swift
class var pulseOximeter: ServicePulseOximeter { get }
-
ReconnectionConfiguration
Declaration
Swift
class var reconnectionConfiguration: ServiceReconnectionConfiguration { get }
-
Reference Time Update
Declaration
Swift
class var referenceTimeUpdate: ServiceReferenceTimeUpdate { get }
-
Running Speed and Cadence
Declaration
Swift
class var runningSpeedAndCadence: ServiceRunningSpeedAndCadence { get }
-
Telephone Bearer
Declaration
Swift
class var telephoneBearer: ServiceTelephoneBearer { get }
-
Scan Parameters
Declaration
Swift
class var scanParameters: ServiceScanParameters { get }
-
Transport Discovery
Declaration
Swift
class var transportDiscovery: ServiceTransportDiscovery { get }
-
Tx Power
Declaration
Swift
class var txPower: ServiceTxPower { get }
-
User Data
Declaration
Swift
class var userData: ServiceUserData { get }
-
Volume Control
Declaration
Swift
class var volumeControl: ServiceVolumeControl { get }
-
Volume Offset Control
Declaration
Swift
class var volumeOffsetControl: ServiceVolumeOffsetControl { get }
-
Weight Scale
Declaration
Swift
class var weightScale: ServiceWeightScale { get }