Loading system/vendor_libs/test_vendor_lib/model/devices/device_properties.cc +8 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,12 @@ static void ParseUint16t(Json::Value value, uint16_t* field) { *field = value.asUInt(); } static void ParseBool(Json::Value value, bool* field) { if (value.isBool()) { *field = value.asBool(); } } namespace test_vendor_lib { DeviceProperties::DeviceProperties(const std::string& file_name) Loading Loading @@ -101,6 +107,8 @@ DeviceProperties::DeviceProperties(const std::string& file_name) ParseUint8t(root["LmpPalVersion"], &lmp_pal_version_); ParseUint16t(root["ManufacturerName"], &manufacturer_name_); ParseUint16t(root["LmpPalSubversion"], &lmp_pal_subversion_); ParseBool(root["use_supported_commands_from_file"], &use_supported_commands_from_file_); } } // namespace test_vendor_lib system/vendor_libs/test_vendor_lib/model/devices/device_properties.h +4 −1 Original line number Diff line number Diff line Loading @@ -46,8 +46,10 @@ class DeviceProperties { } void SetSupportedCommands(const std::array<uint8_t, 64>& commands) { if (!use_supported_commands_from_file_) { supported_commands_ = commands; } } // Specification Version 4.2, Volume 2, Part E, Section 7.4.3 uint64_t GetSupportedFeatures() const { Loading Loading @@ -390,6 +392,7 @@ class DeviceProperties { uint8_t encryption_key_size_{10}; uint16_t voice_setting_{0x0060}; uint16_t connection_accept_timeout_{0x7d00}; bool use_supported_commands_from_file_ = false; // Low Energy uint16_t le_data_packet_length_; Loading Loading
system/vendor_libs/test_vendor_lib/model/devices/device_properties.cc +8 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,12 @@ static void ParseUint16t(Json::Value value, uint16_t* field) { *field = value.asUInt(); } static void ParseBool(Json::Value value, bool* field) { if (value.isBool()) { *field = value.asBool(); } } namespace test_vendor_lib { DeviceProperties::DeviceProperties(const std::string& file_name) Loading Loading @@ -101,6 +107,8 @@ DeviceProperties::DeviceProperties(const std::string& file_name) ParseUint8t(root["LmpPalVersion"], &lmp_pal_version_); ParseUint16t(root["ManufacturerName"], &manufacturer_name_); ParseUint16t(root["LmpPalSubversion"], &lmp_pal_subversion_); ParseBool(root["use_supported_commands_from_file"], &use_supported_commands_from_file_); } } // namespace test_vendor_lib
system/vendor_libs/test_vendor_lib/model/devices/device_properties.h +4 −1 Original line number Diff line number Diff line Loading @@ -46,8 +46,10 @@ class DeviceProperties { } void SetSupportedCommands(const std::array<uint8_t, 64>& commands) { if (!use_supported_commands_from_file_) { supported_commands_ = commands; } } // Specification Version 4.2, Volume 2, Part E, Section 7.4.3 uint64_t GetSupportedFeatures() const { Loading Loading @@ -390,6 +392,7 @@ class DeviceProperties { uint8_t encryption_key_size_{10}; uint16_t voice_setting_{0x0060}; uint16_t connection_accept_timeout_{0x7d00}; bool use_supported_commands_from_file_ = false; // Low Energy uint16_t le_data_packet_length_; Loading