state
Provides a conflated Flow of the Peripheral's State.
After connect is called, the state will typically transition through the following states:
connect()
:
v
.----------------------.
| Connecting.Bluetooth |
'----------------------'
|
v
.---------------------.
| Connecting.Services |
'---------------------'
|
v
.---------------------. .-----------.
| Connecting.Observes | ---> | Connected |
'---------------------' '-----------'
:
disconnect() or
connection drop
:
v
.---------------. .--------------.
| Disconnecting | ---> | Disconnected |
'---------------' '--------------'
Content copied to clipboard
Note that Disconnecting state is skipped on Apple and JavaScript when connection closure is initiated by peripheral (or peripheral goes out-of-range).