Home
last modified time | relevance | path

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

12

/packages/modules/Bluetooth/system/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.cc42 for (size_t i = 0; i < ByteArray<N>::kLength; i++) { in simple_constructor_test()
50 for (size_t i = 0; i < ByteArray<N>::kLength; i++) { in simple_const_constructor_test()
61 for (size_t i = 0; i < ByteArray<N>::kLength; i++) { in simple_array_constructor_test()
71 for (size_t i = 0; i < ByteArray<N>::kLength; i++) { in simple_from_string_test()
88 for (size_t i = 0; i < ByteArray<N>::kLength; i++) { in simple_from_legacy_string_test()
/packages/modules/Bluetooth/tools/rootcanal/lib/hci/
Daddress.cc42 constexpr Address::Address(std::array<uint8_t, kLength> const& address) in Address()
45 Address::Address(const uint8_t (&address)[kLength]) { in Address() argument
46 std::copy(address, address + kLength, this->address.begin()); in Address()
50 std::copy(l.begin(), std::min(l.begin() + kLength, l.end()), data()); in Address()
54 if (input.size() < kLength) { in Parse()
58 std::array<uint8_t, kLength> address{ in Parse()
129 std::copy(from, from + kLength, data()); in FromOctets()
130 return kLength; in FromOctets()
/packages/services/Car/packages/ScriptExecutor/src/
DJniUtils.cpp104 const auto kLength = env->GetArrayLength(booleanArray); in pushBundleToLuaTable() local
108 lua_createtable(lua, kLength, 0); in pushBundleToLuaTable()
112 for (int i = 0; i < kLength; i++) { in pushBundleToLuaTable()
121 const auto kLength = env->GetArrayLength(intArray); in pushBundleToLuaTable() local
125 lua_createtable(lua, kLength, 0); in pushBundleToLuaTable()
129 for (int i = 0; i < kLength; i++) { in pushBundleToLuaTable()
139 const auto kLength = env->GetArrayLength(longArray); in pushBundleToLuaTable() local
143 lua_createtable(lua, kLength, 0); in pushBundleToLuaTable()
147 for (int i = 0; i < kLength; i++) { in pushBundleToLuaTable()
156 const auto kLength = env->GetArrayLength(doubleArray); in pushBundleToLuaTable() local
[all …]
/packages/modules/Bluetooth/system/types/
Draw_address.h29 static constexpr unsigned int kLength = 6;
31 uint8_t address[kLength];
34 RawAddress(const uint8_t (&addr)[kLength]);
35 RawAddress(const std::array<uint8_t, kLength> array);
75 std::array<uint8_t, kLength> ToArray() const;
91 static_assert(sizeof(uint64_t) >= RawAddress::kLength);
94 RawAddress::kLength);
Draw_address.cc35 std::copy(addr, addr + kLength, address); in RawAddress()
38 RawAddress::RawAddress(const std::array<uint8_t, kLength> mac) { in RawAddress()
72 std::array<uint8_t, RawAddress::kLength> RawAddress::ToArray() const { in ToArray()
73 std::array<uint8_t, kLength> mac; in ToArray()
117 std::copy(from, from + kLength, address); in FromOctets()
118 return kLength; in FromOctets()
Dble_address_with_type.h144 (RawAddress::kLength + sizeof(tBLE_ADDR_TYPE)));
147 RawAddress::kLength);
148 memcpy(reinterpret_cast<uint8_t*>(&int_addr) + RawAddress::kLength,
/packages/modules/Bluetooth/tools/rootcanal/include/hci/
Daddress.h36 static constexpr size_t kLength = 6;
42 std::array<uint8_t, kLength> address = {};
45 constexpr Address(std::array<uint8_t, kLength> const& address);
46 Address(const uint8_t (&address)[kLength]);
68 size_t GetSize() const override { return kLength; } in GetSize()
/packages/modules/Bluetooth/system/pdl/hci/include/hci/
Daddress.h40 static constexpr size_t kLength = 6;
46 std::array<uint8_t, kLength> address = {};
49 Address(const uint8_t (&addr)[kLength]);
106 static_assert(sizeof(uint64_t) >= bluetooth::hci::Address::kLength);
109 bluetooth::hci::Address::kLength);
Dclass_of_device.h35 static constexpr size_t kLength = 3;
37 std::array<uint8_t, kLength> cod = {};
40 ClassOfDevice(const uint8_t (&class_of_device)[kLength]);
/packages/modules/Bluetooth/system/gd/hci/
Daddress.h40 static constexpr size_t kLength = 6;
46 std::array<uint8_t, kLength> address = {};
49 Address(const uint8_t (&addr)[kLength]);
124 static_assert(sizeof(uint64_t) >= bluetooth::hci::Address::kLength);
126 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()
135 std::copy(from, from + kLength, data()); in FromOctets()
136 return kLength; in FromOctets()
Dclass_of_device.cc32 ClassOfDevice::ClassOfDevice(const uint8_t (&class_of_device)[kLength]) { in ClassOfDevice() argument
33 std::copy(class_of_device, class_of_device + kLength, cod.data()); in ClassOfDevice()
126 std::copy(from, from + kLength, data()); in FromOctets()
127 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_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_with_type.h150 …static_assert(sizeof(uint64_t) >= (bluetooth::hci::Address::kLength + sizeof(bluetooth::hci::Addre…
152 …(reinterpret_cast<uint8_t*>(&int_addr), val.GetAddress().data(), bluetooth::hci::Address::kLength);
155 …reinterpret_cast<uint8_t*>(&int_addr) + bluetooth::hci::Address::kLength, &address_type, sizeof(ad…
Daddress_unittest.cc78 size_t expected_result = Address::kLength; in TEST()
190 ASSERT_EQ(0, memcmp(addr.data(), result0.data(), Address::kLength)); in TEST()
197 ASSERT_EQ(0, memcmp(addr.data(), result1.data(), Address::kLength)); in TEST()
/packages/modules/Bluetooth/system/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()
/packages/modules/Bluetooth/system/pdl/hci/
Daddress.cc36 std::copy(addr, addr + kLength, data()); in Address()
40 std::copy(l.begin(), std::min(l.begin() + kLength, l.end()), data()); in Address()
130 std::copy(from, from + kLength, data()); in FromOctets()
131 return kLength; in FromOctets()
Dclass_of_device.cc33 ClassOfDevice::ClassOfDevice(const uint8_t (&class_of_device)[kLength]) { in ClassOfDevice() argument
34 std::copy(class_of_device, class_of_device + kLength, cod.data()); in ClassOfDevice()
129 std::copy(from, from + kLength, data()); in FromOctets()
130 return kLength; in FromOctets()
/packages/modules/Bluetooth/system/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()
/packages/modules/NeuralNetworks/runtime/test/
DTestUnspecifiedDimensions.cpp103 munmap(buffer, kLength); in ~SharedMemoryForTest()
111 fd = ASharedMemory_create(nullptr, kLength); in initialize()
115 CHECK_EQ(ftruncate(fd, kLength), 0); in initialize()
118 buffer = (uint8_t*)mmap(nullptr, kLength, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in initialize()
121 memory = std::make_shared<Memory>(kLength, PROT_READ | PROT_WRITE, fd, 0); in initialize()
133 static constexpr size_t kLength = 64; member in __anon1e0d2ba30111::UnspecifiedDimensionsTest::SharedMemoryForTest
/packages/modules/Bluetooth/system/btcore/fuzzer/
Dbtcore_property_fuzzer.cpp38 uint8_t addr[RawAddress::kLength]; in process()
39 mFdp->ConsumeData(addr, sizeof(uint8_t) * RawAddress::kLength); in process()
/packages/modules/Bluetooth/system/gd/l2cap/fuzz/
Dfuzz_l2cap.cc53 std::vector<uint8_t> addressVals = fdp.ConsumeBytes<uint8_t>(Address::kLength); in LLVMFuzzerTestOneInput()
56 while (addressVals.size() < Address::kLength) { in LLVMFuzzerTestOneInput()

12