ProfileServices

sealed class ProfileServices<out T>

The outcome of resolving a profile's services on a peripheral, passed to the block parameter of Peripheral.profile.

Exactly one of Found, Unsupported or Failed is reported for every service discovery outcome, so block always has something to act on instead of, for an optional profile, simply never being called.

Type Parameters

T

The type of the resolved service(s): RemoteService for profiles based on a single GATT service, or a List of RemoteService for profiles based on multiple GATT services.

See also

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard

Service discovery failed, so it could not be determined whether the profile's required services are present on the peripheral.

Link copied to clipboard
data class Found<T>(val services: T) : ProfileServices<T>

All the profile's required services (and any optional ones found) are present on the peripheral.

Link copied to clipboard

At least one of the profile's required services was not found on the peripheral.