Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +11 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ DualModeController::DualModeController(const std::string& properties_filename, u SET_HANDLER(OpCode::READ_LOCAL_VERSION_INFORMATION, HciReadLocalVersionInformation); SET_HANDLER(OpCode::READ_BD_ADDR, HciReadBdAddr); SET_HANDLER(OpCode::READ_LOCAL_SUPPORTED_COMMANDS, HciReadLocalSupportedCommands); SET_HANDLER(OpCode::READ_LOCAL_SUPPORTED_FEATURES, HciReadLocalSupportedFeatures); SET_HANDLER(OpCode::READ_LOCAL_SUPPORTED_CODECS, HciReadLocalSupportedCodecs); SET_HANDLER(OpCode::READ_LOCAL_EXTENDED_FEATURES, HciReadLocalExtendedFeatures); SET_HANDLER(OpCode::READ_REMOTE_EXTENDED_FEATURES, HciReadRemoteExtendedFeatures); Loading Loading @@ -367,6 +369,15 @@ void DualModeController::HciReadLocalSupportedCommands(packets::PacketView<true> send_event_(command_complete->ToVector()); } void DualModeController::HciReadLocalSupportedFeatures( packets::PacketView<true> args) { CHECK(args.size() == 0) << __func__ << " size=" << args.size(); std::shared_ptr<packets::EventPacketBuilder> command_complete = packets:: EventPacketBuilder::CreateCommandCompleteReadLocalSupportedFeatures( hci::Status::SUCCESS, properties_.GetSupportedFeatures()); send_event_(command_complete->ToVector()); } void DualModeController::HciReadLocalSupportedCodecs(packets::PacketView<true> args) { CHECK(args.size() == 0) << __func__ << " size=" << args.size(); std::shared_ptr<packets::EventPacketBuilder> command_complete = Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.h +3 −0 Original line number Diff line number Diff line Loading @@ -265,6 +265,9 @@ class DualModeController : public Device { // 7.4.2 void HciReadLocalSupportedCommands(packets::PacketView<true> args); // 7.4.3 void HciReadLocalSupportedFeatures(packets::PacketView<true> args); // 7.4.4 void HciReadLocalExtendedFeatures(packets::PacketView<true> args); Loading system/vendor_libs/test_vendor_lib/packets/hci/event_packet_builder.cc +13 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,19 @@ std::unique_ptr<EventPacketBuilder> EventPacketBuilder::CreateCommandCompleteRea return evt_ptr; } // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.3 std::unique_ptr<EventPacketBuilder> EventPacketBuilder::CreateCommandCompleteReadLocalSupportedFeatures( hci::Status status, uint64_t supported_features) { std::unique_ptr<EventPacketBuilder> evt_ptr = EventPacketBuilder::CreateCommandCompleteOnlyStatusEvent( OpCode::READ_LOCAL_SUPPORTED_FEATURES, status); CHECK(evt_ptr->AddPayloadOctets8(supported_features)); return evt_ptr; } // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.4 std::unique_ptr<EventPacketBuilder> EventPacketBuilder::CreateCommandCompleteReadLocalExtendedFeatures( hci::Status status, uint8_t page_number, uint8_t maximum_page_number, uint64_t extended_lmp_features) { Loading system/vendor_libs/test_vendor_lib/packets/hci/event_packet_builder.h +5 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,11 @@ class EventPacketBuilder : public HciPacketBuilder { static std::unique_ptr<EventPacketBuilder> CreateCommandCompleteReadLocalSupportedCommands( hci::Status status, const std::vector<uint8_t>& supported_commands); // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.3 static std::unique_ptr<EventPacketBuilder> CreateCommandCompleteReadLocalSupportedFeatures(hci::Status status, uint64_t supported_features); // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.4 static std::unique_ptr<EventPacketBuilder> CreateCommandCompleteReadLocalExtendedFeatures( hci::Status status, uint8_t page_number, uint8_t maximum_page_number, uint64_t extended_lmp_features); Loading Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +11 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ DualModeController::DualModeController(const std::string& properties_filename, u SET_HANDLER(OpCode::READ_LOCAL_VERSION_INFORMATION, HciReadLocalVersionInformation); SET_HANDLER(OpCode::READ_BD_ADDR, HciReadBdAddr); SET_HANDLER(OpCode::READ_LOCAL_SUPPORTED_COMMANDS, HciReadLocalSupportedCommands); SET_HANDLER(OpCode::READ_LOCAL_SUPPORTED_FEATURES, HciReadLocalSupportedFeatures); SET_HANDLER(OpCode::READ_LOCAL_SUPPORTED_CODECS, HciReadLocalSupportedCodecs); SET_HANDLER(OpCode::READ_LOCAL_EXTENDED_FEATURES, HciReadLocalExtendedFeatures); SET_HANDLER(OpCode::READ_REMOTE_EXTENDED_FEATURES, HciReadRemoteExtendedFeatures); Loading Loading @@ -367,6 +369,15 @@ void DualModeController::HciReadLocalSupportedCommands(packets::PacketView<true> send_event_(command_complete->ToVector()); } void DualModeController::HciReadLocalSupportedFeatures( packets::PacketView<true> args) { CHECK(args.size() == 0) << __func__ << " size=" << args.size(); std::shared_ptr<packets::EventPacketBuilder> command_complete = packets:: EventPacketBuilder::CreateCommandCompleteReadLocalSupportedFeatures( hci::Status::SUCCESS, properties_.GetSupportedFeatures()); send_event_(command_complete->ToVector()); } void DualModeController::HciReadLocalSupportedCodecs(packets::PacketView<true> args) { CHECK(args.size() == 0) << __func__ << " size=" << args.size(); std::shared_ptr<packets::EventPacketBuilder> command_complete = Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.h +3 −0 Original line number Diff line number Diff line Loading @@ -265,6 +265,9 @@ class DualModeController : public Device { // 7.4.2 void HciReadLocalSupportedCommands(packets::PacketView<true> args); // 7.4.3 void HciReadLocalSupportedFeatures(packets::PacketView<true> args); // 7.4.4 void HciReadLocalExtendedFeatures(packets::PacketView<true> args); Loading
system/vendor_libs/test_vendor_lib/packets/hci/event_packet_builder.cc +13 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,19 @@ std::unique_ptr<EventPacketBuilder> EventPacketBuilder::CreateCommandCompleteRea return evt_ptr; } // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.3 std::unique_ptr<EventPacketBuilder> EventPacketBuilder::CreateCommandCompleteReadLocalSupportedFeatures( hci::Status status, uint64_t supported_features) { std::unique_ptr<EventPacketBuilder> evt_ptr = EventPacketBuilder::CreateCommandCompleteOnlyStatusEvent( OpCode::READ_LOCAL_SUPPORTED_FEATURES, status); CHECK(evt_ptr->AddPayloadOctets8(supported_features)); return evt_ptr; } // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.4 std::unique_ptr<EventPacketBuilder> EventPacketBuilder::CreateCommandCompleteReadLocalExtendedFeatures( hci::Status status, uint8_t page_number, uint8_t maximum_page_number, uint64_t extended_lmp_features) { Loading
system/vendor_libs/test_vendor_lib/packets/hci/event_packet_builder.h +5 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,11 @@ class EventPacketBuilder : public HciPacketBuilder { static std::unique_ptr<EventPacketBuilder> CreateCommandCompleteReadLocalSupportedCommands( hci::Status status, const std::vector<uint8_t>& supported_commands); // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.3 static std::unique_ptr<EventPacketBuilder> CreateCommandCompleteReadLocalSupportedFeatures(hci::Status status, uint64_t supported_features); // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.4 static std::unique_ptr<EventPacketBuilder> CreateCommandCompleteReadLocalExtendedFeatures( hci::Status status, uint8_t page_number, uint8_t maximum_page_number, uint64_t extended_lmp_features); Loading