Loading system/vendor_libs/test_vendor_lib/model/controller/acl_connection_handler.cc +9 −0 Original line number Diff line number Diff line Loading @@ -522,4 +522,13 @@ ScoLinkParameters AclConnectionHandler::GetScoLinkParameters(bluetooth::hci::Add return {}; } std::vector<uint16_t> AclConnectionHandler::GetAclHandles() const { std::vector<uint16_t> keys; for (const auto& pair : acl_connections_) { keys.push_back(pair.first); } return keys; } } // namespace test_vendor_lib system/vendor_libs/test_vendor_lib/model/controller/acl_connection_handler.h +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ class AclConnectionHandler { StreamParameters GetStreamParameters(uint16_t handle) const; GroupParameters GetGroupParameters(uint8_t id) const; std::vector<uint16_t> GetAclHandles() const; private: std::unordered_map<uint16_t, AclConnection> acl_connections_; std::unordered_map<uint16_t, ScoConnection> sco_connections_; Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ void DualModeController::TimerTick() { link_layer_controller_.TimerTick(); } void DualModeController::Close() { link_layer_controller_.Close(); Device::Close(); } void DualModeController::SendCommandCompleteUnknownOpCodeEvent(uint16_t command_opcode) const { std::unique_ptr<bluetooth::packet::RawBuilder> raw_builder_ptr = std::make_unique<bluetooth::packet::RawBuilder>(); Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,8 @@ class DualModeController : public Device { virtual void TimerTick() override; virtual void Close() override; // Route commands and data from the stack. void HandleAcl(std::shared_ptr<std::vector<uint8_t>> acl_packet); void HandleCommand(std::shared_ptr<std::vector<uint8_t>> command_packet); Loading system/vendor_libs/test_vendor_lib/model/controller/link_layer_controller.cc +7 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ namespace test_vendor_lib { constexpr uint16_t kNumCommandPackets = 0x01; constexpr milliseconds kNoDelayMs(1); constexpr milliseconds kNoDelayMs(0); constexpr milliseconds kShortDelayMs(5); constexpr milliseconds kLongDelayMs(200); Loading Loading @@ -2051,6 +2051,12 @@ void LinkLayerController::TimerTick() { LeAdvertising(); } void LinkLayerController::Close() { for (auto handle : connections_.GetAclHandles()) { Disconnect(handle, static_cast<uint8_t>(ErrorCode::CONNECTION_TIMEOUT)); } } void LinkLayerController::LeAdvertising() { steady_clock::time_point now = steady_clock::now(); for (auto& advertiser : advertisers_) { Loading Loading
system/vendor_libs/test_vendor_lib/model/controller/acl_connection_handler.cc +9 −0 Original line number Diff line number Diff line Loading @@ -522,4 +522,13 @@ ScoLinkParameters AclConnectionHandler::GetScoLinkParameters(bluetooth::hci::Add return {}; } std::vector<uint16_t> AclConnectionHandler::GetAclHandles() const { std::vector<uint16_t> keys; for (const auto& pair : acl_connections_) { keys.push_back(pair.first); } return keys; } } // namespace test_vendor_lib
system/vendor_libs/test_vendor_lib/model/controller/acl_connection_handler.h +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ class AclConnectionHandler { StreamParameters GetStreamParameters(uint16_t handle) const; GroupParameters GetGroupParameters(uint8_t id) const; std::vector<uint16_t> GetAclHandles() const; private: std::unordered_map<uint16_t, AclConnection> acl_connections_; std::unordered_map<uint16_t, ScoConnection> sco_connections_; Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ void DualModeController::TimerTick() { link_layer_controller_.TimerTick(); } void DualModeController::Close() { link_layer_controller_.Close(); Device::Close(); } void DualModeController::SendCommandCompleteUnknownOpCodeEvent(uint16_t command_opcode) const { std::unique_ptr<bluetooth::packet::RawBuilder> raw_builder_ptr = std::make_unique<bluetooth::packet::RawBuilder>(); Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.h +2 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,8 @@ class DualModeController : public Device { virtual void TimerTick() override; virtual void Close() override; // Route commands and data from the stack. void HandleAcl(std::shared_ptr<std::vector<uint8_t>> acl_packet); void HandleCommand(std::shared_ptr<std::vector<uint8_t>> command_packet); Loading
system/vendor_libs/test_vendor_lib/model/controller/link_layer_controller.cc +7 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ namespace test_vendor_lib { constexpr uint16_t kNumCommandPackets = 0x01; constexpr milliseconds kNoDelayMs(1); constexpr milliseconds kNoDelayMs(0); constexpr milliseconds kShortDelayMs(5); constexpr milliseconds kLongDelayMs(200); Loading Loading @@ -2051,6 +2051,12 @@ void LinkLayerController::TimerTick() { LeAdvertising(); } void LinkLayerController::Close() { for (auto handle : connections_.GetAclHandles()) { Disconnect(handle, static_cast<uint8_t>(ErrorCode::CONNECTION_TIMEOUT)); } } void LinkLayerController::LeAdvertising() { steady_clock::time_point now = steady_clock::now(); for (auto& advertiser : advertisers_) { Loading