Bluetooth Framework C++ Edition
Public Member Functions | Protected Member Functions | List of all members
CwclBluetoothLeAdvertiser Class Reference

The Bluetooth LE advertiser components. More...

#include <wclBluetooth.h>

Inheritance diagram for CwclBluetoothLeAdvertiser:
CwclBluetoothComponent

Public Member Functions

 CwclBluetoothLeAdvertiser ()
 Creates new component.
 
virtual ~CwclBluetoothLeAdvertiser ()
 Frees the component.
 
int Add (CwclBluetoothLeAdvertisement *const Advertisement)
 Adds Bluetooth LE advertisement to the advertisements list.
 
int Clear ()
 Clears the advertisements list.
 
int Delete (const size_t Index)
 Deletes the Bluetooth LE advertisement from the advertisements list.
 
int Start (CwclBluetoothRadio *const Radio, const unsigned short Interval=160)
 Starts advertising.
 
int Stop ()
 Stops advertising.
 
CwclBluetoothLeAdvertisementGetAdvertisements (const size_t Index) const
 Gets the Bluetooth LE advertisement object by its index.
 
 __declspec (property(get=GetAdvertisements)) CwclBluetoothLeAdvertisement *Advertisements[]
 Gets the Bluetooth LE advertisement object by its index.
 
bool GetAdvertising () const
 Gets Advertiser state.
 
 __declspec (property(get=GetAdvertising)) bool Advertising
 Gets Advertiser state.
 
size_t GetCount () const
 Gets the advertisements count.
 
 __declspec (property(get=GetCount)) size_t Count
 Gets the advertisements count.
 
unsigned short GetInterval () const
 Gets the advertising interval.
 
 __declspec (property(get=GetInterval)) unsigned short Interval
 Gets the advertising interval.
 
CwclBluetoothRadioGetRadio () const
 Gets the advertiser owner.
 
 __declspec (property(get=GetRadio)) CwclBluetoothRadio *Radio
 Gets the advertiser owner.
 
bool GetAnonymous () const
 Specifies whether or not the device address is included in the advertisement header. By default, the address is included.
 
void SetAnonymous (const bool value)
 Specifies whether or not the device address is included in the advertisement header. By default, the address is included.
 
 __declspec (property(get=GetAnonymous, put=SetAnonymous)) bool Anonymous
 Specifies whether or not the device address is included in the advertisement header. By default, the address is included.
 
bool GetIncludeTxRssi () const
 Specifies whether the transmit power level is included in the advertisement header.
 
void SetIncludeTxRssi (const bool value)
 Specifies whether the transmit power level is included in the advertisement header.
 
 __declspec (property(get=GetIncludeTxRssi, put=SetIncludeTxRssi)) bool IncludeTxRssi
 Specifies whether the transmit power level is included in the advertisement header.
 
char GetPreferredTxRssi () const
 If specified, requests that the radio use the indicated transmit power level for the advertisement.
 
void SetPreferredTxRssi (const char value)
 If specified, requests that the radio use the indicated transmit power level for the advertisement.
 
 __declspec (property(get=GetPreferredTxRssi, put=SetPreferredTxRssi)) char PreferredTxRssi
 If specified, requests that the radio use the indicated transmit power level for the advertisement.
 
bool GetUseExtendedAdvertisement () const
 Specifies that the advertisement publisher should use the Extended Advertising format.
 
void SetUseExtendedAdvertisement (const bool value)
 Specifies that the advertisement publisher should use the Extended Advertising format.
 
 __declspec (property(get=GetUseExtendedAdvertisement, put=SetUseExtendedAdvertisement)) bool UseExtendedAdvertisement
 Specifies that the advertisement publisher should use the Extended Advertising format.
 
__event void OnStarted (void *Sender)
 The event fires when the advertising started.
 
__event void OnStopped (void *Sender)
 The event fires when the advertising stopped.
 
- Public Member Functions inherited from CwclBluetoothComponent
 CwclBluetoothComponent ()
 Creates a new component.
 
virtual ~CwclBluetoothComponent ()
 Frees the component.
 

Protected Member Functions

virtual void DoStarted ()
 Fires the OnStarted event.
 
virtual void DoStopped ()
 Fires the OnStopped event.
 
- Protected Member Functions inherited from CwclBluetoothComponent
void SetCopy (CwclCustomConnection *const NewConnection)
 The method sets new copy of the current connection.
 
void Enter () const
 Enters the Bluetooth component protection critical section.
 
void Leave () const
 Leaves the Bluetooth component protection critical section.
 

Detailed Description

The Bluetooth LE advertiser components.

The feature is supported only on Windows 10 platform with Microsoft Bluetooth drivers or on any Windows platform with BLED112 Bluetooth dongle.

See also
CwclBluetoothComponent