Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +18 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,7 @@ DualModeController::DualModeController(const std::string& properties_filename, u SET_SUPPORTED(REMOTE_NAME_REQUEST, RemoteNameRequest); SET_SUPPORTED(LE_SET_EVENT_MASK, LeSetEventMask); SET_SUPPORTED(LE_READ_BUFFER_SIZE_V1, LeReadBufferSize); SET_SUPPORTED(LE_READ_BUFFER_SIZE_V2, LeReadBufferSizeV2); SET_SUPPORTED(LE_READ_LOCAL_SUPPORTED_FEATURES, LeReadLocalSupportedFeatures); SET_SUPPORTED(LE_SET_RANDOM_ADDRESS, LeSetRandomAddress); SET_SUPPORTED(LE_SET_ADVERTISING_PARAMETERS, LeSetAdvertisingParameters); Loading Loading @@ -1590,6 +1591,23 @@ void DualModeController::LeReadBufferSize(CommandView command) { send_event_(std::move(packet)); } void DualModeController::LeReadBufferSizeV2(CommandView command) { auto command_view = gd_hci::LeReadBufferSizeV2View::Create(command); ASSERT(command_view.IsValid()); bluetooth::hci::LeBufferSize le_buffer_size; le_buffer_size.le_data_packet_length_ = properties_.GetLeDataPacketLength(); le_buffer_size.total_num_le_packets_ = properties_.GetTotalNumLeDataPackets(); bluetooth::hci::LeBufferSize iso_buffer_size; iso_buffer_size.le_data_packet_length_ = properties_.GetIsoDataPacketLength(); iso_buffer_size.total_num_le_packets_ = properties_.GetTotalNumIsoDataPackets(); auto packet = bluetooth::hci::LeReadBufferSizeV2CompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS, le_buffer_size, iso_buffer_size); send_event_(std::move(packet)); } void DualModeController::LeSetAddressResolutionEnable(CommandView command) { // NOP auto payload = Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.h +3 −0 Original line number Diff line number Diff line Loading @@ -531,6 +531,9 @@ class DualModeController : public Device { // 7.8.77 void LeSetPrivacyMode(CommandView args); // 7.8.93 (moved to 7.8.2) void LeReadBufferSizeV2(CommandView args); // 7.8.96 - 7.8.110 void LeReadIsoTxSync(CommandView packet_view); void LeSetCigParameters(CommandView packet_view); Loading system/vendor_libs/test_vendor_lib/model/devices/device_properties.h +12 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,14 @@ class DeviceProperties { return num_le_data_packets_; } uint16_t GetIsoDataPacketLength() const { return iso_data_packet_length_; } uint8_t GetTotalNumIsoDataPackets() const { return num_iso_data_packets_; } // Specification Version 4.2, Volume 2, Part E, Section 7.8.3 uint64_t GetLeSupportedFeatures() const { return le_supported_features_; Loading Loading @@ -417,6 +425,10 @@ class DeviceProperties { uint8_t le_advertisement_type_{}; std::vector<uint8_t> le_advertisement_; std::vector<uint8_t> le_scan_response_; // ISO uint16_t iso_data_packet_length_{1021}; uint8_t num_iso_data_packets_{12}; }; } // namespace test_vendor_lib Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +18 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,7 @@ DualModeController::DualModeController(const std::string& properties_filename, u SET_SUPPORTED(REMOTE_NAME_REQUEST, RemoteNameRequest); SET_SUPPORTED(LE_SET_EVENT_MASK, LeSetEventMask); SET_SUPPORTED(LE_READ_BUFFER_SIZE_V1, LeReadBufferSize); SET_SUPPORTED(LE_READ_BUFFER_SIZE_V2, LeReadBufferSizeV2); SET_SUPPORTED(LE_READ_LOCAL_SUPPORTED_FEATURES, LeReadLocalSupportedFeatures); SET_SUPPORTED(LE_SET_RANDOM_ADDRESS, LeSetRandomAddress); SET_SUPPORTED(LE_SET_ADVERTISING_PARAMETERS, LeSetAdvertisingParameters); Loading Loading @@ -1590,6 +1591,23 @@ void DualModeController::LeReadBufferSize(CommandView command) { send_event_(std::move(packet)); } void DualModeController::LeReadBufferSizeV2(CommandView command) { auto command_view = gd_hci::LeReadBufferSizeV2View::Create(command); ASSERT(command_view.IsValid()); bluetooth::hci::LeBufferSize le_buffer_size; le_buffer_size.le_data_packet_length_ = properties_.GetLeDataPacketLength(); le_buffer_size.total_num_le_packets_ = properties_.GetTotalNumLeDataPackets(); bluetooth::hci::LeBufferSize iso_buffer_size; iso_buffer_size.le_data_packet_length_ = properties_.GetIsoDataPacketLength(); iso_buffer_size.total_num_le_packets_ = properties_.GetTotalNumIsoDataPackets(); auto packet = bluetooth::hci::LeReadBufferSizeV2CompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS, le_buffer_size, iso_buffer_size); send_event_(std::move(packet)); } void DualModeController::LeSetAddressResolutionEnable(CommandView command) { // NOP auto payload = Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.h +3 −0 Original line number Diff line number Diff line Loading @@ -531,6 +531,9 @@ class DualModeController : public Device { // 7.8.77 void LeSetPrivacyMode(CommandView args); // 7.8.93 (moved to 7.8.2) void LeReadBufferSizeV2(CommandView args); // 7.8.96 - 7.8.110 void LeReadIsoTxSync(CommandView packet_view); void LeSetCigParameters(CommandView packet_view); Loading
system/vendor_libs/test_vendor_lib/model/devices/device_properties.h +12 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,14 @@ class DeviceProperties { return num_le_data_packets_; } uint16_t GetIsoDataPacketLength() const { return iso_data_packet_length_; } uint8_t GetTotalNumIsoDataPackets() const { return num_iso_data_packets_; } // Specification Version 4.2, Volume 2, Part E, Section 7.8.3 uint64_t GetLeSupportedFeatures() const { return le_supported_features_; Loading Loading @@ -417,6 +425,10 @@ class DeviceProperties { uint8_t le_advertisement_type_{}; std::vector<uint8_t> le_advertisement_; std::vector<uint8_t> le_scan_response_; // ISO uint16_t iso_data_packet_length_{1021}; uint8_t num_iso_data_packets_{12}; }; } // namespace test_vendor_lib