Bluetooth Framework C++ Edition
Public Member Functions | Protected Member Functions | List of all members
CwclBluetoothLeAdvertiserConnection Class Referenceabstract

The virtual connection class enables Bluetooth LE advertising feature. More...

#include <wclBluetooth.h>

Inheritance diagram for CwclBluetoothLeAdvertiserConnection:
CwclCustomConnection

Public Member Functions

 CwclBluetoothLeAdvertiserConnection (CwclBluetoothRadio *const Radio)
 Creates a new "virtual" Bluetooth LE Advertising connection object.
 
virtual ~CwclBluetoothLeAdvertiserConnection ()
 Frees the Bluetooth LE Advertiser.
 
int Start (WCL_BLE_ADV_LIST *const Advertisements, const unsigned short Interval)
 Starts Bluetooth LE Advertising.
 
int Stop ()
 Stops Bluetooth LE Advertising.
 
WCL_BLE_ADV_LISTGetAdvertisements () const
 Gets the Bluetooth LE advertisements list.
 
 __declspec (property(get=GetAdvertisements)) WCL_BLE_ADV_LIST *Advertisements
 Gets the Bluetooth LE advertisements list.
 
bool GetAdvertising () const
 Gets advertising state.
 
 __declspec (property(get=GetAdvertising)) bool Advertising
 Gets advertising state.
 
unsigned short GetInterval () const
 Gets the advertising interval.
 
 __declspec (property(get=GetInterval)) unsigned short Interval
 Gets the advertising interval.
 
CwclBluetoothRadioGetRadio () const
 Gets the connection owner.
 
 __declspec (property(get=GetRadio)) CwclBluetoothRadio *Radio
 
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 Bluetooth LE advertising started.
 
__event void OnStopped (void *Sender)
 The event fires when the Bluetooth LE advertising stopped.
 
- Public Member Functions inherited from CwclCustomConnection
 CwclCustomConnection ()
 Creates a new connection.
 
virtual ~CwclCustomConnection ()
 Frees the connection.
 
CwclMessageReceiverGetReceiver () const
 Gets the connection message receiver object.
 
 __declspec (property(get=GetReceiver)) CwclMessageReceiver *Receiver
 Gets the connection message receiver object.
 
DWORD GetThreadId () const
 Gets the connection's thread ID.
 
 __declspec (property(get=GetThreadId)) DWORD ThreadId
 Gets the connection's thread ID.
 

Protected Member Functions

virtual void MessageReceived (const CwclMessage *const Message) override
 The method called when a new notification message received.
 
virtual void DoStarted ()
 Fires the OnStarted event.
 
virtual void DoStopped ()
 Fires the OnStopped event.
 
virtual int HalStart ()=0
 Implements a hardware-dependent code to start Bluetooth LE advertising.
 
virtual int HalStop ()=0
 Implements a hardware-dependent code to stop Bluetooth LE advertising.
 
- Protected Member Functions inherited from CwclCustomConnection
virtual void MessageReceived (const CwclMessage *const Message)
 The message receiver calls this method when a new notification message has been received.
 
void Enter ()
 Enters the connection's critical section.
 
void Leave ()
 Exists *leaves) the connection's critical section.
 

Detailed Description

The virtual connection class enables Bluetooth LE advertising feature.

The class provides methods to enable Bluetooth LE advertising.

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

See also
CwclCustomConnection