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.