1 # The MIT License (MIT)
3 # Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
5 # Permission is hereby granted, free of charge, to any person obtaining a copy
6 # of this software and associated documentation files (the "Software"), to deal
7 # in the Software without restriction, including without limitation the rights
8 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 # copies of the Software, and to permit persons to whom the Software is
10 # furnished to do so, subject to the following conditions:
12 # The above copyright notice and this permission notice shall be included in
13 # all copies or substantial portions of the Software.
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 from bt2
import native_bt
, object, utils
24 import collections
.abc
25 from bt2
import field_path
as bt2_field_path
26 from bt2
import integer_range_set
as bt2_integer_range_set
27 from bt2
import value
as bt2_value
31 def _create_field_class_from_ptr_and_get_ref(ptr
):
32 typeid
= native_bt
.field_class_get_type(ptr
)
33 return _FIELD_CLASS_TYPE_TO_OBJ
[typeid
]._create
_from
_ptr
_and
_get
_ref
(ptr
)
36 class IntegerDisplayBase
:
37 BINARY
= native_bt
.FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_BINARY
38 OCTAL
= native_bt
.FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_OCTAL
39 DECIMAL
= native_bt
.FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL
40 HEXADECIMAL
= native_bt
.FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_HEXADECIMAL
43 class _FieldClass(object._SharedObject
):
44 _get_ref
= staticmethod(native_bt
.field_class_get_ref
)
45 _put_ref
= staticmethod(native_bt
.field_class_put_ref
)
47 def _check_create_status(self
, ptr
):
49 raise bt2
._MemoryError(
50 'cannot create {} field class object'.format(self
._NAME
.lower())
54 def user_attributes(self
):
55 ptr
= native_bt
.field_class_borrow_user_attributes(self
._ptr
)
56 assert ptr
is not None
57 return bt2_value
._create
_from
_ptr
_and
_get
_ref
(ptr
)
59 def _user_attributes(self
, user_attributes
):
60 value
= bt2_value
.create_value(user_attributes
)
61 utils
._check
_type
(value
, bt2_value
.MapValue
)
62 native_bt
.field_class_set_user_attributes(self
._ptr
, value
._ptr
)
64 _user_attributes
= property(fset
=_user_attributes
)
67 class _BoolFieldClass(_FieldClass
):
71 class _BitArrayFieldClass(_FieldClass
):
76 length
= native_bt
.field_class_bit_array_get_length(self
._ptr
)
81 class _IntegerFieldClass(_FieldClass
):
83 def field_value_range(self
):
84 size
= native_bt
.field_class_integer_get_field_value_range(self
._ptr
)
88 def _field_value_range(self
, size
):
89 if size
< 1 or size
> 64:
90 raise ValueError("Value is outside valid range [1, 64] ({})".format(size
))
91 native_bt
.field_class_integer_set_field_value_range(self
._ptr
, size
)
93 _field_value_range
= property(fset
=_field_value_range
)
96 def preferred_display_base(self
):
97 base
= native_bt
.field_class_integer_get_preferred_display_base(self
._ptr
)
101 def _preferred_display_base(self
, base
):
102 utils
._check
_uint
64(base
)
105 IntegerDisplayBase
.BINARY
,
106 IntegerDisplayBase
.OCTAL
,
107 IntegerDisplayBase
.DECIMAL
,
108 IntegerDisplayBase
.HEXADECIMAL
,
110 raise ValueError("Display base is not a valid IntegerDisplayBase value")
112 native_bt
.field_class_integer_set_preferred_display_base(self
._ptr
, base
)
114 _preferred_display_base
= property(fset
=_preferred_display_base
)
117 class _UnsignedIntegerFieldClass(_IntegerFieldClass
):
118 _NAME
= 'Unsigned integer'
121 class _SignedIntegerFieldClass(_IntegerFieldClass
):
122 _NAME
= 'Signed integer'
125 class _RealFieldClass(_FieldClass
):
129 def is_single_precision(self
):
130 return native_bt
.field_class_real_is_single_precision(self
._ptr
)
132 def _is_single_precision(self
, is_single_precision
):
133 utils
._check
_bool
(is_single_precision
)
134 native_bt
.field_class_real_set_is_single_precision(
135 self
._ptr
, is_single_precision
138 _is_single_precision
= property(fset
=_is_single_precision
)
141 # an enumeration field class mapping does not have a reference count, so
142 # we copy the properties here to avoid eventual memory access errors.
143 class _EnumerationFieldClassMapping
:
144 def __init__(self
, mapping_ptr
):
145 base_mapping_ptr
= self
._as
_enumeration
_field
_class
_mapping
_ptr
(mapping_ptr
)
146 self
._label
= native_bt
.field_class_enumeration_mapping_get_label(
149 assert self
._label
is not None
150 ranges_ptr
= self
._mapping
_borrow
_ranges
_ptr
(mapping_ptr
)
151 assert ranges_ptr
is not None
152 self
._ranges
= self
._ranges
_type
._create
_from
_ptr
_and
_get
_ref
(ranges_ptr
)
163 class _UnsignedEnumerationFieldClassMapping(_EnumerationFieldClassMapping
):
164 _ranges_type
= bt2_integer_range_set
.UnsignedIntegerRangeSet
165 _as_enumeration_field_class_mapping_ptr
= staticmethod(
166 native_bt
.field_class_enumeration_unsigned_mapping_as_mapping_const
168 _mapping_borrow_ranges_ptr
= staticmethod(
169 native_bt
.field_class_enumeration_unsigned_mapping_borrow_ranges_const
173 class _SignedEnumerationFieldClassMapping(_EnumerationFieldClassMapping
):
174 _ranges_type
= bt2_integer_range_set
.SignedIntegerRangeSet
175 _as_enumeration_field_class_mapping_ptr
= staticmethod(
176 native_bt
.field_class_enumeration_signed_mapping_as_mapping_const
178 _mapping_borrow_ranges_ptr
= staticmethod(
179 native_bt
.field_class_enumeration_signed_mapping_borrow_ranges_const
183 class _EnumerationFieldClass(_IntegerFieldClass
, collections
.abc
.Mapping
):
185 count
= native_bt
.field_class_enumeration_get_mapping_count(self
._ptr
)
189 def add_mapping(self
, label
, ranges
):
190 utils
._check
_str
(label
)
191 utils
._check
_type
(ranges
, self
._range
_set
_type
)
194 raise ValueError("duplicate mapping label '{}'".format(label
))
196 status
= self
._add
_mapping
(self
._ptr
, label
, ranges
._ptr
)
197 utils
._handle
_func
_status
(
198 status
, 'cannot add mapping to enumeration field class object'
201 def mappings_for_value(self
, value
):
202 status
, labels
= self
._get
_mapping
_labels
_for
_value
(self
._ptr
, value
)
203 utils
._handle
_func
_status
(
204 status
, 'cannot get mapping labels for value {}'.format(value
)
206 return [self
[label
] for label
in labels
]
209 for idx
in range(len(self
)):
210 mapping
= self
._get
_mapping
_by
_index
(self
._ptr
, idx
)
213 def __getitem__(self
, label
):
214 utils
._check
_str
(label
)
215 mapping
= self
._get
_mapping
_by
_label
(self
._ptr
, label
)
218 raise KeyError(label
)
222 def __iadd__(self
, mappings
):
223 for label
, ranges
in mappings
:
224 self
.add_mapping(label
, ranges
)
229 class _UnsignedEnumerationFieldClass(
230 _EnumerationFieldClass
, _UnsignedIntegerFieldClass
232 _NAME
= 'Unsigned enumeration'
233 _range_set_type
= bt2_integer_range_set
.UnsignedIntegerRangeSet
234 _add_mapping
= staticmethod(native_bt
.field_class_enumeration_unsigned_add_mapping
)
237 def _get_mapping_by_index(enum_ptr
, index
):
238 mapping_ptr
= native_bt
.field_class_enumeration_unsigned_borrow_mapping_by_index_const(
241 assert mapping_ptr
is not None
242 return _UnsignedEnumerationFieldClassMapping(mapping_ptr
)
245 def _get_mapping_by_label(enum_ptr
, label
):
246 mapping_ptr
= native_bt
.field_class_enumeration_unsigned_borrow_mapping_by_label_const(
250 if mapping_ptr
is None:
253 return _UnsignedEnumerationFieldClassMapping(mapping_ptr
)
256 def _get_mapping_labels_for_value(enum_ptr
, value
):
257 utils
._check
_uint
64(value
)
258 return native_bt
.field_class_enumeration_unsigned_get_mapping_labels_for_value(
263 class _SignedEnumerationFieldClass(_EnumerationFieldClass
, _SignedIntegerFieldClass
):
264 _NAME
= 'Signed enumeration'
265 _range_set_type
= bt2_integer_range_set
.SignedIntegerRangeSet
266 _add_mapping
= staticmethod(native_bt
.field_class_enumeration_signed_add_mapping
)
269 def _get_mapping_by_index(enum_ptr
, index
):
270 mapping_ptr
= native_bt
.field_class_enumeration_signed_borrow_mapping_by_index_const(
273 assert mapping_ptr
is not None
274 return _SignedEnumerationFieldClassMapping(mapping_ptr
)
277 def _get_mapping_by_label(enum_ptr
, label
):
278 mapping_ptr
= native_bt
.field_class_enumeration_signed_borrow_mapping_by_label_const(
282 if mapping_ptr
is None:
285 return _SignedEnumerationFieldClassMapping(mapping_ptr
)
288 def _get_mapping_labels_for_value(enum_ptr
, value
):
289 utils
._check
_int
64(value
)
290 return native_bt
.field_class_enumeration_signed_get_mapping_labels_for_value(
295 class _StringFieldClass(_FieldClass
):
299 class _StructureFieldClassMember
:
300 def __init__(self
, owning_struct_fc
, member_ptr
):
301 # this field class owns the member; keeping it here maintains
302 # the member alive as members are not shared objects
303 self
._owning
_struct
_fc
= owning_struct_fc
304 self
._ptr
= member_ptr
308 name
= native_bt
.field_class_structure_member_get_name(self
._ptr
)
309 assert name
is not None
313 def field_class(self
):
314 fc_ptr
= native_bt
.field_class_structure_member_borrow_field_class_const(
317 assert fc_ptr
is not None
318 return _create_field_class_from_ptr_and_get_ref(fc_ptr
)
321 def user_attributes(self
):
322 ptr
= native_bt
.field_class_structure_member_borrow_user_attributes(self
._ptr
)
323 assert ptr
is not None
324 return bt2_value
._create
_from
_ptr
_and
_get
_ref
(ptr
)
326 def _user_attributes(self
, user_attributes
):
327 value
= bt2_value
.create_value(user_attributes
)
328 utils
._check
_type
(value
, bt2_value
.MapValue
)
329 native_bt
.field_class_structure_member_set_user_attributes(
330 self
._ptr
, value
._ptr
333 _user_attributes
= property(fset
=_user_attributes
)
336 class _StructureFieldClass(_FieldClass
, collections
.abc
.Mapping
):
339 def append_member(self
, name
, field_class
, user_attributes
=None):
340 utils
._check
_str
(name
)
341 utils
._check
_type
(field_class
, _FieldClass
)
344 raise ValueError("duplicate member name '{}'".format(name
))
346 user_attributes_value
= None
348 if user_attributes
is not None:
349 # check now that user attributes are valid
350 user_attributes_value
= bt2
.create_value(user_attributes
)
352 status
= native_bt
.field_class_structure_append_member(
353 self
._ptr
, name
, field_class
._ptr
355 utils
._handle
_func
_status
(
356 status
, 'cannot append member to structure field class object'
359 if user_attributes
is not None:
360 self
[name
]._user
_attributes
= user_attributes_value
363 count
= native_bt
.field_class_structure_get_member_count(self
._ptr
)
367 def _create_member_from_ptr(self
, member_ptr
):
368 return _StructureFieldClassMember(self
, member_ptr
)
370 def __getitem__(self
, key
):
371 if not isinstance(key
, str):
373 "key must be a 'str' object, got '{}'".format(key
.__class
__.__name
__)
376 member_ptr
= native_bt
.field_class_structure_borrow_member_by_name_const(
380 if member_ptr
is None:
383 return self
._create
_member
_from
_ptr
(member_ptr
)
386 for idx
in range(len(self
)):
387 member_ptr
= native_bt
.field_class_structure_borrow_member_by_index_const(
390 assert member_ptr
is not None
391 yield native_bt
.field_class_structure_member_get_name(member_ptr
)
393 def __iadd__(self
, members
):
394 for name
, field_class
in members
:
395 self
.append_member(name
, field_class
)
399 def member_at_index(self
, index
):
400 utils
._check
_uint
64(index
)
402 if index
>= len(self
):
405 member_ptr
= native_bt
.field_class_structure_borrow_member_by_index_const(
408 assert member_ptr
is not None
409 return self
._create
_member
_from
_ptr
(member_ptr
)
412 class _OptionFieldClass(_FieldClass
):
414 def field_class(self
):
415 elem_fc_ptr
= native_bt
.field_class_option_borrow_field_class_const(self
._ptr
)
416 return _create_field_class_from_ptr_and_get_ref(elem_fc_ptr
)
419 def selector_field_path(self
):
420 ptr
= native_bt
.field_class_option_borrow_selector_field_path_const(self
._ptr
)
424 return bt2_field_path
._FieldPath
._create
_from
_ptr
_and
_get
_ref
(ptr
)
427 class _VariantFieldClassOption
:
428 def __init__(self
, owning_var_fc
, option_ptr
):
429 # this field class owns the option; keeping it here maintains
430 # the option alive as options are not shared objects
431 self
._owning
_var
_fc
= owning_var_fc
432 self
._ptr
= option_ptr
436 name
= native_bt
.field_class_variant_option_get_name(self
._ptr
)
437 assert name
is not None
441 def field_class(self
):
442 fc_ptr
= native_bt
.field_class_variant_option_borrow_field_class_const(
445 assert fc_ptr
is not None
446 return _create_field_class_from_ptr_and_get_ref(fc_ptr
)
449 def user_attributes(self
):
450 ptr
= native_bt
.field_class_variant_option_borrow_user_attributes(self
._ptr
)
451 assert ptr
is not None
452 return bt2_value
._create
_from
_ptr
_and
_get
_ref
(ptr
)
454 def _user_attributes(self
, user_attributes
):
455 value
= bt2_value
.create_value(user_attributes
)
456 utils
._check
_type
(value
, bt2_value
.MapValue
)
457 native_bt
.field_class_variant_option_set_user_attributes(self
._ptr
, value
._ptr
)
459 _user_attributes
= property(fset
=_user_attributes
)
462 class _VariantFieldClass(_FieldClass
, collections
.abc
.Mapping
):
464 _borrow_option_by_name_ptr
= staticmethod(
465 native_bt
.field_class_variant_borrow_option_by_name_const
467 _borrow_member_by_index_ptr
= staticmethod(
468 native_bt
.field_class_variant_borrow_option_by_index_const
472 def _as_option_ptr(opt_ptr
):
475 def _create_option_from_ptr(self
, opt_ptr
):
476 return _VariantFieldClassOption(self
, opt_ptr
)
479 count
= native_bt
.field_class_variant_get_option_count(self
._ptr
)
483 def __getitem__(self
, key
):
484 if not isinstance(key
, str):
486 "key must be a 'str' object, got '{}'".format(key
.__class
__.__name
__)
489 opt_ptr
= self
._borrow
_option
_by
_name
_ptr
(self
._ptr
, key
)
494 return self
._create
_option
_from
_ptr
(opt_ptr
)
497 for idx
in range(len(self
)):
498 opt_ptr
= self
._borrow
_member
_by
_index
_ptr
(self
._ptr
, idx
)
499 assert opt_ptr
is not None
500 base_opt_ptr
= self
._as
_option
_ptr
(opt_ptr
)
501 yield native_bt
.field_class_variant_option_get_name(base_opt_ptr
)
503 def option_at_index(self
, index
):
504 utils
._check
_uint
64(index
)
506 if index
>= len(self
):
509 opt_ptr
= self
._borrow
_member
_by
_index
_ptr
(self
._ptr
, index
)
510 assert opt_ptr
is not None
511 return self
._create
_option
_from
_ptr
(opt_ptr
)
514 class _VariantFieldClassWithoutSelector(_VariantFieldClass
):
515 _NAME
= 'Variant (without selector)'
517 def append_option(self
, name
, field_class
, user_attributes
=None):
518 utils
._check
_str
(name
)
519 utils
._check
_type
(field_class
, _FieldClass
)
522 raise ValueError("duplicate option name '{}'".format(name
))
524 user_attributes_value
= None
526 if user_attributes
is not None:
527 # check now that user attributes are valid
528 user_attributes_value
= bt2
.create_value(user_attributes
)
530 status
= native_bt
.field_class_variant_without_selector_append_option(
531 self
._ptr
, name
, field_class
._ptr
533 utils
._handle
_func
_status
(
534 status
, 'cannot append option to variant field class object'
537 if user_attributes
is not None:
538 self
[name
]._user
_attributes
= user_attributes_value
540 def __iadd__(self
, options
):
541 for name
, field_class
in options
:
542 self
.append_option(name
, field_class
)
547 class _VariantFieldClassWithSelectorOption(_VariantFieldClassOption
):
548 def __init__(self
, owning_var_fc
, spec_opt_ptr
):
549 self
._spec
_ptr
= spec_opt_ptr
550 super().__init
__(owning_var_fc
, self
._as
_option
_ptr
(spec_opt_ptr
))
554 range_set_ptr
= self
._borrow
_ranges
_ptr
(self
._spec
_ptr
)
555 assert range_set_ptr
is not None
556 return self
._range
_set
_type
._create
_from
_ptr
_and
_get
_ref
(range_set_ptr
)
559 class _VariantFieldClassWithSignedSelectorOption(_VariantFieldClassWithSelectorOption
):
560 _as_option_ptr
= staticmethod(
561 native_bt
.field_class_variant_with_selector_signed_option_as_option_const
563 _borrow_ranges_ptr
= staticmethod(
564 native_bt
.field_class_variant_with_selector_signed_option_borrow_ranges_const
566 _range_set_type
= bt2_integer_range_set
.SignedIntegerRangeSet
569 class _VariantFieldClassWithUnsignedSelectorOption(
570 _VariantFieldClassWithSelectorOption
572 _as_option_ptr
= staticmethod(
573 native_bt
.field_class_variant_with_selector_unsigned_option_as_option_const
575 _borrow_ranges_ptr
= staticmethod(
576 native_bt
.field_class_variant_with_selector_unsigned_option_borrow_ranges_const
578 _range_set_type
= bt2_integer_range_set
.UnsignedIntegerRangeSet
581 class _VariantFieldClassWithSelector(_VariantFieldClass
):
582 _NAME
= 'Variant (with selector)'
584 def _create_option_from_ptr(self
, opt_ptr
):
585 return self
._option
_type
(self
, opt_ptr
)
588 def selector_field_path(self
):
589 ptr
= native_bt
.field_class_variant_with_selector_borrow_selector_field_path_const(
596 return bt2_field_path
._FieldPath
._create
_from
_ptr
_and
_get
_ref
(ptr
)
598 def append_option(self
, name
, field_class
, ranges
, user_attributes
=None):
599 utils
._check
_str
(name
)
600 utils
._check
_type
(field_class
, _FieldClass
)
601 utils
._check
_type
(ranges
, self
._option
_type
._range
_set
_type
)
604 raise ValueError("duplicate option name '{}'".format(name
))
607 raise ValueError('range set is empty')
609 user_attributes_value
= None
611 if user_attributes
is not None:
612 # check now that user attributes are valid
613 user_attributes_value
= bt2
.create_value(user_attributes
)
615 # TODO: check overlaps (precondition of self._append_option())
617 status
= self
._append
_option
(self
._ptr
, name
, field_class
._ptr
, ranges
._ptr
)
618 utils
._handle
_func
_status
(
619 status
, 'cannot append option to variant field class object'
622 if user_attributes
is not None:
623 self
[name
]._user
_attributes
= user_attributes_value
625 def __iadd__(self
, options
):
626 for name
, field_class
, ranges
in options
:
627 self
.append_option(name
, field_class
, ranges
)
632 class _VariantFieldClassWithUnsignedSelector(_VariantFieldClassWithSelector
):
633 _NAME
= 'Variant (with unsigned selector)'
634 _borrow_option_by_name_ptr
= staticmethod(
635 native_bt
.field_class_variant_with_selector_unsigned_borrow_option_by_name_const
637 _borrow_member_by_index_ptr
= staticmethod(
638 native_bt
.field_class_variant_with_selector_unsigned_borrow_option_by_index_const
640 _append_option
= staticmethod(
641 native_bt
.field_class_variant_with_selector_unsigned_append_option
643 _option_type
= _VariantFieldClassWithUnsignedSelectorOption
644 _as_option_ptr
= staticmethod(_option_type
._as
_option
_ptr
)
647 class _VariantFieldClassWithSignedSelector(_VariantFieldClassWithSelector
):
648 _NAME
= 'Variant (with signed selector)'
649 _borrow_option_by_name_ptr
= staticmethod(
650 native_bt
.field_class_variant_with_selector_signed_borrow_option_by_name_const
652 _borrow_member_by_index_ptr
= staticmethod(
653 native_bt
.field_class_variant_with_selector_signed_borrow_option_by_index_const
655 _append_option
= staticmethod(
656 native_bt
.field_class_variant_with_selector_signed_append_option
658 _option_type
= _VariantFieldClassWithSignedSelectorOption
659 _as_option_ptr
= staticmethod(_option_type
._as
_option
_ptr
)
662 class _ArrayFieldClass(_FieldClass
):
664 def element_field_class(self
):
665 elem_fc_ptr
= native_bt
.field_class_array_borrow_element_field_class_const(
668 return _create_field_class_from_ptr_and_get_ref(elem_fc_ptr
)
671 class _StaticArrayFieldClass(_ArrayFieldClass
):
674 return native_bt
.field_class_array_static_get_length(self
._ptr
)
677 class _DynamicArrayFieldClass(_ArrayFieldClass
):
679 def length_field_path(self
):
680 ptr
= native_bt
.field_class_array_dynamic_borrow_length_field_path_const(
686 return bt2_field_path
._FieldPath
._create
_from
_ptr
_and
_get
_ref
(ptr
)
689 _FIELD_CLASS_TYPE_TO_OBJ
= {
690 native_bt
.FIELD_CLASS_TYPE_BOOL
: _BoolFieldClass
,
691 native_bt
.FIELD_CLASS_TYPE_BIT_ARRAY
: _BitArrayFieldClass
,
692 native_bt
.FIELD_CLASS_TYPE_UNSIGNED_INTEGER
: _UnsignedIntegerFieldClass
,
693 native_bt
.FIELD_CLASS_TYPE_SIGNED_INTEGER
: _SignedIntegerFieldClass
,
694 native_bt
.FIELD_CLASS_TYPE_REAL
: _RealFieldClass
,
695 native_bt
.FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION
: _UnsignedEnumerationFieldClass
,
696 native_bt
.FIELD_CLASS_TYPE_SIGNED_ENUMERATION
: _SignedEnumerationFieldClass
,
697 native_bt
.FIELD_CLASS_TYPE_STRING
: _StringFieldClass
,
698 native_bt
.FIELD_CLASS_TYPE_STRUCTURE
: _StructureFieldClass
,
699 native_bt
.FIELD_CLASS_TYPE_STATIC_ARRAY
: _StaticArrayFieldClass
,
700 native_bt
.FIELD_CLASS_TYPE_DYNAMIC_ARRAY
: _DynamicArrayFieldClass
,
701 native_bt
.FIELD_CLASS_TYPE_OPTION
: _OptionFieldClass
,
702 native_bt
.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR
: _VariantFieldClassWithoutSelector
,
703 native_bt
.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_SELECTOR
: _VariantFieldClassWithUnsignedSelector
,
704 native_bt
.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_SELECTOR
: _VariantFieldClassWithSignedSelector
,