docs: cleanup: Rephrase and correct typos
[barectf.git] / docs / modules / yaml / pages / static-array-ft-obj.adoc
CommitLineData
016a4d97
PP
1= YAML static array field type objects
2
3A _**static array field type object**_ is the type of static array data
4fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data
5streams].
6
7A static array data field is a sequence of data fields, or
8_elements_. In CTF, the number of elements in a static array data field
9(its length) is found in the
10xref:how-barectf-works:ctf-primer.adoc#trace[metadata stream].
11
12[[props]]
13== Properties
14
15[%autowidth.stretch, cols="d,d,a,d"]
16|===
17|Name |Type |Description |{req-abbr}
18
19|[[class-prop]]`class`
20|String
21|This property's value must be `static-array`.
22|Yes if the <<inherit-prop,`$inherit`>> property is not set.
23
24include::partial$ft-obj-inherit-prop.adoc[]
25
26|[[length-prop]]`length`
27|Positive integer
28|Number of elements in this field type's instances.
29|Yes
30
31|[[element-ft-prop]]`element-field-type`
32|xref:ft-obj.adoc[Field type object] (except a
33xref:struct-ft-obj.adoc[structure field type object] and a
34xref:dyn-array-ft-obj.adoc[dynamic array field type object]) or string
35|Type of each element (data fields) in this field type's instances.
36
37If this property's value is a string, it must be the name of an existing
38xref:trace-type-obj.adoc#ft-aliases-prop[field type alias]. This
39field type must _not_ be a structure field type or a dynamic array
40field type.
41|Yes
42|===
43
44== Generated C{nbsp}types
45
46Pointer to `const __T__`, where `__T__` is the generated C{nbsp}type for
47the field type object of the <<element-ft-prop,`element-field-type`
48property>>.
49
8c3e1601 50include::partial$array-ft-obj-gen-c-types-example.adoc[]
016a4d97
PP
51
52== Examples
53
54.Static array field type object: <<length-prop,four>> 8-bit unsigned xref:int-ft-obj.adoc[integers].
55====
56[source,yaml]
57----
58class: static-array
59length: 4
60element-field-type: uint8
61----
62====
63
64.Static array field type object: <<length-prop,22>>{nbsp}xref:str-ft-obj.adoc[strings].
65====
66[source,yaml]
67----
68class: static-array
69length: 22
70element-field-type:
71 class: string
72----
73====
74
75.Static array field type object: <<length-prop,five>> static arrays of 32{nbsp}double-precision xref:real-ft-obj.adoc[reals].
76====
77[source,yaml]
78----
79class: static-array
80length: 5
81element-field-type:
82 class: static-array
83 length: 32
84 element-field-type:
85 class: real
86 size: 64
87----
88====
This page took 0.026231 seconds and 5 git commands to generate.