25#ifndef DBT_BASE_CLIENY_SERVER_HPP_
26#define DBT_BASE_CLIENY_SERVER_HPP_
40 static constexpr const bool debug =
false;
51 fprintf(stderr,
"\n***** DBTTrial Error: Timeout %s sec -> abort *****\n\n", test_timeout.
to_string(
true).c_str());
59 setenv(
"direct_bt.debug",
"true", 1 );
66 if( btmanager_hold_and_close ) {
73 if(
nullptr != manager ) {
101 a->removeAllStatusListener();
102 a->stopAdvertising();
104 REQUIRE( a->setPowered(
false) );
106 mngr->removeAllChangedAdapterSetCallbacks();
118 timeout_timer.
stop();
119 test_timeout = timeout;
121 if( !timeout.is_zero() ) {
134 timeout_timer.
stop();
~BaseDBTClientServer() noexcept
Ensure.
bool is_timedout() const noexcept
void cleanupTest()
Ensure.
void setupTest(const jau::fraction_i64 timeout=0_s)
Ensure.
jau::fraction_i64 get_timeout_value() const
static BaseDBTClientServer & get(const bool btmanager_hold_and_close=true)
static bool mkdirKeyFolder()
static bool rmKeyFolder()
Implementation of a dynamic linear array storage, aka vector.
std::string to_string(const bool show_double=false) const noexcept
Returns a string representation of this fraction.
A simple timer for timeout and interval applications, using one dedicated service_runner thread per i...
bool start(const fraction_i64 &duration_, Timer_func tofunc) noexcept
Start the timer with given user Timer_func function and initial duration.
bool stop() noexcept
Stop timer, see service_runner::stop()
bool shall_stop() const noexcept
Returns true if timer shall stop.
std::shared_ptr< BTManager > BTManagerRef
void clear() noexcept
Clears internal list.
std::shared_ptr< BTAdapter > BTAdapterRef
Entry * get(const EUI48 &addr, const std::string &name, AddressNameEntryMatchFunc m) noexcept
Returns a matching BTSecurityRegistry::Entry with the given addr and/or name.
jau::function< R(A...)> bind_member(C1 *base, R(C0::*mfunc)(A...)) noexcept
Bind given class instance and non-void member function to an anonymous function using func_member_tar...
void clearProcessedDevices() noexcept
Clears internal list.
void clearWaitForDevices() noexcept
Clears internal list.