1 = YAML dynamic array field type objects
3 A _**dynamic array field type object**_ is the type of dynamic
4 (variable-length) array data fields, found in
5 xref:how-barectf-works:ctf-primer.adoc#ds[data streams].
7 A dynamic array data field is a sequence of data fields, or _elements_.
8 In CTF, the number of elements in a dynamic array data field (its
9 length) is the value of a prior integer data field.
14 [%autowidth.stretch, cols="d,d,a,d"]
16 |Name |Type |Description |{req-abbr}
18 |[[class-prop]]`class`
20 |This property's value must be `dynamic-array`.
21 |Yes if the <<inherit-prop,`$inherit`>> property is not set.
23 include::partial$ft-obj-inherit-prop.adoc[]
25 |[[element-ft-prop]]`element-field-type`
26 |xref:ft-obj.adoc[Field type object] (except a
27 xref:struct-ft-obj.adoc[structure field type object] and a
28 dynamic array field type object) or string
29 |Type of each element (data fields) in this field type's instances.
31 If this property's value is a string, it must be the name of an existing
32 xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. This
33 field type must _not_ be a structure field type or a dynamic array
38 == Generated C{nbsp}types
40 barectf always generates two packet opening or tracing function
41 parameters for a dynamic array field type object. Their C{nbsp}types
44 Dynamic array's length::
47 Dynamic array's data::
48 Pointer to `const __T__`, where `__T__` is the generated C{nbsp}type
49 for the field type object of the
50 <<element-ft-prop,`element-field-type` property>>.
52 include::partial$array-ft-obj-gen-c-types-example.adoc[]
56 .Dynamic array field type object: 8-bit unsigned xref:int-ft-obj.adoc[integers].
61 element-field-type: uint8
65 .Dynamic array field type object: xref:str-ft-obj.adoc[strings].
75 .Dynamic array field type object: xref:static-array-ft-obj.adoc[static arrays] of 32{nbsp}double-precision xref:real-ft-obj.adoc[reals].