Loading tools/rootcanal/Android.bp +11 −2 Original line number Diff line number Diff line Loading @@ -15,11 +15,20 @@ package { cc_defaults { name: "rootcanal_defaults", tidy: true, tidy_checks: [ "-*", "readability-inconsistent-declaration-parameter-name", ], tidy_checks_as_errors: [ "readability-inconsistent-declaration-parameter-name", ], tidy_flags: [ "--header-filter=^((?!BluetoothGeneratedPackets_h|RootCanalGeneratedPackets_h|RootCanalBrEdrBBGeneratedPackets_h).)*$", ], defaults: [ "fluoride_common_options", "gd_defaults", "gd_clang_tidy", "gd_clang_tidy_ignore_android", ], cflags: [ "-fvisibility=hidden", Loading tools/rootcanal/desktop/test_environment.cc +2 −2 Original line number Diff line number Diff line Loading @@ -101,12 +101,12 @@ void TestEnvironment::close() { test_model_.Reset(); } void TestEnvironment::SetUpHciServer(ConnectCallback connection_callback) { void TestEnvironment::SetUpHciServer(ConnectCallback on_connect) { test_channel_.RegisterSendResponse([](const std::string& response) { LOG_INFO("No HCI Response channel: %s", response.c_str()); }); if (!remote_hci_transport_.SetUp(hci_socket_server_, connection_callback)) { if (!remote_hci_transport_.SetUp(hci_socket_server_, on_connect)) { LOG_ERROR("Remote HCI channel SetUp failed."); return; } Loading tools/rootcanal/lib/hci/class_of_device.cc +6 −4 Original line number Diff line number Diff line Loading @@ -67,9 +67,11 @@ std::optional<ClassOfDevice> ClassOfDevice::FromString(const std::string& str) { if (index == 0 && token.length() != 3) { return std::nullopt; } else if (index == 1 && token.length() != 1) { } if (index == 1 && token.length() != 1) { return std::nullopt; } else if (index == 2 && token.length() != 2) { } if (index == 2 && token.length() != 2) { return std::nullopt; } char* temp = nullptr; Loading Loading @@ -102,8 +104,8 @@ bool ClassOfDevice::FromString(const std::string& from, ClassOfDevice& to) { return true; } bool ClassOfDevice::IsValid(const std::string& cod) { return ClassOfDevice::FromString(cod).has_value(); bool ClassOfDevice::IsValid(const std::string& class_of_device) { return ClassOfDevice::FromString(class_of_device).has_value(); } } // namespace hci Loading tools/rootcanal/model/controller/acl_connection_handler.cc +6 −6 Original line number Diff line number Diff line Loading @@ -255,9 +255,9 @@ std::unique_ptr<bluetooth::hci::LeSetCigParametersCompleteBuilder> AclConnectionHandler::SetCigParameters( uint8_t id, uint32_t sdu_interval_m_to_s, uint32_t sdu_interval_s_to_m, bluetooth::hci::ClockAccuracy /* accuracy */, bluetooth::hci::Packing packing, bluetooth::hci::Enable framed, uint16_t max_transport_latency_m_to_s_, uint16_t max_transport_latency_s_to_m_, bluetooth::hci::Packing packing, bluetooth::hci::Enable framing, uint16_t max_transport_latency_m_to_s, uint16_t max_transport_latency_s_to_m, std::vector<bluetooth::hci::CisParametersConfig>& streams) { std::vector<uint16_t> handles; GroupParameters group_parameters{ Loading @@ -265,9 +265,9 @@ AclConnectionHandler::SetCigParameters( .sdu_interval_m_to_s = sdu_interval_m_to_s, .sdu_interval_s_to_m = sdu_interval_s_to_m, .interleaved = packing == bluetooth::hci::Packing::INTERLEAVED, .framed = framed == bluetooth::hci::Enable::ENABLED, .max_transport_latency_m_to_s = max_transport_latency_m_to_s_, .max_transport_latency_s_to_m = max_transport_latency_s_to_m_}; .framed = framing == bluetooth::hci::Enable::ENABLED, .max_transport_latency_m_to_s = max_transport_latency_m_to_s, .max_transport_latency_s_to_m = max_transport_latency_s_to_m}; std::vector<StreamParameters> stream_parameters; for (size_t i = 0; i < streams.size(); i++) { auto handle = GetUnusedHandle(); Loading tools/rootcanal/model/controller/acl_connection_handler.h +2 −2 Original line number Diff line number Diff line Loading @@ -106,8 +106,8 @@ class AclConnectionHandler { bluetooth::hci::ClockAccuracy accuracy, bluetooth::hci::Packing packing, bluetooth::hci::Enable framing, uint16_t max_transport_latency_m_to_s_, uint16_t max_transport_latency_s_to_m_, uint16_t max_transport_latency_m_to_s, uint16_t max_transport_latency_s_to_m, std::vector<bluetooth::hci::CisParametersConfig>& streams); void CreatePendingCis(bluetooth::hci::CreateCisConfig config); Loading Loading
tools/rootcanal/Android.bp +11 −2 Original line number Diff line number Diff line Loading @@ -15,11 +15,20 @@ package { cc_defaults { name: "rootcanal_defaults", tidy: true, tidy_checks: [ "-*", "readability-inconsistent-declaration-parameter-name", ], tidy_checks_as_errors: [ "readability-inconsistent-declaration-parameter-name", ], tidy_flags: [ "--header-filter=^((?!BluetoothGeneratedPackets_h|RootCanalGeneratedPackets_h|RootCanalBrEdrBBGeneratedPackets_h).)*$", ], defaults: [ "fluoride_common_options", "gd_defaults", "gd_clang_tidy", "gd_clang_tidy_ignore_android", ], cflags: [ "-fvisibility=hidden", Loading
tools/rootcanal/desktop/test_environment.cc +2 −2 Original line number Diff line number Diff line Loading @@ -101,12 +101,12 @@ void TestEnvironment::close() { test_model_.Reset(); } void TestEnvironment::SetUpHciServer(ConnectCallback connection_callback) { void TestEnvironment::SetUpHciServer(ConnectCallback on_connect) { test_channel_.RegisterSendResponse([](const std::string& response) { LOG_INFO("No HCI Response channel: %s", response.c_str()); }); if (!remote_hci_transport_.SetUp(hci_socket_server_, connection_callback)) { if (!remote_hci_transport_.SetUp(hci_socket_server_, on_connect)) { LOG_ERROR("Remote HCI channel SetUp failed."); return; } Loading
tools/rootcanal/lib/hci/class_of_device.cc +6 −4 Original line number Diff line number Diff line Loading @@ -67,9 +67,11 @@ std::optional<ClassOfDevice> ClassOfDevice::FromString(const std::string& str) { if (index == 0 && token.length() != 3) { return std::nullopt; } else if (index == 1 && token.length() != 1) { } if (index == 1 && token.length() != 1) { return std::nullopt; } else if (index == 2 && token.length() != 2) { } if (index == 2 && token.length() != 2) { return std::nullopt; } char* temp = nullptr; Loading Loading @@ -102,8 +104,8 @@ bool ClassOfDevice::FromString(const std::string& from, ClassOfDevice& to) { return true; } bool ClassOfDevice::IsValid(const std::string& cod) { return ClassOfDevice::FromString(cod).has_value(); bool ClassOfDevice::IsValid(const std::string& class_of_device) { return ClassOfDevice::FromString(class_of_device).has_value(); } } // namespace hci Loading
tools/rootcanal/model/controller/acl_connection_handler.cc +6 −6 Original line number Diff line number Diff line Loading @@ -255,9 +255,9 @@ std::unique_ptr<bluetooth::hci::LeSetCigParametersCompleteBuilder> AclConnectionHandler::SetCigParameters( uint8_t id, uint32_t sdu_interval_m_to_s, uint32_t sdu_interval_s_to_m, bluetooth::hci::ClockAccuracy /* accuracy */, bluetooth::hci::Packing packing, bluetooth::hci::Enable framed, uint16_t max_transport_latency_m_to_s_, uint16_t max_transport_latency_s_to_m_, bluetooth::hci::Packing packing, bluetooth::hci::Enable framing, uint16_t max_transport_latency_m_to_s, uint16_t max_transport_latency_s_to_m, std::vector<bluetooth::hci::CisParametersConfig>& streams) { std::vector<uint16_t> handles; GroupParameters group_parameters{ Loading @@ -265,9 +265,9 @@ AclConnectionHandler::SetCigParameters( .sdu_interval_m_to_s = sdu_interval_m_to_s, .sdu_interval_s_to_m = sdu_interval_s_to_m, .interleaved = packing == bluetooth::hci::Packing::INTERLEAVED, .framed = framed == bluetooth::hci::Enable::ENABLED, .max_transport_latency_m_to_s = max_transport_latency_m_to_s_, .max_transport_latency_s_to_m = max_transport_latency_s_to_m_}; .framed = framing == bluetooth::hci::Enable::ENABLED, .max_transport_latency_m_to_s = max_transport_latency_m_to_s, .max_transport_latency_s_to_m = max_transport_latency_s_to_m}; std::vector<StreamParameters> stream_parameters; for (size_t i = 0; i < streams.size(); i++) { auto handle = GetUnusedHandle(); Loading
tools/rootcanal/model/controller/acl_connection_handler.h +2 −2 Original line number Diff line number Diff line Loading @@ -106,8 +106,8 @@ class AclConnectionHandler { bluetooth::hci::ClockAccuracy accuracy, bluetooth::hci::Packing packing, bluetooth::hci::Enable framing, uint16_t max_transport_latency_m_to_s_, uint16_t max_transport_latency_s_to_m_, uint16_t max_transport_latency_m_to_s, uint16_t max_transport_latency_s_to_m, std::vector<bluetooth::hci::CisParametersConfig>& streams); void CreatePendingCis(bluetooth::hci::CreateCisConfig config); Loading