Debian Codegraph @

docs/modules/yaml/pages/real-ft-obj.adoc

raw
1 = YAML real field type object
2
3 A _**real field type object**_ is the type of floating point number data
4 fields, found in xref:how-barectf-works:ctf-primer.adoc#ds[data
5 streams].
6
7 [[props]]
8 == Properties
9
10 [%autowidth.stretch, cols="d,d,a,d,a"]
11 |===
12 |Name |Type |Description |{req-abbr} |Default
13
14 |[[class-prop]]`class`
15 |String
16 |This property's value must be `real`.
17 |Yes if the <<inherit-prop,`$inherit`>> property is not set.
18 |
19
20 include::partial$ft-obj-inherit-prop.adoc[]
21 |
22
23 |[[size-prop]]`size`
24 |Positive integer
25 |Size of this field type's instances (bits).
26
27 This property's value must be one of:
28
29 32::
30 https://en.wikipedia.org/wiki/Single-precision_floating-point_format[Single-precision floating point number]
31 instances (binary32).
32
33 64::
34 https://en.wikipedia.org/wiki/Double-precision_floating-point_format[Double-precision floating point number]
35 instances (binary64).
36 |Yes
37 |
38
39 |[[align-prop]]`alignment`
40 |Power-of-two integer
41 |Alignment of the first bit of this field type's instances within a
42 xref:how-barectf-works:ctf-primer.adoc#pkt[CTF{nbsp}packet] (bits).
43 |No
44 |8
45 |===
46
47 == Generated C{nbsp}types
48
49 Depending on the value of the <<size-prop,`size` property>>:
50
51 32::
52 `float`
53
54 64::
55 `double`
56
57 == Examples
58
59 .Basic <<size-prop,single-precision>> real field type object.
60 ====
61 [source,yaml]
62 ----
63 class: real
64 size: 32
65 ----
66 ====
67
68 .Basic <<size-prop,double-precision>> real field type object.
69 ====
70 [source,yaml]
71 ----
72 class: real
73 size: 64
74 ----
75 ====
76
77 .64-bit-<<align-prop,aligned>> <<size-prop,single-precision>> real field type object.
78 ====
79 [source,yaml]
80 ----
81 class: real
82 size: 32
83 alignment: 64
84 ----
85 ====