Lines Matching refs:hci
52 void SetScanType(hci::InquiryScanType scan_type);
54 void SetInquiryMode(hci::InquiryMode mode);
74 hci::InquiryMode inquiry_mode_;
75 hci::InquiryScanType inquiry_scan_type_;
80 void EnqueueCommandComplete(std::unique_ptr<hci::CommandPacketBuilder> command);
81 void EnqueueCommandStatus(std::unique_ptr<hci::CommandPacketBuilder> command);
82 void OnCommandComplete(hci::CommandCompleteView view);
83 void OnCommandStatus(hci::CommandStatusView status);
85 void EnqueueCommandCompleteSync(std::unique_ptr<hci::CommandPacketBuilder> command);
86 void OnCommandCompleteSync(hci::CommandCompleteView view);
88 void OnEvent(hci::EventPacketView view);
92 hci::HciLayer* hci_layer_;
100 void neighbor::InquiryModule::impl::OnCommandCompleteSync(hci::CommandCompleteView view) { in OnCommandCompleteSync()
106 void neighbor::InquiryModule::impl::OnCommandComplete(hci::CommandCompleteView view) { in OnCommandComplete()
108 case hci::OpCode::INQUIRY_CANCEL: { in OnCommandComplete()
109 auto packet = hci::InquiryCancelCompleteView::Create(view); in OnCommandComplete()
111 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
114 case hci::OpCode::PERIODIC_INQUIRY_MODE: { in OnCommandComplete()
115 auto packet = hci::PeriodicInquiryModeCompleteView::Create(view); in OnCommandComplete()
117 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
120 case hci::OpCode::EXIT_PERIODIC_INQUIRY_MODE: { in OnCommandComplete()
121 auto packet = hci::ExitPeriodicInquiryModeCompleteView::Create(view); in OnCommandComplete()
123 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
126 case hci::OpCode::WRITE_INQUIRY_MODE: { in OnCommandComplete()
127 auto packet = hci::WriteInquiryModeCompleteView::Create(view); in OnCommandComplete()
129 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
132 case hci::OpCode::READ_INQUIRY_MODE: { in OnCommandComplete()
133 auto packet = hci::ReadInquiryModeCompleteView::Create(view); in OnCommandComplete()
135 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
139 case hci::OpCode::READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL: { in OnCommandComplete()
140 auto packet = hci::ReadInquiryResponseTransmitPowerLevelCompleteView::Create(view); in OnCommandComplete()
142 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
146 case hci::OpCode::WRITE_INQUIRY_SCAN_ACTIVITY: { in OnCommandComplete()
147 auto packet = hci::WriteInquiryScanActivityCompleteView::Create(view); in OnCommandComplete()
149 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
152 case hci::OpCode::READ_INQUIRY_SCAN_ACTIVITY: { in OnCommandComplete()
153 auto packet = hci::ReadInquiryScanActivityCompleteView::Create(view); in OnCommandComplete()
155 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
160 case hci::OpCode::WRITE_INQUIRY_SCAN_TYPE: { in OnCommandComplete()
161 auto packet = hci::WriteInquiryScanTypeCompleteView::Create(view); in OnCommandComplete()
163 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
166 case hci::OpCode::READ_INQUIRY_SCAN_TYPE: { in OnCommandComplete()
167 auto packet = hci::ReadInquiryScanTypeCompleteView::Create(view); in OnCommandComplete()
169 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
174 LOG_WARN("Unhandled command:%s", hci::OpCodeText(view.GetCommandOpCode()).c_str()); in OnCommandComplete()
179 void neighbor::InquiryModule::impl::OnCommandStatus(hci::CommandStatusView status) { in OnCommandStatus()
180 ASSERT(status.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandStatus()
183 case hci::OpCode::INQUIRY: { in OnCommandStatus()
184 auto packet = hci::InquiryStatusView::Create(status); in OnCommandStatus()
192 LOG_WARN("Unhandled command:%s", hci::OpCodeText(status.GetCommandOpCode()).c_str()); in OnCommandStatus()
197 void neighbor::InquiryModule::impl::OnEvent(hci::EventPacketView view) { in OnEvent()
199 case hci::EventCode::INQUIRY_COMPLETE: { in OnEvent()
200 auto packet = hci::InquiryCompleteView::Create(view); in OnEvent()
208 case hci::EventCode::INQUIRY_RESULT: { in OnEvent()
209 auto packet = hci::InquiryResultView::Create(view); in OnEvent()
215 case hci::EventCode::INQUIRY_RESULT_WITH_RSSI: { in OnEvent()
216 auto packet = hci::InquiryResultWithRssiView::Create(view); in OnEvent()
222 case hci::EventCode::EXTENDED_INQUIRY_RESULT: { in OnEvent()
223 auto packet = hci::ExtendedInquiryResultView::Create(view); in OnEvent()
228 hci::PageScanRepetitionModeText(packet.GetPageScanRepetitionMode()).c_str(), in OnEvent()
236 LOG_ERROR("Unhandled event:%s", hci::EventCodeText(view.GetEventCode()).c_str()); in OnEvent()
248 hci::EventCode::INQUIRY_RESULT, handler_->BindOn(this, &InquiryModule::impl::OnEvent)); in RegisterCallbacks()
250 … hci::EventCode::INQUIRY_RESULT_WITH_RSSI, handler_->BindOn(this, &InquiryModule::impl::OnEvent)); in RegisterCallbacks()
252 … hci::EventCode::EXTENDED_INQUIRY_RESULT, handler_->BindOn(this, &InquiryModule::impl::OnEvent)); in RegisterCallbacks()
254 hci::EventCode::INQUIRY_COMPLETE, handler_->BindOn(this, &InquiryModule::impl::OnEvent)); in RegisterCallbacks()
258 hci_layer_->UnregisterEventHandler(hci::EventCode::INQUIRY_COMPLETE); in UnregisterCallbacks()
259 hci_layer_->UnregisterEventHandler(hci::EventCode::EXTENDED_INQUIRY_RESULT); in UnregisterCallbacks()
260 hci_layer_->UnregisterEventHandler(hci::EventCode::INQUIRY_RESULT_WITH_RSSI); in UnregisterCallbacks()
261 hci_layer_->UnregisterEventHandler(hci::EventCode::INQUIRY_RESULT); in UnregisterCallbacks()
266 void neighbor::InquiryModule::impl::EnqueueCommandComplete(std::unique_ptr<hci::CommandPacketBuilde… in EnqueueCommandComplete()
270 void neighbor::InquiryModule::impl::EnqueueCommandStatus(std::unique_ptr<hci::CommandPacketBuilder>… in EnqueueCommandStatus()
274 void neighbor::InquiryModule::impl::EnqueueCommandCompleteSync(std::unique_ptr<hci::CommandPacketBu… in EnqueueCommandCompleteSync()
288 hci::Lap lap; in StartOneShotInquiry()
296 EnqueueCommandStatus(hci::InquiryBuilder::Create(lap, inquiry_length, num_responses)); in StartOneShotInquiry()
303 EnqueueCommandComplete(hci::InquiryCancelBuilder::Create()); in StopOneShotInquiry()
314 hci::Lap lap; in StartPeriodicInquiry()
323 …hci::PeriodicInquiryModeBuilder::Create(max_delay, min_delay, lap, inquiry_length, num_responses)); in StartPeriodicInquiry()
330 EnqueueCommandComplete(hci::ExitPeriodicInquiryModeBuilder::Create()); in StopPeriodicInquiry()
338 hci_layer_ = module_.GetDependency<hci::HciLayer>(); in Start()
341 EnqueueCommandComplete(hci::ReadInquiryResponseTransmitPowerLevelBuilder::Create()); in Start()
342 EnqueueCommandComplete(hci::ReadInquiryScanActivityBuilder::Create()); in Start()
343 EnqueueCommandComplete(hci::ReadInquiryScanTypeBuilder::Create()); in Start()
344 EnqueueCommandCompleteSync(hci::ReadInquiryModeBuilder::Create()); in Start()
353 hci::InquiryModeText(inquiry_mode_).c_str(), in Stop()
354 hci::InquiryScanTypeText(inquiry_scan_type_).c_str()); in Stop()
359 void neighbor::InquiryModule::impl::SetInquiryMode(hci::InquiryMode mode) { in SetInquiryMode()
360 EnqueueCommandComplete(hci::WriteInquiryModeBuilder::Create(mode)); in SetInquiryMode()
362 LOG_DEBUG("Set inquiry mode:%s", hci::InquiryModeText(mode).c_str()); in SetInquiryMode()
366 …EnqueueCommandComplete(hci::WriteInquiryScanActivityBuilder::Create(params.interval, params.window… in SetScanActivity()
376 void neighbor::InquiryModule::impl::SetScanType(hci::InquiryScanType scan_type) { in SetScanType()
377 EnqueueCommandComplete(hci::WriteInquiryScanTypeBuilder::Create(scan_type)); in SetScanType()
378 LOG_DEBUG("Set scan type:%s", hci::InquiryScanTypeText(scan_type).c_str()); in SetScanType()
462 …&neighbor::InquiryModule::impl::SetScanType, common::Unretained(pimpl_.get()), hci::InquiryScanTyp… in SetInterlacedScan()
467 …&neighbor::InquiryModule::impl::SetScanType, common::Unretained(pimpl_.get()), hci::InquiryScanTyp… in SetStandardScan()
472 …&neighbor::InquiryModule::impl::SetInquiryMode, common::Unretained(pimpl_.get()), hci::InquiryMode… in SetStandardInquiryResultMode()
477 …&neighbor::InquiryModule::impl::SetInquiryMode, common::Unretained(pimpl_.get()), hci::InquiryMode… in SetInquiryWithRssiResultMode()
484 hci::InquiryMode::RSSI_OR_EXTENDED)); in SetExtendedInquiryResultMode()
491 list->add<hci::HciLayer>(); in ListDependencies()