Home
last modified time | relevance | path

Searched refs:kLength (Results 1 – 25 of 30) sorted by relevance

12

/system/bt/gd/common/
Dbyte_array.h37 static constexpr size_t kLength = LENGTH;
39 ByteArray(const uint8_t (&d)[kLength]) { in ByteArray() argument
40 std::copy(d, d + kLength, data()); in ByteArray()
42 ByteArray(std::array<uint8_t, kLength> a) : bytes(std::move(a)) {} in ByteArray()
44 std::array<uint8_t, kLength> bytes = {};
78 static std::optional<ByteArray<kLength>> FromString(const std::string& from) { in FromString()
79 if (from.length() != (kLength * 2)) { in FromString()
86 ByteArray<kLength> byte_array = {}; in FromString()
93 static std::optional<ByteArray<kLength>> FromLegacyConfigString(const std::string& from) { in FromLegacyConfigString()
Dbyte_array_test.cc34 for (int i = 0; i < ByteArray<16>::kLength; i++) { in TEST()
43 for (int i = 0; i < ByteArray<16>::kLength; i++) { in TEST()
/system/bt/types/
Dclass_of_device.cc27 static_assert(sizeof(ClassOfDevice) == ClassOfDevice::kLength,
30 ClassOfDevice::ClassOfDevice(const uint8_t (&class_of_device)[kLength]) { in ClassOfDevice() argument
31 std::copy(class_of_device, class_of_device + kLength, cod); in ClassOfDevice()
54 for (size_t i = 0; i < kLength; i++) { in FromString()
71 std::copy(from, from + kLength, cod); in FromOctets()
72 return kLength; in FromOctets()
Draw_address.h28 static constexpr unsigned int kLength = 6;
30 uint8_t address[kLength];
33 RawAddress(const uint8_t (&addr)[kLength]);
73 static_assert(sizeof(uint64_t) >= RawAddress::kLength);
76 RawAddress::kLength);
Dclass_of_device.h29 static constexpr unsigned int kLength = 3;
31 uint8_t cod[kLength];
34 ClassOfDevice(const uint8_t (&class_of_device)[kLength]);
Draw_address.cc33 std::copy(addr, addr + kLength, address); in RawAddress()
66 std::copy(from, from + kLength, address); in FromOctets()
67 return kLength; in FromOctets()
/system/core/libunwindstack/tests/
DMemoryOfflineBufferTest.cpp34 buffer_.resize(kLength); in SetUpTestSuite()
35 for (size_t i = 0; i < kLength; i++) { in SetUpTestSuite()
42 static constexpr size_t kLength = 0x2000; member in unwindstack::MemoryOfflineBufferTest
44 static constexpr uint64_t kEnd = kStart + kLength;
73 ASSERT_TRUE(memory_->ReadFully(kStart + kLength - 105, buffer.data(), 105)); in TEST_F()
74 ASSERT_NO_FATAL_FAILURE(VerifyBuffer(buffer.data(), kLength - 105, 105)); in TEST_F()
79 ASSERT_EQ(100U, memory_->Read(kStart + kLength - 100, buffer.data(), buffer.size())); in TEST_F()
80 VerifyBuffer(buffer.data(), kLength - 100, 100); in TEST_F()
/system/bt/gd/packet/
Dcustom_field_fixed_size_interface.h35 …std::is_same_v<decltype(T::kLength), const size_t>, "T::kLength must be const size_t or constexpr … in length()
36 static_assert(std::is_const_v<decltype(T::kLength)>, "T::kLength must be const"); in length()
37 return T::kLength; in length()
Draw_builder.cc65 if (payload_.size() + Address::kLength > max_bytes_) return false; in AddAddress()
67 for (size_t i = 0; i < Address::kLength; i++) { in AddAddress()
/system/bt/gd/hci/
Daddress.h35 static constexpr size_t kLength = 6;
37 std::array<uint8_t, kLength> address = {};
40 Address(const uint8_t (&addr)[kLength]);
107 static_assert(sizeof(uint64_t) >= bluetooth::hci::Address::kLength);
109 memcpy(reinterpret_cast<uint8_t*>(&int_addr), val.data(), bluetooth::hci::Address::kLength);
Daddress.cc38 std::copy(addr, addr + kLength, data()); in Address()
42 std::copy(l.begin(), std::min(l.begin() + kLength, l.end()), data()); in Address()
114 std::copy(from, from + kLength, data()); in FromOctets()
115 return kLength; in FromOctets()
Dclass_of_device.h34 static constexpr size_t kLength = 3;
36 std::array<uint8_t, kLength> cod = {};
39 ClassOfDevice(const uint8_t (&class_of_device)[kLength]);
Dclass_of_device.cc37 ClassOfDevice::ClassOfDevice(const uint8_t (&class_of_device)[kLength]) { in ClassOfDevice() argument
38 std::copy(class_of_device, class_of_device + kLength, cod.data()); in ClassOfDevice()
133 std::copy(from, from + kLength, data()); in FromOctets()
134 return kLength; in FromOctets()
Daddress_with_type.h117 …static_assert(sizeof(uint64_t) >= (bluetooth::hci::Address::kLength + sizeof(bluetooth::hci::Addre…
119 …(reinterpret_cast<uint8_t*>(&int_addr), val.GetAddress().data(), bluetooth::hci::Address::kLength);
122 …reinterpret_cast<uint8_t*>(&int_addr) + bluetooth::hci::Address::kLength, &address_type, sizeof(ad…
Dclass_of_device_unittest.cc56 size_t expected_result = ClassOfDevice::kLength; in TEST()
94 ASSERT_EQ(0, memcmp(cod.data(), result0.data(), ClassOfDevice::kLength)); in TEST()
98 ASSERT_EQ(0, memcmp(cod.data(), result1.data(), ClassOfDevice::kLength)); in TEST()
Daddress_unittest.cc76 size_t expected_result = Address::kLength; in TEST()
188 ASSERT_EQ(0, memcmp(addr.data(), result0.data(), Address::kLength)); in TEST()
195 ASSERT_EQ(0, memcmp(addr.data(), result1.data(), Address::kLength)); in TEST()
/system/bt/gd/packet/parser/test/
Dsix_bytes.h33 static constexpr size_t kLength = 6;
35 uint8_t six_bytes[kLength] = {};
Dsix_bytes.cc27 std::copy(six, six + kLength, six_bytes); in SixBytes()
/system/bt/common/
Daddress_obfuscator.cc52 address.address, address.kLength, result.data(), in Obfuscate()
/system/bt/types/test/
Dclass_of_device_unittest.cc53 size_t expected_result = ClassOfDevice::kLength; in TEST()
/system/bt/gd/security/
Dpairing_handler_le_secure_connections.cc142 memcpy(a, i.my_connection_address.GetAddress().data(), hci::Address::kLength); in DoSecureConnectionsStage2()
144 memcpy(b, i.remote_connection_address.GetAddress().data(), hci::Address::kLength); in DoSecureConnectionsStage2()
147 memcpy(a, i.remote_connection_address.GetAddress().data(), hci::Address::kLength); in DoSecureConnectionsStage2()
149 memcpy(b, i.my_connection_address.GetAddress().data(), hci::Address::kLength); in DoSecureConnectionsStage2()
Dpairing_handler_le_unittest.cc237 …mcpy(b, initial_informations.remote_connection_address.GetAddress().data(), hci::Address::kLength); in TEST_F()
239 memcpy(a, initial_informations.my_connection_address.GetAddress().data(), hci::Address::kLength); in TEST_F()
/system/bt/service/
Dlow_energy_client.h38 return memcmp(a.address, b.address, RawAddress::kLength) < 0; in operator()
/system/bt/service/hal/
Dfake_bluetooth_interface.cc125 property.len = RawAddress::kLength; in NotifyAdapterAddressPropertyChanged()
/system/bt/device/src/
Dinterop.cc84 CHECK(length < RawAddress::kLength); in interop_database_add()

12