YAML static array field type objects

A static array field type object is the type of static array data fields, found in data streams.

A static array data field is a sequence of data fields, or elements. In CTF, the number of elements in a static array data field (its length) is found in the metadata stream.

Properties

Name Type Description Req?

class

String

This property’s value must be static-array.

Yes if the $inherit property is not set.

$inherit

String

Name of a field type alias from which to inherit.

Yes if the class property is not set.

length

Positive integer

Number of elements in this field type’s instances.

Yes

element-field-type

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.

Yes

Generated C types

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 *

String

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 *

Examples

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