Lines Matching full:rootcanal

45 namespace rootcanal::log {  namespace
52 void IncrTx(uint32_t send_id, rootcanal::Phy::Type phy_type);
53 void IncrRx(uint32_t receive_id, rootcanal::Phy::Type phy_type);
56 using namespace rootcanal;
58 using rootcanal::PhyDevice;
59 using rootcanal::PhyLayer;
77 const std::list<std::shared_ptr<rootcanal::PhyDevice>> &phy_devices) { in Contains()
102 class SimTestModel : public rootcanal::TestModel {
104 using rootcanal::TestModel::TestModel;
106 std::unique_ptr<rootcanal::PhyLayer> CreatePhyLayer( in CreatePhyLayer()
107 PhyLayer::Identifier id, rootcanal::Phy::Type type) override { in CreatePhyLayer()
116 std::shared_ptr<rootcanal::AsyncManager> gAsyncManager;
117 rootcanal::AsyncUserId gSocketUserId{};
119 std::shared_ptr<rootcanal::configuration::Controller> controller_proto_;
123 std::unique_ptr<rootcanal::TestCommandHandler> gTestChannel;
124 std::unique_ptr<rootcanal::TestChannelTransport> gTestChannelTransport;
139 gTestChannel = std::make_unique<rootcanal::TestCommandHandler>(*gTestModel); in SetUpTestChannel()
141 gTestChannelTransport = std::make_unique<rootcanal::TestChannelTransport>(); in SetUpTestChannel()
162 rootcanal::TestChannelTransport::SendResponse( in SetUpTestChannel()
169 rootcanal::TestChannelTransport::SendResponse(conn_fd, response); in SetUpTestChannel()
193 // Initialize the rootcanal library.
199 rootcanal::log::SetLogColorEnable(false); in Start()
203 controller_proto_ = std::make_shared<rootcanal::configuration::Controller>( in Start()
207 // netsim is recreated with a new (uninitialized) Rootcanal device. However in Start()
209 // solution is for Rootcanal to recognize that it is receiving HCI commands in Start()
215 gAsyncManager = std::make_shared<rootcanal::AsyncManager>(); in Start()
220 std::bind(&rootcanal::AsyncManager::GetNextUserId, gAsyncManager), in Start()
221 std::bind(&rootcanal::AsyncManager::ExecAsync, gAsyncManager, in Start()
224 std::bind(&rootcanal::AsyncManager::ExecAsyncPeriodically, gAsyncManager, in Start()
227 std::bind(&rootcanal::AsyncManager::CancelAsyncTasksFromUser, in Start()
229 std::bind(&rootcanal::AsyncManager::CancelAsyncTask, gAsyncManager, in Start()
232 rootcanal::Phy::Type /* phy_type */) { return nullptr; }); in Start()
241 phy_classic_index_ = gTestModel->AddPhy(rootcanal::Phy::Type::BR_EDR); in Start()
242 phy_low_energy_index_ = gTestModel->AddPhy(rootcanal::Phy::Type::LOW_ENERGY); in Start()
246 auto testCommands = rootcanal::TestCommandHandler(*gTestModel); in Start()
281 std::shared_ptr<rootcanal::configuration::Controller> controller_proto;
282 std::unique_ptr<rootcanal::ControllerProperties> controller_properties;
288 std::shared_ptr<rootcanal::configuration::Controller> controller_proto, in ChipInfo()
289 std::unique_ptr<rootcanal::ControllerProperties> controller_properties) in ChipInfo()
336 // rootcanal will call HciPacketTransport::Close(). in Remove()
347 std::shared_ptr<rootcanal::configuration::Controller> controller_proto = in Add()
351 rootcanal::configuration::Controller custom_proto; in Add()
354 BtsLogInfo("chip_id: %d has rootcanal Controller configuration: %s", in Add()
358 // netsim is recreated with a new (uninitialized) Rootcanal device. However in Add()
360 // solution is for Rootcanal to recognize that it is receiving HCI commands in Add()
366 std::make_shared<rootcanal::configuration::Controller>(custom_proto); in Add()
368 std::unique_ptr<rootcanal::ControllerProperties> controller_properties = in Add()
369 std::make_unique<rootcanal::ControllerProperties>(*controller_proto); in Add()
372 std::make_shared<rootcanal::HciDevice>(transport, *controller_properties); in Add()
376 [](uint32_t rootcanal_id, rootcanal::InvalidPacketReason reason, in Add()
389 address_option = rootcanal::Address::FromString(address_string); in Add()
440 std::array<uint8_t, rootcanal::Address::kLength> address) { in SetRustDeviceAddress()
441 uint8_t addr[rootcanal::Address::kLength]; in SetRustDeviceAddress()
442 std::memcpy(addr, address.data(), rootcanal::Address::kLength); in SetRustDeviceAddress()
443 gTestModel->SetDeviceAddress(rootcanal_id, rootcanal::Address(addr)); in SetRustDeviceAddress()
446 void IncrTx(uint32_t id, rootcanal::Phy::Type phy_type) { in IncrTx()
449 if (phy_type == rootcanal::Phy::Type::LOW_ENERGY) { in IncrTx()
457 void IncrRx(uint32_t id, rootcanal::Phy::Type phy_type) { in IncrRx()
460 if (phy_type == rootcanal::Phy::Type::LOW_ENERGY) { in IncrRx()