Documentation
¶
Overview ¶
Package ble provides a channel.Notifier that sends short status messages to a JCODE-* BLE IoT device using the Nordic UART Service (NUS).
The notifier auto-discovers nearby JCODE-* devices on first use and reconnects on failure. All sends are best-effort and non-blocking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier implements channel.Notifier for BLE IoT devices.
func New ¶
func New() *Notifier
New creates a BLE notifier. It does NOT block — device discovery happens lazily on the first Notify call (in a background goroutine).
func (*Notifier) Notify ¶
func (n *Notifier) Notify(event channel.NotifyEvent)
Notify sends a command to the BLE device based on the event type. If the device is not connected yet, a background connection is triggered.
Click to show internal directories.
Click to hide internal directories.