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.
Properties
Name | Type | Description | Req? |
---|---|---|---|
String |
This property’s value must be |
Yes if the |
|
String |
Name of a field type alias from which to inherit. |
Yes if the |
|
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
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
-
uint32_t
- Dynamic array’s data
-
Pointer to
const T
, whereT
is the generated C type for the field type object of theelement-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 *
Examples
class: dynamic-array
element-field-type: uint8
class: dynamic-array
element-field-type:
class: string
class: dynamic-array
element-field-type:
class: static-array
length: 32
element-field-type:
class: real
size: 64