25#ifndef DBT_CLIENT_TEST_HPP_
26#define DBT_CLIENT_TEST_HPP_
66 REQUIRE(
false == adapter->isAdvertising() );
67 REQUIRE( current_exp_discovering_state == adapter->isDiscovering() );
69 REQUIRE( HCIStatusCode::SUCCESS == client->startDiscovery(msg) );
70 while( !adapter->isDiscovering() ) {
73 REQUIRE(
false == adapter->isAdvertising() );
74 REQUIRE(
true == adapter->isDiscovering() );
75 REQUIRE( BTRole::Master == adapter->getRole() );
80 REQUIRE(
false == adapter->isAdvertising() );
81 REQUIRE( current_exp_discovering_state == adapter->isDiscovering() );
82 REQUIRE( BTRole::Master == adapter->getRole() );
84 REQUIRE( HCIStatusCode::SUCCESS == client->stopDiscovery(msg) );
85 while( adapter->isDiscovering() ) {
88 REQUIRE(
false == adapter->isAdvertising() );
89 REQUIRE(
false == adapter->isDiscovering() );
90 REQUIRE( BTRole::Master == adapter->getRole() );
virtual HCIStatusCode startDiscovery(const std::string &msg)=0
static void stopDiscovery(const DBTClientTestRef &client, const bool current_exp_discovering_state, const std::string &msg)
virtual HCIStatusCode stopDiscovery(const std::string &msg)=0
virtual void setDiscoveryPolicy(const DiscoveryPolicy v)=0
Set DiscoveryPolicy.
virtual void setRemoveDevice(const bool v)=0
Set remove device when disconnecting.
static void startDiscovery(const DBTClientTestRef &client, const bool current_exp_discovering_state, const std::string &msg)
virtual void setDisconnectDevice(const bool v)=0
Set disconnect after processing.
std::shared_ptr< DBTClientTest > DBTClientTestRef
DiscoveryPolicy
Discovery policy defines the BTAdapter discovery mode after connecting a remote BTDevice:
std::shared_ptr< BTAdapter > BTAdapterRef
HCIStatusCode
BT Core Spec v5.2: Vol 1, Part F Controller Error Codes: 1.3 List of Error Codes.
bool sleep_for(const fraction_timespec &relative_time, const bool monotonic=true, const bool ignore_irq=true) noexcept
sleep_for causes the current thread to block until a specific amount of time has passed.