YAML dynamic array field type objects

A dynamic array field type object is the type of dynamic (variable-length) array data fields, found in data streams.

A dynamic array data field is a sequence of data fields, or elements. In CTF, the number of elements in a dynamic array data field (its length) is the value of a prior integer data field.


Name Type Description Req?



This property’s value must be dynamic-array.

Yes if the $inherit property is not set.



Name of a field type alias from which to inherit.

Yes if the class property is not set.


Field type object (except a structure field type object and a dynamic array field type object) or string

Type of each element (data fields) in this field type’s instances.

If this property’s value is a string, it must be the name of an existing field type alias. This field type must not be a structure field type or a dynamic array field type.


Generated C types

barectf always generates two packet opening or tracing function parameters for a dynamic array field type object. Their C types are:

Dynamic array’s length


Dynamic array’s data

Pointer to const T, where T is the generated C type for the field type object of the element-field-type property.

Example 1. Generated C types for various element field types.
Element field type Generated C type

8-bit unsigned integer

const uint8_t *

32-bit signed integer

const int32_t *

Single-precision real

const float *


const char * const *

Static array of 16-bit signed integers

const int16_t * const *

Static array of double-precision reals

const double * const *

Static array of strings

const char * const * const *

Static array of static arrays of 32-bit unsigned integers

const uint32_t * const * const *


Example 2. Dynamic array field type object: 8-bit unsigned integers.
class: dynamic-array
element-field-type: uint8
Example 3. Dynamic array field type object: strings.
class: dynamic-array
  class: string
Example 4. Dynamic array field type object: static arrays of 32 double-precision reals.
class: dynamic-array
  class: static-array
  length: 32
    class: real
    size: 64