Loading tools/rootcanal/include/hci/address.h +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ struct fmt::formatter<bluetooth::hci::Address> { // Check if reached the end of the range: if (it != end && *it != '}') { ctx.on_error("invalid format"); throw_format_error("invalid format"); } // Return an iterator past the end of the parsed range: Loading tools/rootcanal/include/hci/address_with_type.h +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ struct fmt::formatter<bluetooth::hci::AddressWithType> { // Check if reached the end of the range: if (it != end && *it != '}') { ctx.on_error("invalid format"); throw_format_error("invalid format"); } // Return an iterator past the end of the parsed range: Loading tools/rootcanal/model/controller/dual_mode_controller.cc +38 −19 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,8 @@ void DualModeController::CentralLinkKey(CommandView command) { ASSERT(command_view.IsValid()); DEBUG(id_, "<< Central Link Key"); DEBUG(id_, " key_flag={}", command_view.GetKeyFlag()); DEBUG(id_, " key_flag={}", bluetooth::hci::KeyFlagText(command_view.GetKeyFlag())); uint8_t key_flag = static_cast<uint8_t>(command_view.GetKeyFlag()); auto status = link_layer_controller_.CentralLinkKey(key_flag); Loading @@ -1165,7 +1166,8 @@ void DualModeController::WriteAuthenticationEnable(CommandView command) { DEBUG(id_, "<< Write Authentication Enable"); DEBUG(id_, " authentication_enable={}", command_view.GetAuthenticationEnable()); bluetooth::hci::AuthenticationEnableText( command_view.GetAuthenticationEnable())); link_layer_controller_.SetAuthenticationEnable( command_view.GetAuthenticationEnable()); Loading Loading @@ -2854,7 +2856,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Enable"); DEBUG(id_, " enable={}", subcommand_view.GetApcfEnable()); DEBUG(id_, " enable={}", bluetooth::hci::EnableText(subcommand_view.GetApcfEnable())); ErrorCode status = link_layer_controller_.LeApcfEnable( subcommand_view.GetApcfEnable() == bluetooth::hci::Enable::ENABLED); Loading @@ -2869,7 +2872,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Set Filtering Parameters"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); ErrorCode status = ErrorCode::INVALID_HCI_COMMAND_PARAMETERS; uint8_t apcf_available_spaces = 0; Loading Loading @@ -2914,7 +2918,8 @@ void DualModeController::LeApcf(CommandView command) { break; } default: INFO(id_, "unknown apcf action {}", subcommand_view.GetApcfAction()); INFO(id_, "unknown apcf action {}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); break; } Loading @@ -2930,7 +2935,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Broadcaster Address"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); ErrorCode status = ErrorCode::INVALID_HCI_COMMAND_PARAMETERS; uint8_t apcf_available_spaces = 0; Loading Loading @@ -2975,7 +2981,8 @@ void DualModeController::LeApcf(CommandView command) { break; } default: INFO(id_, "unknown apcf action {}", subcommand_view.GetApcfAction()); INFO(id_, "unknown apcf action {}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); break; } Loading @@ -2991,7 +2998,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Service UUID"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfServiceUuid( Loading @@ -3009,7 +3017,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Service Solicitation UUID"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfServiceSolicitationUuid( Loading @@ -3027,7 +3036,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Local Name"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfLocalName( Loading @@ -3044,7 +3054,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Manufacturer Data"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfManufacturerData( Loading @@ -3061,7 +3072,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Service Data"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfServiceData( Loading @@ -3078,7 +3090,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF AD Type Filter"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfAdTypeFilter( Loading @@ -3105,7 +3118,8 @@ void DualModeController::LeApcf(CommandView command) { break; } default: FATAL(id_, "unknown APCF opcode {}", command_view.GetApcfOpcode()); FATAL(id_, "unknown APCF opcode {}", static_cast<uint8_t>(command_view.GetApcfOpcode())); } } Loading Loading @@ -3255,14 +3269,16 @@ void DualModeController::CsrReadVarid(CsrVarid varid, break; default: INFO(id_, "Unsupported read of CSR varid 0x{:04x}", varid); INFO(id_, "Unsupported read of CSR varid 0x{:04x}", static_cast<uint16_t>(varid)); break; } } void DualModeController::CsrWriteVarid( CsrVarid varid, std::vector<uint8_t> const& /*value*/) const { INFO(id_, "Unsupported write of CSR varid 0x{:04x}", varid); INFO(id_, "Unsupported write of CSR varid 0x{:04x}", static_cast<uint16_t>(varid)); } void DualModeController::CsrReadPskey(CsrPskey pskey, Loading @@ -3286,7 +3302,8 @@ void DualModeController::CsrReadPskey(CsrPskey pskey, break; default: INFO(id_, "Unsupported read of CSR pskey 0x{:04x}", pskey); INFO(id_, "Unsupported read of CSR pskey 0x{:04x}", static_cast<uint16_t>(pskey)); break; } } Loading @@ -3305,7 +3322,8 @@ void DualModeController::CsrWritePskey(CsrPskey pskey, break; default: INFO(id_, "Unsupported write of CSR pskey 0x{:04x}", pskey); INFO(id_, "Unsupported write of CSR pskey 0x{:04x}", static_cast<uint16_t>(pskey)); break; } } Loading Loading @@ -3555,7 +3573,8 @@ void DualModeController::WriteLoopbackMode(CommandView command) { ASSERT(command_view.IsValid()); DEBUG(id_, "<< Write Loopback Mode"); DEBUG(id_, " loopback_mode={}", command_view.GetLoopbackMode()); DEBUG(id_, " loopback_mode={}", bluetooth::hci::LoopbackModeText(command_view.GetLoopbackMode())); loopback_mode_ = command_view.GetLoopbackMode(); // ACL channel Loading tools/rootcanal/model/controller/link_layer_controller.cc +4 −2 Original line number Diff line number Diff line Loading @@ -3378,8 +3378,10 @@ void LinkLayerController::ScanIncomingLeExtendedAdvertisingPdu( if (resolved_advertising_address != advertising_address) { DEBUG(id_, "Resolved the advertising address {} to {}", advertising_address, advertising_address.GetAddressType(), resolved_advertising_address, resolved_advertising_address.GetAddressType()); bluetooth::hci::AddressTypeText(advertising_address.GetAddressType()), resolved_advertising_address, bluetooth::hci::AddressTypeText( resolved_advertising_address.GetAddressType())); } // Vol 6, Part B § 4.3.3 Scanner filter policy Loading tools/rootcanal/model/devices/scripted_beacon.cc +3 −2 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ bool has_time_elapsed(steady_clock::time_point time_point) { static void populate_event(PlaybackEvent* event, PlaybackEvent::PlaybackEventType type) { INFO("Adding event: {}", type); INFO("Adding event: {}", PlaybackEvent::PlaybackEventType_Name(type)); event->set_type(type); event->set_secs_since_epoch(system_clock::now().time_since_epoch().count()); } Loading @@ -111,7 +111,8 @@ void ScriptedBeacon::set_state(PlaybackEvent::PlaybackEventType state) { events_ostream_.open(events_file_, std::ios::out | std::ios::binary | std::ios::trunc); if (!events_ostream_.is_open()) { INFO("Events file not opened yet, for event: {}", state); INFO("Events file not opened yet, for event: {}", PlaybackEvent::PlaybackEventType_Name(state)); return; } } Loading Loading
tools/rootcanal/include/hci/address.h +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ struct fmt::formatter<bluetooth::hci::Address> { // Check if reached the end of the range: if (it != end && *it != '}') { ctx.on_error("invalid format"); throw_format_error("invalid format"); } // Return an iterator past the end of the parsed range: Loading
tools/rootcanal/include/hci/address_with_type.h +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ struct fmt::formatter<bluetooth::hci::AddressWithType> { // Check if reached the end of the range: if (it != end && *it != '}') { ctx.on_error("invalid format"); throw_format_error("invalid format"); } // Return an iterator past the end of the parsed range: Loading
tools/rootcanal/model/controller/dual_mode_controller.cc +38 −19 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,8 @@ void DualModeController::CentralLinkKey(CommandView command) { ASSERT(command_view.IsValid()); DEBUG(id_, "<< Central Link Key"); DEBUG(id_, " key_flag={}", command_view.GetKeyFlag()); DEBUG(id_, " key_flag={}", bluetooth::hci::KeyFlagText(command_view.GetKeyFlag())); uint8_t key_flag = static_cast<uint8_t>(command_view.GetKeyFlag()); auto status = link_layer_controller_.CentralLinkKey(key_flag); Loading @@ -1165,7 +1166,8 @@ void DualModeController::WriteAuthenticationEnable(CommandView command) { DEBUG(id_, "<< Write Authentication Enable"); DEBUG(id_, " authentication_enable={}", command_view.GetAuthenticationEnable()); bluetooth::hci::AuthenticationEnableText( command_view.GetAuthenticationEnable())); link_layer_controller_.SetAuthenticationEnable( command_view.GetAuthenticationEnable()); Loading Loading @@ -2854,7 +2856,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Enable"); DEBUG(id_, " enable={}", subcommand_view.GetApcfEnable()); DEBUG(id_, " enable={}", bluetooth::hci::EnableText(subcommand_view.GetApcfEnable())); ErrorCode status = link_layer_controller_.LeApcfEnable( subcommand_view.GetApcfEnable() == bluetooth::hci::Enable::ENABLED); Loading @@ -2869,7 +2872,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Set Filtering Parameters"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); ErrorCode status = ErrorCode::INVALID_HCI_COMMAND_PARAMETERS; uint8_t apcf_available_spaces = 0; Loading Loading @@ -2914,7 +2918,8 @@ void DualModeController::LeApcf(CommandView command) { break; } default: INFO(id_, "unknown apcf action {}", subcommand_view.GetApcfAction()); INFO(id_, "unknown apcf action {}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); break; } Loading @@ -2930,7 +2935,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Broadcaster Address"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); ErrorCode status = ErrorCode::INVALID_HCI_COMMAND_PARAMETERS; uint8_t apcf_available_spaces = 0; Loading Loading @@ -2975,7 +2981,8 @@ void DualModeController::LeApcf(CommandView command) { break; } default: INFO(id_, "unknown apcf action {}", subcommand_view.GetApcfAction()); INFO(id_, "unknown apcf action {}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); break; } Loading @@ -2991,7 +2998,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Service UUID"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfServiceUuid( Loading @@ -3009,7 +3017,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Service Solicitation UUID"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfServiceSolicitationUuid( Loading @@ -3027,7 +3036,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Local Name"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfLocalName( Loading @@ -3044,7 +3054,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Manufacturer Data"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfManufacturerData( Loading @@ -3061,7 +3072,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF Service Data"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfServiceData( Loading @@ -3078,7 +3090,8 @@ void DualModeController::LeApcf(CommandView command) { ASSERT(subcommand_view.IsValid()); DEBUG(id_, "<< LE APCF AD Type Filter"); DEBUG(id_, " action={}", subcommand_view.GetApcfAction()); DEBUG(id_, " action={}", bluetooth::hci::ApcfActionText(subcommand_view.GetApcfAction())); uint8_t apcf_available_spaces = 0; ErrorCode status = link_layer_controller_.LeApcfAdTypeFilter( Loading @@ -3105,7 +3118,8 @@ void DualModeController::LeApcf(CommandView command) { break; } default: FATAL(id_, "unknown APCF opcode {}", command_view.GetApcfOpcode()); FATAL(id_, "unknown APCF opcode {}", static_cast<uint8_t>(command_view.GetApcfOpcode())); } } Loading Loading @@ -3255,14 +3269,16 @@ void DualModeController::CsrReadVarid(CsrVarid varid, break; default: INFO(id_, "Unsupported read of CSR varid 0x{:04x}", varid); INFO(id_, "Unsupported read of CSR varid 0x{:04x}", static_cast<uint16_t>(varid)); break; } } void DualModeController::CsrWriteVarid( CsrVarid varid, std::vector<uint8_t> const& /*value*/) const { INFO(id_, "Unsupported write of CSR varid 0x{:04x}", varid); INFO(id_, "Unsupported write of CSR varid 0x{:04x}", static_cast<uint16_t>(varid)); } void DualModeController::CsrReadPskey(CsrPskey pskey, Loading @@ -3286,7 +3302,8 @@ void DualModeController::CsrReadPskey(CsrPskey pskey, break; default: INFO(id_, "Unsupported read of CSR pskey 0x{:04x}", pskey); INFO(id_, "Unsupported read of CSR pskey 0x{:04x}", static_cast<uint16_t>(pskey)); break; } } Loading @@ -3305,7 +3322,8 @@ void DualModeController::CsrWritePskey(CsrPskey pskey, break; default: INFO(id_, "Unsupported write of CSR pskey 0x{:04x}", pskey); INFO(id_, "Unsupported write of CSR pskey 0x{:04x}", static_cast<uint16_t>(pskey)); break; } } Loading Loading @@ -3555,7 +3573,8 @@ void DualModeController::WriteLoopbackMode(CommandView command) { ASSERT(command_view.IsValid()); DEBUG(id_, "<< Write Loopback Mode"); DEBUG(id_, " loopback_mode={}", command_view.GetLoopbackMode()); DEBUG(id_, " loopback_mode={}", bluetooth::hci::LoopbackModeText(command_view.GetLoopbackMode())); loopback_mode_ = command_view.GetLoopbackMode(); // ACL channel Loading
tools/rootcanal/model/controller/link_layer_controller.cc +4 −2 Original line number Diff line number Diff line Loading @@ -3378,8 +3378,10 @@ void LinkLayerController::ScanIncomingLeExtendedAdvertisingPdu( if (resolved_advertising_address != advertising_address) { DEBUG(id_, "Resolved the advertising address {} to {}", advertising_address, advertising_address.GetAddressType(), resolved_advertising_address, resolved_advertising_address.GetAddressType()); bluetooth::hci::AddressTypeText(advertising_address.GetAddressType()), resolved_advertising_address, bluetooth::hci::AddressTypeText( resolved_advertising_address.GetAddressType())); } // Vol 6, Part B § 4.3.3 Scanner filter policy Loading
tools/rootcanal/model/devices/scripted_beacon.cc +3 −2 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ bool has_time_elapsed(steady_clock::time_point time_point) { static void populate_event(PlaybackEvent* event, PlaybackEvent::PlaybackEventType type) { INFO("Adding event: {}", type); INFO("Adding event: {}", PlaybackEvent::PlaybackEventType_Name(type)); event->set_type(type); event->set_secs_since_epoch(system_clock::now().time_since_epoch().count()); } Loading @@ -111,7 +111,8 @@ void ScriptedBeacon::set_state(PlaybackEvent::PlaybackEventType state) { events_ostream_.open(events_file_, std::ios::out | std::ios::binary | std::ios::trunc); if (!events_ostream_.is_open()) { INFO("Events file not opened yet, for event: {}", state); INFO("Events file not opened yet, for event: {}", PlaybackEvent::PlaybackEventType_Name(state)); return; } } Loading