Loading system/vendor_libs/test_vendor_lib/desktop/test_environment.cc +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ void TestEnvironment::initialize(std::promise<void> barrier) { SetUpTestChannel(); SetUpHciServer([this](std::shared_ptr<AsyncDataChannel> socket, AsyncDataChannelServer* srv) { test_model_.IncomingHciConnection(socket); test_model_.IncomingHciConnection(socket, controller_properties_file_); srv->StartListening(); }); SetUpLinkLayerServer([this](std::shared_ptr<AsyncDataChannel> socket, Loading system/vendor_libs/test_vendor_lib/desktop/test_environment.h +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ class TestEnvironment { hci_socket_server_(hci_server_port), link_socket_server_(link_server_port), connector_(connector), controller_properties_file_(controller_properties_file), default_commands_file_(default_commands_file), controller_(std::make_shared<test_vendor_lib::DualModeController>( controller_properties_file)) {} Loading @@ -69,6 +70,7 @@ class TestEnvironment { std::shared_ptr<AsyncDataChannelServer> hci_socket_server_; std::shared_ptr<AsyncDataChannelServer> link_socket_server_; std::shared_ptr<AsyncDataChannelConnector> connector_; std::string controller_properties_file_; std::string default_commands_file_; bool test_channel_open_{false}; std::promise<void> barrier_; Loading system/vendor_libs/test_vendor_lib/model/devices/hci_socket_device.cc +3 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,9 @@ using std::vector; namespace test_vendor_lib { HciSocketDevice::HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket) : socket_(socket) { HciSocketDevice::HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename) : DualModeController(properties_filename), socket_(socket) { advertising_interval_ms_ = std::chrono::milliseconds(1000); page_scan_delay_ms_ = std::chrono::milliseconds(600); Loading system/vendor_libs/test_vendor_lib/model/devices/hci_socket_device.h +5 −3 Original line number Diff line number Diff line Loading @@ -33,12 +33,14 @@ using android::net::AsyncDataChannel; class HciSocketDevice : public DualModeController { public: HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket); HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename); ~HciSocketDevice() = default; static std::shared_ptr<HciSocketDevice> Create( std::shared_ptr<AsyncDataChannel> socket) { return std::make_shared<HciSocketDevice>(socket); std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename) { return std::make_shared<HciSocketDevice>(socket, properties_filename); } std::string GetTypeString() const override { Loading system/vendor_libs/test_vendor_lib/model/setup/test_model.cc +3 −3 Original line number Diff line number Diff line Loading @@ -212,9 +212,9 @@ void TestModel::AddRemote(const std::string& server, int port, AddLinkLayerConnection(socket, phy_type); } void TestModel::IncomingHciConnection( std::shared_ptr<AsyncDataChannel> socket) { auto dev = HciSocketDevice::Create(socket); void TestModel::IncomingHciConnection(std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename) { auto dev = HciSocketDevice::Create(socket, properties_filename); size_t index = Add(std::static_pointer_cast<Device>(dev)); std::string addr = "da:4c:10:de:17:"; // Da HCI dev std::stringstream stream; Loading Loading
system/vendor_libs/test_vendor_lib/desktop/test_environment.cc +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ void TestEnvironment::initialize(std::promise<void> barrier) { SetUpTestChannel(); SetUpHciServer([this](std::shared_ptr<AsyncDataChannel> socket, AsyncDataChannelServer* srv) { test_model_.IncomingHciConnection(socket); test_model_.IncomingHciConnection(socket, controller_properties_file_); srv->StartListening(); }); SetUpLinkLayerServer([this](std::shared_ptr<AsyncDataChannel> socket, Loading
system/vendor_libs/test_vendor_lib/desktop/test_environment.h +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ class TestEnvironment { hci_socket_server_(hci_server_port), link_socket_server_(link_server_port), connector_(connector), controller_properties_file_(controller_properties_file), default_commands_file_(default_commands_file), controller_(std::make_shared<test_vendor_lib::DualModeController>( controller_properties_file)) {} Loading @@ -69,6 +70,7 @@ class TestEnvironment { std::shared_ptr<AsyncDataChannelServer> hci_socket_server_; std::shared_ptr<AsyncDataChannelServer> link_socket_server_; std::shared_ptr<AsyncDataChannelConnector> connector_; std::string controller_properties_file_; std::string default_commands_file_; bool test_channel_open_{false}; std::promise<void> barrier_; Loading
system/vendor_libs/test_vendor_lib/model/devices/hci_socket_device.cc +3 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,9 @@ using std::vector; namespace test_vendor_lib { HciSocketDevice::HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket) : socket_(socket) { HciSocketDevice::HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename) : DualModeController(properties_filename), socket_(socket) { advertising_interval_ms_ = std::chrono::milliseconds(1000); page_scan_delay_ms_ = std::chrono::milliseconds(600); Loading
system/vendor_libs/test_vendor_lib/model/devices/hci_socket_device.h +5 −3 Original line number Diff line number Diff line Loading @@ -33,12 +33,14 @@ using android::net::AsyncDataChannel; class HciSocketDevice : public DualModeController { public: HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket); HciSocketDevice(std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename); ~HciSocketDevice() = default; static std::shared_ptr<HciSocketDevice> Create( std::shared_ptr<AsyncDataChannel> socket) { return std::make_shared<HciSocketDevice>(socket); std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename) { return std::make_shared<HciSocketDevice>(socket, properties_filename); } std::string GetTypeString() const override { Loading
system/vendor_libs/test_vendor_lib/model/setup/test_model.cc +3 −3 Original line number Diff line number Diff line Loading @@ -212,9 +212,9 @@ void TestModel::AddRemote(const std::string& server, int port, AddLinkLayerConnection(socket, phy_type); } void TestModel::IncomingHciConnection( std::shared_ptr<AsyncDataChannel> socket) { auto dev = HciSocketDevice::Create(socket); void TestModel::IncomingHciConnection(std::shared_ptr<AsyncDataChannel> socket, std::string properties_filename) { auto dev = HciSocketDevice::Create(socket, properties_filename); size_t index = Add(std::static_pointer_cast<Device>(dev)); std::string addr = "da:4c:10:de:17:"; // Da HCI dev std::stringstream stream; Loading