Struct bt_le_ext_adv_start_param

Source
#[repr(C)]
pub struct bt_le_ext_adv_start_param { pub timeout: u16, pub num_events: u8, }
Expand description

@brief Parameters for starting an extended advertising session.

@details This struct provides the parameters to control the behavior of an extended advertising session, including the timeout and the number of advertising events to send. The timeout is specified in units of 10 ms, and the number of events determines how many times the advertising will be sent before stopping. If either the timeout or number of events is reached, the advertising session will be stopped, and the application will be notified via the advertiser sent callback. If both parameters are provided, the advertising session will stop when either limit is reached.

@note Used in @ref bt_le_ext_adv_start function.

Fields§

§timeout: u16

@brief Maximum advertising set duration (N * 10 ms)

The advertising set can be automatically disabled after a certain amount of time has passed since it first appeared on air.

Set to zero for no limit. Set in units of 10 ms.

When the advertising set is automatically disabled because of this limit, @ref bt_le_ext_adv_cb.sent will be called.

When using high duty cycle directed connectable advertising then this parameters must be set to a non-zero value less than or equal to the maximum of @ref BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT.

If privacy @kconfig{CONFIG_BT_PRIVACY} is enabled then the timeout must be less than @kconfig{CONFIG_BT_RPA_TIMEOUT}.

For background information, see parameter “Duration” in Bluetooth Core Specification Version 6.0 Vol. 4 Part E, Section 7.8.56.

§num_events: u8

@brief Maximum number of extended advertising events to be sent

The advertiser can be automatically disabled once the whole advertisement (i.e. extended advertising event) has been sent a certain number of times. The number of advertising PDUs sent may be higher and is not relevant.

Set to zero for no limit.

When the advertising set is automatically disabled because of this limit, @ref bt_le_ext_adv_cb.sent will be called.

For background information, see parameter “Max_Extended_Advertising_Events” in Bluetooth Core Specification Version 6.0 Vol. 4 Part E, Section 7.8.56.

Trait Implementations§

Source§

impl Debug for bt_le_ext_adv_start_param

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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>,

Source§

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>,

Source§

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.