Platforms to show: All Mac Windows Linux Cross-Platform
WindowsGattDeviceServiceMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Bluetooth | MBS WinFrameworks Plugin | 22.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
The GattDeviceService class represents a GATT service on a Bluetooth LE device. It is instantiated by using a device service instance path, obtained by finding a device using the Windows.Devices.Enumeration API.
- 4 events
- event CharacteristicsCompleted(asyncStatus as Integer, Result as WindowsGattCharacteristicsResultMBS)
- event IncludedServicesCompleted(asyncStatus as Integer, Result as WindowsGattDeviceServicesResultMBS)
- event OpenAsyncCompleted(asyncStatus as Integer, OpenStatus as Integer)
- event RequestAccessCompleted(asyncStatus as Integer, DeviceAccessStatus as Integer)
- 7 properties
- property AttributeHandle as Integer
- property Device as WindowsBluetoothLEDeviceMBS
- property DeviceId as String
- property Handle as Integer
- property Session as WindowsGattSessionMBS
- property SharingMode as Integer
- property UUID as String
- 18 methods
- method Characteristics(characteristicUUID as String) as WindowsGattDeviceServiceMBS()
- method Close
- method Constructor Private
- method Constructor(other as WindowsGattDeviceServiceMBS)
- method Destructor
- method GetAllCharacteristics as WindowsGattCharacteristicMBS()
- method GetAllIncludedServices as WindowsGattDeviceServiceMBS()
- method GetCharacteristicsAsync
- method GetCharacteristicsAsync(BluetoothCacheMode as Integer)
- method GetCharacteristicsForUuidAsync(characteristicUuid as String)
- method GetCharacteristicsForUuidAsync(characteristicUuid as String, BluetoothCacheMode as Integer)
- method GetIncludedServicesAsync
- method GetIncludedServicesAsync(BluetoothCacheMode as Integer)
- method GetIncludedServicesForUuidAsync(serviceUuid as String)
- method GetIncludedServicesForUuidAsync(serviceUuid as String, BluetoothCacheMode as Integer)
- method OpenAsync(SharingMode as Integer)
- method ParentServices as WindowsGattDeviceServiceMBS()
- method RequestAccessAsync
- 28 shared methods
- shared method AlertNotification as String
- shared method Battery as String
- shared method BloodPressure as String
- shared method CurrentTime as String
- shared method CyclingPower as String
- shared method CyclingSpeedAndCadence as String
- shared method DeviceInformation as String
- shared method FromId(Id as String) as WindowsGattDeviceServiceMBS
- shared method FromId(Id as String, sharingMode as Integer) as WindowsGattDeviceServiceMBS
- shared method FromIdAsync(Id as String, delegateHandler as ServiceFromIdAsyncCompletedMBS)
- shared method FromIdAsync(Id as String, sharingMode as Integer, delegateHandler as ServiceFromIdAsyncCompletedMBS)
- shared method GenericAccess as String
- shared method GenericAttribute as String
- shared method GetDeviceSelectorFromShortId(serviceShortId as UInt16) as String
- shared method GetDeviceSelectorFromUuid(serviceUuid as String) as String
- shared method Glucose as String
- shared method HealthThermometer as String
- shared method HeartRate as String
- shared method HumanInterfaceDevice as String
- shared method ImmediateAlert as String
- shared method LinkLoss as String
- shared method LocationAndNavigation as String
- shared method NextDstChange as String
- shared method PhoneAlertStatus as String
- shared method ReferenceTimeUpdate as String
- shared method RunningSpeedAndCadence as String
- shared method ScanParameters as String
- shared method TxPower as String
- delegate ServiceFromIdAsyncCompletedMBS(AsyncStatus as Integer, Device as WindowsGattDeviceServiceMBS)
- 12 constants
Cache Modes
Constant | Value | Description |
---|---|---|
CacheModeCached | 0 |
Cached data. |
CacheModeUncached | 1 |
Uncached data. |
Open Status Codes
Constant | Value | Description |
---|---|---|
OpenStatusAccessDenied | 5 |
Access is denied. |
OpenStatusAlreadyOpened | 2 |
The GATT device service is already opened. |
OpenStatusNotFound | 3 |
The GATT device service was not found. |
OpenStatusSharingViolation | 4 |
There was a sharing violation. |
OpenStatusSuccess | 1 |
The GATT device service was successfully opened. |
OpenStatusUnspecified | 0 |
Unspecified error. |
Sharing Modes
Constant | Value | Description |
---|---|---|
SharingModeExclusive | 1 |
The sharing mode is exclusive. |
SharingModeSharedReadAndWrite | 3 |
The sharing mode is read and write. |
SharingModeSharedReadOnly | 2 |
The sharing mode is read only. |
SharingModeUnspecified | 0 |
The sharing mode is unspecified. |
This class has no sub classes.
Some methods using this class:
- WindowsBluetoothLEDeviceMBS.GetGattService(serviceUUID as String) as WindowsGattDeviceServiceMBS
- WindowsGattDeviceServicesResultMBS.Services as WindowsGattDeviceServiceMBS()
Some properties using for this class:
- WindowsGattCharacteristicMBS.Service as WindowsGattDeviceServiceMBS
Some examples using this class:
Blog Entries
- News from the MBS Xojo Plugins Version 23.3
- MBS Xojo Plugins, version 23.3pr2
- News from the MBS Xojo Plugins in Version 23.0
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.0
- The Top 10 from the MBS Xojo Plugins in 2022
- Bluetooth LE on Windows
- MBS Xojo Plugins, version 22.6pr1
- News from the MBS Xojo Plugins Version 22.5
- News from the MBS Xojo Plugins Version 22.3
- MBS Xojo Plugins in version 22.3
Xojo Developer Magazine
Release notes
- Version 23.3
- Added FromId function to WindowsGattDeviceServiceMBS class.
- Version 23.0
- Added FromIdAsync shared method to WindowsBluetoothLEDeviceMBS and WindowsGattDeviceServiceMBS classes.
- Added shared methods to WindowsGattDeviceServiceMBS to return GUIDs for various services.
- Fixed OpenAsyncCompleted event for WindowsGattDeviceServiceMBS class.
- Version 22.5
- Fixed GetAllCharacteristics method in WindowsGattDeviceServiceMBS class.
- Version 22.3
- Added more methods for WindowsGattDeviceServiceMBS and WindowsBluetoothLEDeviceMBS classes.
- Added WindowsGattDeviceServicesResultMBS and WindowsGattCharacteristicsResultMBS classes and related methods for WindowsGattDeviceServiceMBS class.
- Added WindowsGattWriteResultMBS, WindowsGattWriteRequestMBS, WindowsGattReadResultMBS, WindowsGattReadRequestMBS, WindowsGattDeviceServiceMBS and WindowsGattCharacteristicMBS classes.
The items on this page are in the following plugins: MBS WinFrameworks Plugin.
WindowsGattDescriptorsResultMBS - WindowsGattDeviceServicesResultMBS