Skip to main content

BleConnection

Trait BleConnection 

Source
pub trait BleConnection: Send + Sync {
    // Required methods
    fn peer_id(&self) -> &NodeId;
    fn is_alive(&self) -> bool;
    fn mtu(&self) -> u16;
    fn phy(&self) -> BlePhy;
    fn rssi(&self) -> Option<i8>;
    fn connected_duration(&self) -> Duration;
}
Expand description

Connection to a BLE peer

Represents an active GATT connection to a remote device.

Required Methods§

Source

fn peer_id(&self) -> &NodeId

Get the remote peer’s node ID

Source

fn is_alive(&self) -> bool

Check if connection is still alive

Source

fn mtu(&self) -> u16

Get the negotiated MTU

Source

fn phy(&self) -> BlePhy

Get the current PHY

Source

fn rssi(&self) -> Option<i8>

Get RSSI (signal strength) in dBm

Source

fn connected_duration(&self) -> Duration

Get connection duration

Implementors§