Peripheral
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Read from a specified characteristic.
Declaration
Swift
public func read<R: Receivable>(from characteristicIdentifier: CharacteristicIdentifier, completion: @escaping (ReadResult<R>) -> Void)
-
Write to a specified characteristic.
Declaration
Swift
public func write<S: Sendable>(to characteristicIdentifier: CharacteristicIdentifier, value: S, completion: @escaping (WriteResult) -> Void)
-
Undocumented
-
Listen for notifications on a specified characterstic.
Declaration
Swift
public func listen<R: Receivable>(to characteristicIdentifier: CharacteristicIdentifier, completion: @escaping (ReadResult<R>) -> Void)
-
End listening on a specified characteristic.
Provides the ability to suppress the failure message to the listen callback. This is useful in the internal implimentation of some of the listening logic, since we want to be able to share the clear logic on a .done exit, but don’t need to send a failure in that case.
Note
Note Currently this can also cancel a regular in-progress read as well, but that behaviour may change down the road.Declaration
Swift
public func endListen(to characteristicIdentifier: CharacteristicIdentifier, error: Swift.Error? = nil, completion: ((WriteResult) -> Void)? = nil)
-
Restore a (believed to be) active listening session, so if we start up in response to a notification, we can receive it.
Declaration
Swift
public func restoreListen<R: Receivable>(to characteristicIdentifier: CharacteristicIdentifier, completion: @escaping (ReadResult<R>) -> Void)
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented