Struct bluer::monitor::Monitor

source ·
pub struct Monitor {
    pub monitor_type: Type,
    pub rssi_low_threshold: Option<i16>,
    pub rssi_high_threshold: Option<i16>,
    pub rssi_low_timeout: Option<Duration>,
    pub rssi_high_timeout: Option<Duration>,
    pub rssi_sampling_period: Option<RssiSamplingPeriod>,
    pub patterns: Option<Vec<Pattern>>,
    /* private fields */
}
Available on crate feature bluetoothd only.
Expand description

Advertisement monitor specification.

Specifies an advertisement monitor target.

Use MonitorManager::register to add a monitor target.

Fields§

§monitor_type: Type

The type of the monitor.

§rssi_low_threshold: Option<i16>

Used in conjunction with RSSILowTimeout to determine whether a device becomes out-of-range.

Valid range is -127 to 20 (dBm).

§rssi_high_threshold: Option<i16>

Used in conjunction with RSSIHighTimeout to determine whether a device becomes in-range.

Valid range is -127 to 20 (dBm).

§rssi_low_timeout: Option<Duration>

The time it takes to consider a device as out-of-range.

If this many seconds elapses without receiving any signal at least as strong as RSSILowThreshold, a currently in-range device will be considered as out-of-range (lost).

Valid range is 1 to 300 (seconds).

§rssi_high_timeout: Option<Duration>

The time it takes to consider a device as in-range.

If this many seconds elapses while we continuously receive signals at least as strong as RSSIHighThreshold, a currently out-of-range device will be considered as in-range (found).

Valid range is 1 to 300 (seconds).

§rssi_sampling_period: Option<RssiSamplingPeriod>

Grouping rules on how to propagate the received advertisement packets to the client.

§patterns: Option<Vec<Pattern>>

Patterns to match.

Required if monitor_type is Type::OrPatterns.

Trait Implementations§

source§

impl Default for Monitor

source§

fn default() -> Monitor

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.