49TEST_CASE(
"BTManager Bringup Trial 00.1",
"[trial][BTManager][bringup]" ) {
52 jau::fprintf_td(stderr,
"Direct-BT Native Version %s (API %s)\n", DIRECT_BT_VERSION, DIRECT_BT_VERSION_API);
61 jau::fprintf_td(stderr,
"%u: %s\n", i, adapters[i]->toString().c_str());
63 REQUIRE( adapters.
size() >= 1 );
68 REQUIRE(
false == a->isInitialized() );
69 REQUIRE(
false == a->isPowered() );
70 REQUIRE( BTRole::Master == a->getRole() );
71 REQUIRE( 4 <= a->getBTMajorVersion() );
83TEST_CASE(
"Server StartStop and SwitchRole Trial 00.2",
"[trial][startstop][switchrole]" ) {
92 jau::fprintf_td(stderr,
"%u: %s\n", i, adapters[i]->toString().c_str());
94 REQUIRE( adapters.
size() >= 1 );
96 REQUIRE( manager->getAdapterCount() >= 1 );
98 const std::string serverName =
"TestDBTCS00-S-T10";
99 std::shared_ptr<DBTServer01> server = std::make_shared<DBTServer01>(serverName, EUI48::ALL_DEVICE, BTMode::DUAL,
100 true , BTSecurityLevel::NONE,
false );
101 server->setProtocolSessionsLeft(1);
122 adapter->removeAllStatusListener();
135TEST_CASE(
"BTManager::close() Trial 00.X",
"[trial][btmanager_shutdown]" ) {
void cleanupTest()
Ensure.
void setupTest(const jau::fraction_i64 timeout=0_s)
Ensure.
static BaseDBTClientServer & get(const bool btmanager_hold_and_close=true)
static void checkInitializedState(const DBTEndpointRef &endp)
static void stopDiscovery(const BTAdapterRef &adapter, const bool current_exp_discovering_state)
static ChangedAdapterSetCallback initChangedAdapterSetListener(const BTManagerRef &manager, std::vector< DBTEndpointRef > endpts)
static void startDiscovery(const BTAdapterRef &adapter, const bool current_exp_discovering_state)
virtual HCIStatusCode startAdvertising(const std::string &msg)=0
static void stop(const DBTServerTestRef &server, const std::string &msg)
Implementation of a dynamic linear array storage, aka vector.
constexpr size_type size() const noexcept
Like std::vector::size().
Class template jau::function is a general-purpose static-polymorphic function wrapper.
static void myChangedAdapterSetFunc(const bool added, std::shared_ptr< BTAdapter > &adapter)
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.
uint_fast32_t nsize_t
Natural 'size_t' alternative using uint_fast32_t as its natural sized type.
std::string get_platform_info(std::string &sb) noexcept
int fprintf_td(const uint64_t elapsed_ms, FILE *stream, const char *format,...) noexcept
Convenient fprintf() invocation, prepending the given elapsed_ms timestamp.
static BaseDBTClientServer & base_test_framework
TEST_CASE("BTManager Bringup Trial 00.1", "[trial][BTManager][bringup]")
Testing BTManager bring up: