Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Public Member Functions | List of all members
DBTServer01 Class Reference

This peripheral BTRole::Slave test participant works with DBTClient00. More...

#include <dbt_server01.hpp>

Inheritance diagram for DBTServer01:
Collaboration diagram for DBTServer01:

Public Member Functions

 DBTServer01 (const std::string &adapterName_, const jau::EUI48 &useAdapter_, const BTMode btMode_, const bool use_SC_, const BTSecurityLevel adapterSecurityLevel_, const bool do_disconnect_randomly_=false)
 
 ~DBTServer01 () override
 
void close (const std::string &msg) override
 
BTAdapterRef getAdapter () override
 Return the adapter for this endpoint. More...
 
int getDisconnectCount () override
 
std::string getName () override
 Return name of this endpoint, which becomes the adapter's name. More...
 
int getProtocolSessionsDoneSuccess () override
 
int getProtocolSessionsDoneTotal () override
 
int getProtocolSessionsLeft () override
 
BTSecurityLevel getSecurityLevel () override
 
bool initAdapter (BTAdapterRef adapter) override
 Initialize the given adapter for this endpoint. More...
 
void setAdapter (BTAdapterRef serverAdapter_) override
 Set the server adapter for this endpoint. More...
 
void setProtocolSessionsLeft (const int v) override
 
HCIStatusCode startAdvertising (const std::string &msg) override
 
virtual BTSecurityLevel getSecurityLevel ()=0
 
virtual HCIStatusCode startAdvertising (const std::string &msg)=0
 
- Public Member Functions inherited from DBTEndpoint
virtual ~DBTEndpoint ()=default
 
virtual void close (const std::string &msg)=0
 
virtual BTAdapterRef getAdapter ()=0
 Return the adapter for this endpoint. More...
 
virtual int getDisconnectCount ()=0
 
virtual std::string getName ()=0
 Return name of this endpoint, which becomes the adapter's name. More...
 
virtual int getProtocolSessionsDoneSuccess ()=0
 
virtual int getProtocolSessionsDoneTotal ()=0
 
virtual int getProtocolSessionsLeft ()=0
 
virtual bool initAdapter (BTAdapterRef adapter)=0
 Initialize the given adapter for this endpoint. More...
 
virtual void setAdapter (BTAdapterRef a)=0
 Set the server adapter for this endpoint. More...
 
virtual void setProtocolSessionsLeft (const int v)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from DBTServerTest
static void startAdvertising (const DBTServerTestRef &server, const bool current_exp_advertising_state, const std::string &msg)
 
static void stop (const DBTServerTestRef &server, const std::string &msg)
 
- Static Public Member Functions inherited from DBTEndpoint
static void checkInitializedState (const DBTEndpointRef &endp)
 
static ChangedAdapterSetCallback initChangedAdapterSetListener (const BTManagerRef &manager, std::vector< DBTEndpointRef > endpts)
 
static void myChangedAdapterSetFunc (const bool added, BTAdapterRef &adapter)
 
static void startDiscovery (const BTAdapterRef &adapter, const bool current_exp_discovering_state)
 
static void stopDiscovery (const BTAdapterRef &adapter, const bool current_exp_discovering_state)
 
- Static Public Attributes inherited from DBTEndpoint
static std::vector< DBTEndpointRefcas_endpts
 
static std::mutex mtx_cas_endpts
 

Detailed Description

This peripheral BTRole::Slave test participant works with DBTClient00.

Definition at line 44 of file dbt_server01.hpp.

Constructor & Destructor Documentation

◆ DBTServer01()

DBTServer01::DBTServer01 ( const std::string &  adapterName_,
const jau::EUI48 useAdapter_,
const BTMode  btMode_,
const bool  use_SC_,
const BTSecurityLevel  adapterSecurityLevel_,
const bool  do_disconnect_randomly_ = false 
)
inline

Definition at line 572 of file dbt_server01.hpp.

◆ ~DBTServer01()

DBTServer01::~DBTServer01 ( )
inlineoverride

Definition at line 585 of file dbt_server01.hpp.

Member Function Documentation

◆ getName()

std::string DBTServer01::getName ( )
inlineoverridevirtual

Return name of this endpoint, which becomes the adapter's name.

Implements DBTEndpoint.

Definition at line 590 of file dbt_server01.hpp.

◆ getSecurityLevel()

BTSecurityLevel DBTServer01::getSecurityLevel ( )
inlineoverridevirtual

Implements DBTServerTest.

Definition at line 592 of file dbt_server01.hpp.

◆ setAdapter()

void DBTServer01::setAdapter ( BTAdapterRef  a)
inlineoverridevirtual

Set the server adapter for this endpoint.

This is done in ChangedAdapterSetListener#adapterAdded(BTAdapter) if initAdapter(BTAdapter) returned true.

Parameters
athe associate adapter for this endpoint.

Implements DBTEndpoint.

Definition at line 594 of file dbt_server01.hpp.

◆ getAdapter()

BTAdapterRef DBTServer01::getAdapter ( )
inlineoverridevirtual

Return the adapter for this endpoint.

Implements DBTEndpoint.

Definition at line 598 of file dbt_server01.hpp.

◆ close()

void DBTServer01::close ( const std::string &  msg)
inlineoverridevirtual

Implements DBTEndpoint.

Definition at line 609 of file dbt_server01.hpp.

◆ setProtocolSessionsLeft()

void DBTServer01::setProtocolSessionsLeft ( const int  v)
inlineoverridevirtual

Implements DBTEndpoint.

Definition at line 629 of file dbt_server01.hpp.

◆ getProtocolSessionsLeft()

int DBTServer01::getProtocolSessionsLeft ( )
inlineoverridevirtual

Implements DBTEndpoint.

Definition at line 632 of file dbt_server01.hpp.

◆ getProtocolSessionsDoneTotal()

int DBTServer01::getProtocolSessionsDoneTotal ( )
inlineoverridevirtual

Implements DBTEndpoint.

Definition at line 635 of file dbt_server01.hpp.

◆ getProtocolSessionsDoneSuccess()

int DBTServer01::getProtocolSessionsDoneSuccess ( )
inlineoverridevirtual

Implements DBTEndpoint.

Definition at line 638 of file dbt_server01.hpp.

◆ getDisconnectCount()

int DBTServer01::getDisconnectCount ( )
inlineoverridevirtual

Implements DBTEndpoint.

Definition at line 641 of file dbt_server01.hpp.

◆ startAdvertising()

HCIStatusCode DBTServer01::startAdvertising ( const std::string &  msg)
inlineoverridevirtual

Implements DBTServerTest.

Definition at line 654 of file dbt_server01.hpp.

◆ initAdapter()

bool DBTServer01::initAdapter ( BTAdapterRef  adapter)
inlineoverridevirtual

Initialize the given adapter for this endpoint.

The matching and successfully initialized adapter will become this endpoint's associated adapter via setAdapter(BTAdapter), as performed in in ChangedAdapterSetListener#adapterAdded(BTAdapter).

Parameters
adapterthe potential associated adapter for this endpoint.
Returns
true if successful and associated

Implements DBTEndpoint.

Definition at line 711 of file dbt_server01.hpp.


The documentation for this class was generated from the following file: