[][src]Struct nrf_softdevice_s132::ble_gap_evt_adv_report_t

#[repr(C)]pub struct ble_gap_evt_adv_report_t {
    pub type_: ble_gap_adv_report_type_t,
    pub peer_addr: ble_gap_addr_t,
    pub direct_addr: ble_gap_addr_t,
    pub primary_phy: u8,
    pub secondary_phy: u8,
    pub tx_power: i8,
    pub rssi: i8,
    pub ch_index: u8,
    pub set_id: u8,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2], u16>,
    pub data: ble_data_t,
    pub aux_pointer: ble_gap_aux_pointer_t,
}

@brief Event structure for @ref BLE_GAP_EVT_ADV_REPORT.

@note If @ref ble_gap_adv_report_type_t::status is set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, not all fields in the advertising report may be available.

@note When ble_gap_adv_report_type_t::status is not set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, scanning will be paused. To continue scanning, call @ref sd_ble_gap_scan_start.

Fields

type_: ble_gap_adv_report_type_t

< Advertising report type. See @ref ble_gap_adv_report_type_t.

peer_addr: ble_gap_addr_t

< Bluetooth address of the peer device. If the peer_addr is resolved: @ref ble_gap_addr_t::addr_id_peer is set to 1 and the address is the peer's identity address.

direct_addr: ble_gap_addr_t

< Contains the target address of the advertising event if @ref ble_gap_adv_report_type_t::directed is set to 1. If the SoftDevice was able to resolve the address, @ref ble_gap_addr_t::addr_id_peer is set to 1 and the direct_addr contains the local identity address. If the target address of the advertising event is @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE, and the SoftDevice was unable to resolve it, the application may try to resolve this address to find out if the advertising event was directed to us.

primary_phy: u8

< Indicates the PHY on which the primary advertising packet was received. See @ref BLE_GAP_PHYS.

secondary_phy: u8

< Indicates the PHY on which the secondary advertising packet was received. See @ref BLE_GAP_PHYS. This field is set to @ref BLE_GAP_PHY_NOT_SET if no packets were received on a secondary advertising channel.

tx_power: i8

< TX Power reported by the advertiser in the last packet header received. This field is set to @ref BLE_GAP_POWER_LEVEL_INVALID if the last received packet did not contain the Tx Power field. @note TX Power is only included in extended advertising packets.

rssi: i8

< Received Signal Strength Indication in dBm of the last packet received.

ch_index: u8

< Channel Index on which the last advertising packet is received (0-39).

set_id: u8

< Set ID of the received advertising data. Set ID is not present if set to @ref BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE.

_bitfield_1: __BindgenBitfieldUnit<[u8; 2], u16>data: ble_data_t

< Received advertising or scan response data. If @ref ble_gap_adv_report_type_t::status is not set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, the data buffer provided in @ref sd_ble_gap_scan_start is now released.

aux_pointer: ble_gap_aux_pointer_t

< The offset and PHY of the next advertising packet in this extended advertising event. @note This field is only set if @ref ble_gap_adv_report_type_t::status is set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA.

Implementations

impl ble_gap_evt_adv_report_t[src]

pub fn data_id(&self) -> u16[src]

pub fn set_data_id(&mut self, val: u16)[src]

pub fn new_bitfield_1(data_id: u16) -> __BindgenBitfieldUnit<[u8; 2], u16>[src]

Trait Implementations

impl Clone for ble_gap_evt_adv_report_t[src]

impl Copy for ble_gap_evt_adv_report_t[src]

impl Debug for ble_gap_evt_adv_report_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.