#[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>,
}
Expand description
@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§
source§impl ble_gap_adv_params_t
impl ble_gap_adv_params_t
pub fn set_id(&self) -> u8
pub fn set_set_id(&mut self, val: u8)
pub fn scan_req_notification(&self) -> u8
pub fn set_scan_req_notification(&mut self, val: u8)
pub fn new_bitfield_1(
set_id: u8,
scan_req_notification: u8
) -> __BindgenBitfieldUnit<[u8; 1], u8>
Trait Implementations§
source§impl Clone for ble_gap_adv_params_t
impl Clone for ble_gap_adv_params_t
source§fn clone(&self) -> ble_gap_adv_params_t
fn clone(&self) -> ble_gap_adv_params_t
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more