Struct esp32_nimble::BLEAdvertising
source · pub struct BLEAdvertising { /* private fields */ }
Implementations§
source§impl BLEAdvertising
impl BLEAdvertising
pub fn reset(&mut self) -> Result<(), BLEError>
pub fn set_data( &mut self, data: &mut BLEAdvertisementData, ) -> Result<(), BLEError>
pub fn set_raw_data(&mut self, data: &[u8]) -> Result<(), BLEError>
pub fn set_raw_scan_response_data( &mut self, data: &[u8], ) -> Result<(), BLEError>
sourcepub fn advertisement_type(&mut self, adv_type: ConnMode) -> &mut Self
pub fn advertisement_type(&mut self, adv_type: ConnMode) -> &mut Self
Set the type of advertisment to use.
sourcepub fn high_duty_cycle(&mut self, val: bool) -> &mut Self
pub fn high_duty_cycle(&mut self, val: bool) -> &mut Self
Set the duty cycle for advertisement_type.
Valid only if advertisement_type is directed-connectable.
sourcepub fn min_interval(&mut self, interval: u16) -> &mut Self
pub fn min_interval(&mut self, interval: u16) -> &mut Self
Set the minimum advertising interval.
interval
: advertising interval in 0.625ms units, 0 = use default.
sourcepub fn max_interval(&mut self, interval: u16) -> &mut Self
pub fn max_interval(&mut self, interval: u16) -> &mut Self
Set the maximum advertising interval.
interval
: advertising interval in 0.625ms units, 0 = use default.
sourcepub fn scan_response(&mut self, value: bool) -> &mut Self
pub fn scan_response(&mut self, value: bool) -> &mut Self
Set if scan response is available.
sourcepub fn filter_policy(&mut self, value: AdvFilterPolicy) -> &mut Self
pub fn filter_policy(&mut self, value: AdvFilterPolicy) -> &mut Self
Set the filtering for the scan filter.
sourcepub fn start(&mut self) -> Result<(), BLEError>
pub fn start(&mut self) -> Result<(), BLEError>
Start advertising. Advertising not stop until it is manually stopped.
sourcepub fn start_with_duration(&mut self, duration_ms: i32) -> Result<(), BLEError>
pub fn start_with_duration(&mut self, duration_ms: i32) -> Result<(), BLEError>
Start advertising.