Bluetooth Framework C++ Edition
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, const bool UseExtendedAdvertisement, const bool Anonymous, const bool IncludeTxRssi, const char PreferredTxRssi, const wclBluetoothLeAdvertisementPhy PrimaryPhy, const wclBluetoothLeAdvertisementPhy SecondaryPhy)
 Starts Bluetooth LE Advertising.
 
int Stop ()
 Stops Bluetooth LE Advertising.
 
WCL_BLE_ADV_LIST * GetAdvertisements () 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.
 
CwclBluetoothRadio * GetRadio () const
 Gets the connection owner.
 
 __declspec (property(get=GetRadio)) CwclBluetoothRadio *Radio
 
unsigned short GetInterval () const
 Gets the advertising interval.
 
 __declspec (property(get=GetInterval)) unsigned short Interval
 Gets the advertising interval.
 
bool GetAnonymous () const
 Gets if the device address is included in the advertisement header.
 
 __declspec (property(get=GetAnonymous)) bool Anonymous
 Gets if the device address is included in the advertisement header.
 
bool GetIncludeTxRssi () const
 Gets if the transmit power level is included in the advertisement header.
 
 __declspec (property(get=GetIncludeTxRssi)) bool IncludeTxRssi
 Gets if 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.
 
 __declspec (property(get=GetPreferredTxRssi)) char PreferredTxRssi
 If specified, requests that the radio use the indicated transmit power level for the advertisement.
 
wclBluetoothLeAdvertisementPhy GetPrimaryPhy () const
 Gets a primary advertisement PHY.
 
 __declspec (property(get=GetPrimaryPhy)) wclBluetoothLeAdvertisementPhy PrimaryPhy
 Gets a primary advertisement PHY.
 
wclBluetoothLeAdvertisementPhy GetSecondaryPhy () const
 Gets a secondary advertisement PHY.
 
 __declspec (property(get=GetSecondaryPhy)) wclBluetoothLeAdvertisementPhy SecondaryPhy
 Gets a secondary advertisement PHY.
 
bool GetUseExtendedAdvertisement () const
 Specifies that the advertisement publisher should use the Extended Advertising format.
 
 __declspec (property(get=GetUseExtendedAdvertisement)) 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.
 
wclMessageProcessingMethod GetMessageProcessing () const
 Gets the message processing method used by the connection.
 
 __declspec (property(get=GetMessageProcessing)) wclMessageProcessingMethod MessageProcessing
 Gets the message processing method used by the connection.
 
CwclMessageReceiver * GetReceiver () 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
CwclCriticalSection * GetCS ()
 Gets the connection critical section.
 
 __declspec (property(get=GetCS)) CwclCriticalSection *CS
 Gets the connection 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