[][src]Struct nrf_softdevice_s140::ble_gap_adv_params_t

#[repr(C)]pub struct ble_gap_adv_params_t {
    pub properties: ble_gap_adv_properties_t,
    pub p_peer_addr: *const ble_gap_addr_t,
    pub interval: u32,
    pub duration: u16,
    pub max_adv_evts: u8,
    pub channel_mask: ble_gap_ch_mask_t,
    pub filter_policy: u8,
    pub primary_phy: u8,
    pub secondary_phy: u8,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>,
}

@brief GAP advertising parameters.

Fields

properties: ble_gap_adv_properties_t

< The properties of the advertising events.

p_peer_addr: *const ble_gap_addr_t

< Address of a known peer. @note ble_gap_addr_t::addr_type cannot be @ref BLE_GAP_ADDR_TYPE_ANONYMOUS.

  • When privacy is enabled and the local device uses @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE addresses, the device identity list is searched for a matching entry. If the local IRK for that device identity is set, the local IRK for that device will be used to generate the advertiser address field in the advertising packet.
  • If @ref ble_gap_adv_properties_t::type is directed, this must be set to the targeted scanner or initiator. If the peer address is in the device identity list, the peer IRK for that device will be used to generate @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE target addresses used in the advertising event PDUs.
interval: u32

< Advertising interval in 625 us units. @sa BLE_GAP_ADV_INTERVALS. @note If @ref ble_gap_adv_properties_t::type is set to @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE advertising, this parameter is ignored.

duration: u16

< Advertising duration in 10 ms units. When timeout is reached, an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised. @sa BLE_GAP_ADV_TIMEOUT_VALUES. @note The SoftDevice will always complete at least one advertising event even if the duration is set too low.

max_adv_evts: u8

< Maximum advertising events that shall be sent prior to disabling advertising. Setting the value to 0 disables the limitation. When the count of advertising events specified by this parameter (if not 0) is reached, advertising will be automatically stopped and an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised @note If @ref ble_gap_adv_properties_t::type is set to @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE, this parameter is ignored.

channel_mask: ble_gap_ch_mask_t

< Channel mask for primary and secondary advertising channels. At least one of the primary channels, that is channel index 37-39, must be used. Masking away secondary advertising channels is not supported.

filter_policy: u8

< Filter Policy. @sa BLE_GAP_ADV_FILTER_POLICIES.

primary_phy: u8

< Indicates the PHY on which the primary advertising channel packets are transmitted. If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS will be used. Valid values are @ref BLE_GAP_PHY_1MBPS and @ref BLE_GAP_PHY_CODED. @note The primary_phy shall indicate @ref BLE_GAP_PHY_1MBPS if @ref ble_gap_adv_properties_t::type is not an extended advertising type.

secondary_phy: u8

< Indicates the PHY on which the secondary advertising channel packets are transmitted. If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS will be used. Valid values are @ref BLE_GAP_PHY_1MBPS, @ref BLE_GAP_PHY_2MBPS, and @ref BLE_GAP_PHY_CODED. If @ref ble_gap_adv_properties_t::type is an extended advertising type and connectable, this is the PHY that will be used to establish a connection and send AUX_ADV_IND packets on. @note This parameter will be ignored when @ref ble_gap_adv_properties_t::type is not an extended advertising type.

_bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>

Implementations

impl ble_gap_adv_params_t[src]

pub fn set_id(&self) -> u8[src]

pub fn set_set_id(&mut self, val: u8)[src]

pub fn scan_req_notification(&self) -> u8[src]

pub fn set_scan_req_notification(&mut self, val: u8)[src]

pub fn new_bitfield_1(
    set_id: u8,
    scan_req_notification: u8
) -> __BindgenBitfieldUnit<[u8; 1], u8>
[src]

Trait Implementations

impl Clone for ble_gap_adv_params_t[src]

impl Copy for ble_gap_adv_params_t[src]

impl Debug for ble_gap_adv_params_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.