jaulib v1.3.6
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
test_darray_01.cpp
Go to the documentation of this file.
1/*
2 * Author: Sven Gothel <sgothel@jausoft.com>
3 * Copyright (c) 2020-2024 Gothel Software e.K.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24#include <cassert>
25#include <cstring>
26
27#include <jau/test/catch2_ext.hpp>
28
29#include "test_datatype01.hpp"
30
31#include "test_datatype02.hpp"
32
33#include <jau/basic_algos.hpp>
34#include <jau/basic_types.hpp>
35#include <jau/darray.hpp>
37#include <jau/callocator.hpp>
39
40/**
41 * Test general use of jau::darray, jau::cow_darray and jau::cow_vector.
42 */
43using namespace jau;
44
45/**********************************************************************************************************************************************/
46/**********************************************************************************************************************************************/
47/**********************************************************************************************************************************************/
48/**********************************************************************************************************************************************/
49/**********************************************************************************************************************************************/
50
51TEST_CASE( "JAU DArray Test 01 - jau::darray initializer list", "[datatype][jau][darray]" ) {
52 int i = 0;
54 (void)ml;
55 // printf("XX: %s\n\n", ml->toString().c_str());
56 ++i;
57 });
58 REQUIRE(3 == i);
59}
60
62 int i = 0;
63 jau::for_each(clist.begin(), clist.end(), [&i](const GattCharacteristicSpec& ml){
64 (void)ml;
65 // printf("XX: %s\n\n", ml->toString().c_str());
66 ++i;
67 });
68 return i;
69}
71 int i = 0;
72 jau::for_each(clist.begin(), clist.end(), [&i](const GattCharacteristicSpec& ml){
73 (void)ml;
74 // printf("XX: %s\n\n", ml->toString().c_str());
75 ++i;
76 });
77 return i;
78}
79
80TEST_CASE( "JAU DArray Test 02 - jau::darray immutable type (const)", "[const][jau][darray]" ) {
82 // GattCharacteristicPropertySpec[9]:
83 { { Read, Mandatory },
86 // GattClientCharacteristicConfigSpec:
88 };
90 cs1,
92 // GattCharacteristicPropertySpec[9]:
93 { { Read, Mandatory },
96 // GattClientCharacteristicConfigSpec:
98 } };
99 clist.push_back( cs1 );
100 int i = 0;
101 jau::for_each(clist.begin(), clist.end(), [&i](const GattCharacteristicSpec& ml){
102 (void)ml;
103 // printf("XX: %s\n\n", ml->toString().c_str());
104 ++i;
105 });
106 REQUIRE(3 == i);
108 REQUIRE(3 == countGattCharacteristicSpecList02Copy(clist));
109}
110
111/**********************************************************************************************************************************************/
112/**********************************************************************************************************************************************/
113/**********************************************************************************************************************************************/
114/**********************************************************************************************************************************************/
115/**********************************************************************************************************************************************/
116
117template<class Payload>
119// JAU_TYPENAME_CUE_ALL(SharedPayloadListMemMove)
120
121template<class Payload>
123// JAU_TYPENAME_CUE_ALL(SharedPayloadListDefault)
124
125template<class Payload>
127 int name;
129
130 std::string toString() const noexcept {
131 std::string res = "NSPL-Default-"+std::to_string(name)+"[sz "+std::to_string(payload.size())+"/"+std::to_string(payload.capacity())+": ";
132 int i=0;
133 jau::for_each(payload.cbegin(), payload.cend(), [&](const std::shared_ptr<Payload>& e) {
134 if(0<i) {
135 res.append(", ");
136 }
137 res.append("[").append(jau::to_string(e)).append("]");
138 ++i;
139 } );
140 res.append("]");
141 return res;
142 }
143};
144// JAU_TYPENAME_CUE_ALL(NamedSharedPayloadListDefault)
145
146template<class Payload>
148 int name;
150
151 std::string toString() const noexcept {
152 std::string res = "NSPL-MemMove-"+std::to_string(name)+"[sz "+std::to_string(payload.size())+"/"+std::to_string(payload.capacity())+": ";
153 int i=0;
154 jau::for_each(payload.cbegin(), payload.cend(), [&](const std::shared_ptr<Payload>& e) {
155 if(0<i) {
156 res.append(", ");
157 }
158 res.append("[").append(jau::to_string(e)).append("]");
159 ++i;
160 } );
161 res.append("]");
162 return res;
163 }
164};
165// JAU_TYPENAME_CUE_ALL(NamedSharedPayloadListMemMove)
166
167template<class Payload>
169// JAU_TYPENAME_CUE_ALL(PayloadListMemMove)
170
171template<class Payload>
173// JAU_TYPENAME_CUE_ALL(PayloadListDefault)
174
175template<class Payload>
177 int name;
179
180 std::string toString() const noexcept {
181 std::string res = "NPL-Default-"+std::to_string(name)+"[sz "+std::to_string(payload.size())+"/"+std::to_string(payload.capacity())+": ";
182 int i=0;
183 jau::for_each(payload.cbegin(), payload.cend(), [&](const typename PayloadListDefault<Payload>::value_type & e) {
184 if(0<i) {
185 res += ", ";
186 }
187 res.append("[").append(jau::to_string(e)).append("]");
188 ++i;
189 } );
190 res += "]";
191 return res;
192 }
193};
194// JAU_TYPENAME_CUE_ALL(NamedPayloadListDefault)
195
196template<class Payload>
198 int name;
200
201 std::string toString() const noexcept {
202 std::string res = "NPL-MemMove-"+std::to_string(name)+"[sz "+std::to_string(payload.size())+"/"+std::to_string(payload.capacity())+": ";
203 int i=0;
204 jau::for_each(payload.cbegin(), payload.cend(), [&](const Payload& e) {
205 if(0<i) {
206 res += ", ";
207 }
208 res.append("[").append(jau::to_string(e)).append("]");
209 ++i;
210 } );
211 res += "]";
212 return res;
213 }
214};
215// JAU_TYPENAME_CUE_ALL(NamedPayloadListMemMove)
216
217template<class Payload>
220 int i=0;
221 for(i=0; i<2; i++) {
222 std::shared_ptr<Payload> sp(std::make_shared<Payload>( name+i )); // copy-elision + make_shared in-place
223 data.push_back( sp );
224 }
225 CHECK( 2 == data.size() );
226 for(i=2; i<4; i++) {
227 std::shared_ptr<Payload> sp(new Payload( name+i )); // double malloc: 1 Payload, 2 shared_ptr
228 data.push_back( std::move( sp ) ); // move the less efficient into
229 }
230 CHECK( 4 == data.size() );
232}
233template<class Payload>
235 printf("XXX1: %s\n", src.toString().c_str());
236 const size_t sz0 = src.payload.size();
237 src.payload.pop_back();
238 src.payload.erase(src.payload.cbegin());
239 CHECK( sz0 - 2 == src.payload.size() );
240 printf("XXX2: %s\n", src.toString().c_str());
241 return src;
242}
243
244template<class Payload>
247 int i=0;
248 for(i=0; i<2; i++) {
249 std::shared_ptr<Payload> sp(std::make_shared<Payload>( name+i )); // copy-elision + make_shared in-place
250 data.push_back( sp );
251 }
252 CHECK( 2 == data.size() );
253 for(i=2; i<4; i++) {
254 std::shared_ptr<Payload> sp(new Payload( name+i )); // double malloc: 1 Payload, 2 shared_ptr
255 data.push_back( std::move( sp ) ); // move the less efficient into
256 }
257 CHECK( 4 == data.size() );
259}
260template<class Payload>
263 int i=0;
264 for(i=0; i<2; i++) {
265 Payload sp( name+i ); // copy-elision
266 data.push_back( sp );
267 }
268 CHECK( 2 == data.size() );
269 for(i=2; i<4; i++) {
270 Payload sp( name+i );
271 data.push_back( std::move( sp ) ); // move the less efficient into
272 }
273 CHECK( 4 == data.size() );
275}
276template<class Payload>
279 int i=0;
280 for(i=0; i<2; i++) {
281 Payload sp( name+i ); // copy-elision
282 data.push_back( sp );
283 }
284 CHECK( 2 == data.size() );
285 for(i=2; i<4; i++) {
286 Payload sp( name+i );
287 data.push_back( std::move( sp ) ); // move the less efficient into
288 }
289 CHECK( 4 == data.size() );
291}
292
293JAU_TYPENAME_CUE_ALL(std::shared_ptr<Addr48Bit>)
295JAU_TYPENAME_CUE_ALL(jau::darray<std::shared_ptr<Addr48Bit>>)
296
300
301#define CHECK_TRAITS 0
302
303template< class Cont >
304static void print_container_info(const std::string& type_id, const Cont &c,
305 std::enable_if_t< jau::is_darray_type<Cont>::value, bool> = true )
306{
307 printf("\nContainer Type %s (a darray, a cow %d):\n - Uses memmove %d (trivially_copyable %d); realloc %d; base_of jau::callocator %d; secmem %d; size %d bytes\n",
308 type_id.c_str(), jau::is_cow_type<Cont>::value,
309 Cont::uses_memmove,
310 std::is_trivially_copyable_v<typename Cont::value_type>,
311 Cont::uses_realloc,
312 std::is_base_of_v<jau::callocator<typename Cont::value_type>, typename Cont::allocator_type>,
313 Cont::uses_secmem,
314 (int)sizeof(c));
315}
316
317template<class Cont>
318static void print_container_info(const std::string& type_id, const Cont &c,
319 std::enable_if_t< !jau::is_darray_type<Cont>::value, bool> = true )
320{
321 printf("\nContainer Type %s (!darray, a cow %d); size %d bytes\n",
322 type_id.c_str(), jau::is_cow_type<Cont>::value, (int)sizeof(c));
323}
324
325
326template<class Payload>
327static void testDArrayValueType(const std::string& type_id) {
328 {
329 // jau::type_cue<Payload>::print(type_id, jau::TypeTraitGroup::ALL);
330 // jau::type_cue<std::shared_ptr<Payload>>::print("std::shared_ptr<"+type_id+">", jau::TypeTraitGroup::ALL);
331 }
332 {
333#if CHECK_TRAITS
334 CHECK( true == std::is_base_of<jau::callocator<Payload>, jau::callocator<Payload>>::value);
336 CHECK( true == std::is_trivially_copyable<Payload>::value);
338#endif
339
341 print_container_info("NamedPayloadListDefault<"+type_id+">", data.payload);
342 size_t sz0 = data.payload.size();
343 printf("COPY-0.0: %s\n\n", data.toString().c_str());
344 CHECK( sz0 == data.payload.capacity() );
345
346 {
347 Payload def_value(1);
349 printf("COPY-0.1: %s\n\n", data2.toString().c_str());
350 CHECK( 0 == data2.payload.size() );
351 CHECK( 0 == data2.payload.capacity() );
352 data2.payload.reserve(2);
353 printf("COPY-0.1a: %s\n\n", data2.toString().c_str());
354 CHECK( 0 == data2.payload.size() );
355 CHECK( 2 == data2.payload.capacity() );
356 data2.payload.resize(2, def_value);
357 printf("COPY-0.1b: %s\n\n", data2.toString().c_str());
358 CHECK( 2 == data2.payload.size() );
359 CHECK( 2 == data2.payload.capacity() );
360 for(Payload p : data2.payload) {
361 CHECK(def_value == p);
362 }
363 data2.payload.resize(4, def_value);
364 printf("COPY-0.2: %s\n\n", data2.toString().c_str());
365 CHECK( 4 == data2.payload.size() );
366 CHECK( 4 == data2.payload.capacity() );
367 for(Payload p : data2.payload) {
368 CHECK(def_value == p);
369 }
370
371 data2.payload.erase(data2.payload.cbegin());
372 printf("COPY-0.3: %s\n\n", data2.toString().c_str());
373 CHECK( 3 == data2.payload.size() );
374 CHECK( sz0 == data2.payload.capacity() );
375
376 data2.payload.shrink_to_fit();
377 printf("COPY-0.4: %s\n\n", data2.toString().c_str());
378 CHECK( 3 == data2.payload.size() );
379 CHECK( 3 == data2.payload.capacity() );
380 }
381 {
382 Payload def_value(1);
384 printf("COPY-1.0: %s\n\n", data2.toString().c_str());
385 CHECK( sz0 == data2.payload.size() );
386 CHECK( sz0 == data2.payload.capacity() );
387 data2.payload.erase(data2.payload.cbegin());
388 printf("COPY-1.1: %s\n\n", data2.toString().c_str());
389 CHECK( sz0-1 == data2.payload.size() );
390 CHECK( sz0 == data2.payload.capacity() );
391 data2.payload.resize(sz0, def_value);
392 printf("COPY-1.2: %s\n\n", data2.toString().c_str());
393 CHECK( sz0 == data2.payload.size() );
394 CHECK( sz0 == data2.payload.capacity() );
395 size_t j=0;
396 for(Payload p : data2.payload) {
397 if( j++ < sz0-1 ) {
398 CHECK(def_value != p);
399 } else {
400 CHECK(def_value == p);
401 }
402 }
403 data2.payload.resize(sz0*2, def_value);
404 printf("COPY-1.2: %s\n\n", data2.toString().c_str());
405 CHECK( sz0*2 == data2.payload.size() );
406 CHECK( sz0*2 == data2.payload.capacity() );
407 j=0;
408 for(Payload p : data2.payload) {
409 if( j++ < sz0-1 ) {
410 CHECK(def_value != p);
411 } else {
412 CHECK(def_value == p);
413 }
414 }
415 }
416 {
417 Payload def_value(1);
419 printf("COPY-2.0: %s\n\n", data3.toString().c_str());
420 CHECK( sz0 == data3.payload.size() );
421 CHECK( sz0 == data3.payload.capacity() );
422 data3.payload.erase(data3.payload.begin(), data3.payload.cbegin()+data3.payload.size()/2);
423 printf("COPY-2.1: %s\n\n", data3.toString().c_str());
424 CHECK( sz0/2 == data3.payload.size() );
425 CHECK( sz0 == data3.payload.capacity() );
426 data3.payload.resize(sz0, def_value);
427 printf("COPY-2.2: %s\n\n", data3.toString().c_str());
428 CHECK( sz0 == data3.payload.size() );
429 CHECK( sz0 == data3.payload.capacity() );
430 size_t j=0;
431 for(Payload p : data3.payload) {
432 if( j++ < sz0/2 ) {
433 CHECK(def_value != p);
434 } else {
435 CHECK(def_value == p);
436 }
437 }
438 data3.payload.resize(sz0*2, def_value);
439 printf("COPY-2.3: %s\n\n", data3.toString().c_str());
440 CHECK( sz0*2 == data3.payload.size() );
441 CHECK( sz0*2 == data3.payload.capacity() );
442 j=0;
443 for(Payload p : data3.payload) {
444 if( j++ < sz0/2 ) {
445 CHECK(def_value != p);
446 } else {
447 CHECK(def_value == p);
448 }
449 }
450 }
451 {
453 CHECK( sz0 == data8.payload.size() );
454 data8.payload.insert(data8.payload.begin(), data.payload.cbegin(), data.payload.cend());
455 CHECK( 2*sz0 == data8.payload.size() );
456 printf("COPY+2: %s\n\n", data8.toString().c_str());
457 }
458 }
459 {
460#if CHECK_TRAITS
461 CHECK( true == std::is_base_of<jau::callocator<Payload>, jau::callocator<Payload>>::value);
463 CHECK( true == std::is_trivially_copyable<Payload>::value);
465#endif
466
468 print_container_info("NamedPayloadListMemMove<"+type_id+">", data.payload);
469
471 data2.payload.erase(data2.payload.cbegin());
472
474 data3.payload.erase(data3.payload.begin(), data3.payload.cbegin()+data3.payload.size()/2);
475
477 data8.payload.insert(data8.payload.begin(), data.payload.cbegin(), data.payload.cend());
478
479 printf("COPY-0: %s\n\n", data.toString().c_str());
480 printf("COPY-1: %s\n\n", data2.toString().c_str());
481 printf("COPY-2: %s\n\n", data3.toString().c_str());
482 printf("COPY+2: %s\n\n", data8.toString().c_str());
483 }
484 {
485#if CHECK_TRAITS
486 CHECK( true == std::is_base_of<jau::callocator<std::shared_ptr<Payload>>, jau::callocator<std::shared_ptr<Payload>>>::value);
488 CHECK( true == std::is_trivially_copyable<std::shared_ptr<Payload>>::value);
490#endif
491
493 print_container_info("NamedSharedPayloadListDefault<"+type_id+">", data.payload);
494
496 data2.payload.erase(data2.payload.cbegin());
497
499 data3.payload.erase(data3.payload.begin(), data3.payload.cbegin()+data3.payload.size()/2);
500
502 data8.payload.insert(data8.payload.begin(), data.payload.cbegin(), data.payload.cend());
503
504 printf("COPY-0: %s\n\n", data.toString().c_str());
505 printf("COPY-1: %s\n\n", data2.toString().c_str());
506 printf("COPY-2: %s\n\n", data3.toString().c_str());
507 printf("COPY+2: %s\n\n", data8.toString().c_str());
508
510 printf("MODI+2-2: %s\n\n", data8_mod.toString().c_str());
511
512 struct Holder {
514 NamedSharedPayloadListDefault<Payload> & get_ref() { return lala; }
515 NamedSharedPayloadListDefault<Payload> & get_ref2() { lala.payload.pop_back(); return lala; }
516 NamedSharedPayloadListDefault<Payload> get_copy() { return lala; }
517 };
518 Holder holder{ data };
519 NamedSharedPayloadListDefault<Payload> & r1r1 = holder.get_ref();
520 printf("R1R1: %s\n\n", r1r1.toString().c_str());
521
522 NamedSharedPayloadListDefault<Payload> r2c1 = holder.get_ref();
523 printf("R1C1: %s\n\n", r2c1.toString().c_str());
524
525 NamedSharedPayloadListDefault<Payload> c1c2 = holder.get_copy();
526 printf("C1C2: %s\n\n", c1c2.toString().c_str());
527
528 r1r1 = holder.get_ref2();
529 printf("R2R2: %s\n\n", r1r1.toString().c_str());
530 }
531 {
532#if CHECK_TRAITS
533 CHECK( true == std::is_base_of<jau::callocator<std::shared_ptr<Payload>>, jau::callocator<std::shared_ptr<Payload>>>::value);
535 CHECK( true == std::is_trivially_copyable<std::shared_ptr<Payload>>::value);
537#endif
538
540 print_container_info("NamedSharedPayloadListMemMove<"+type_id+">", data.payload);
541
543 data2.payload.erase(data2.payload.cbegin());
544
546 data3.payload.erase(data3.payload.begin(), data3.payload.cbegin()+data3.payload.size()/2);
547
549 data8.payload.insert(data8.payload.begin(), data.payload.cbegin(), data.payload.cend());
550
551 printf("COPY-0: %s\n\n", data.toString().c_str());
552 printf("COPY-1: %s\n\n", data2.toString().c_str());
553 printf("COPY-2: %s\n\n", data3.toString().c_str());
554 printf("COPY+2: %s\n\n", data8.toString().c_str());
555 }
556}
557
559 return *GATT_SERVICES[i];
560}
561
563#if CHECK_TRAITS
565 CHECK( true == GattCharacteristicSpecList::uses_realloc);
566
567 CHECK( true == GattCharacteristicSpecList::uses_memmove);
568 CHECK( true == std::is_trivially_copyable<GattCharacteristicSpec>::value);
569#endif
570
572 print_container_info("darray<GattCharacteristicSpec>", gatt2.characteristics);
573
575
576 GattServiceCharacteristic gatt2b = gatt2;
578
579 GattServiceCharacteristic gatt2c(gatt2);
581
582 printf("COPY0-1: %s\n\n", gatt2.toString().c_str());
583 printf("COPY1-2: %s\n\n", gatt2b.toString().c_str());
584 printf("COPY2-3: %s\n\n", gatt2c.toString().c_str());
585}
586
587TEST_CASE( "JAU DArray Test 10 - jau::darray value_type behavior (type traits)", "[datatype][jau][darray]" ) {
593}
594
595/**********************************************************************************************************************************************/
596/**********************************************************************************************************************************************/
597/**********************************************************************************************************************************************/
598/**********************************************************************************************************************************************/
599/**********************************************************************************************************************************************/
600
Implementation of a dynamic linear array storage, aka vector, including relative positional access.
Definition darray.hpp:153
constexpr iterator erase(const_iterator cpos)
Like std::vector::erase(), removes the elements at pos.
Definition darray.hpp:1318
constexpr iterator end() noexcept
Definition darray.hpp:828
constexpr size_type size() const noexcept
Like std::vector::size().
Definition darray.hpp:1069
constexpr void push_back(const value_type &x)
Like std::vector::push_back(), copy.
Definition darray.hpp:1522
constexpr const_iterator cbegin() const noexcept
Definition darray.hpp:826
constexpr iterator begin() noexcept
Definition darray.hpp:824
static constexpr const bool uses_realloc
Definition darray.hpp:160
static constexpr const bool uses_memmove
Definition darray.hpp:158
constexpr UnaryFunction for_each(InputIt first, InputIt last, UnaryFunction f)
Like std::for_each() of 'algorithm'.
std::string to_string(const endian_t v) noexcept
Return std::string representation of the given endian.
constexpr bool value(const Bool rhs) noexcept
#define JAU_TYPENAME_CUE_ALL(A)
constexpr std::string_view name(const Bool v) noexcept
uint_fast32_t nsize_t
Natural 'size_t' alternative using uint_fast32_t as its natural sized type.
Definition int_types.hpp:55
__pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
Definition backtrace.hpp:32
STL namespace.
std::string toString() const noexcept
jau::darray< GattCharacteristicSpec > characteristics
PayloadListDefault< Payload > payload
std::string toString() const noexcept
PayloadListMemMove< Payload > payload
std::string toString() const noexcept
std::string toString() const noexcept
SharedPayloadListDefault< Payload > payload
std::string toString() const noexcept
SharedPayloadListMemMove< Payload > payload
A simple allocator using POSIX C functions: ::malloc(), ::free() and ::realloc().
template< class T > is_cow_type<T>::value compile-time Type Trait, determining whether the given temp...
template< class T > is_darray_type<T>::value compile-time Type Trait, determining whether the given t...
Definition darray.hpp:1916
static int countGattCharacteristicSpecList01ConstRef(const jau::darray< const GattCharacteristicSpec > &clist)
static NamedSharedPayloadListDefault< Payload > makeNamedSharedPayloadListDefault(int name)
jau::darray< Payload, jau::nsize_t, jau::callocator< Payload >, true > PayloadListMemMove
static NamedSharedPayloadListMemMove< Payload > makeNamedSharedPayloadListMemMove(int name)
static void print_container_info(const std::string &type_id, const Cont &c, std::enable_if_t< jau::is_darray_type< Cont >::value, bool >=true)
static void testDArrayValueType(const std::string &type_id)
static NamedPayloadListDefault< Payload > makeNamedPayloadListDefault(int name)
static GattServiceCharacteristic returnGattSrvcChar(int i)
jau::darray< std::shared_ptr< Payload > > SharedPayloadListDefault
static NamedPayloadListMemMove< Payload > makeNamedPayloadListMemMove(int name)
TEST_CASE("JAU DArray Test 01 - jau::darray initializer list", "[datatype][jau][darray]")
static NamedSharedPayloadListDefault< Payload > modifyCopyOfNamedSharedPayloadListDefault(NamedSharedPayloadListDefault< Payload > src)
jau::darray< Payload > PayloadListDefault
static int countGattCharacteristicSpecList02Copy(jau::darray< const GattCharacteristicSpec > clist)
static void testDArrayGattServiceCharacteristic()
jau::darray< std::shared_ptr< Payload >, jau::nsize_t, jau::callocator< std::shared_ptr< Payload > >, true > SharedPayloadListMemMove
const jau::darray< const GattServiceCharacteristic * > GATT_SERVICES
@ ReliableWriteExt
FIXME: extension?
@ Indicate
@ AuthSignedWrite
@ WriteNoAck
@ Broadcast
@ AuxWriteExt
FIXME: extension?
@ WriteWithAck
@ Optional
@ Mandatory
@ Excluded
@ DEVICE_NAME
@ APPEARANCE
int printf(const char *format,...)
Operating Systems predefined macros.