1 = YAML trace type object
3 A _**trace type object**_ is the type of a xref:trace-obj.adoc[trace
6 A trace type describes everything a CTF consumer needs to decode all the
7 trace's xref:how-barectf-works:ctf-primer.adoc#ds[data
10 A trace type object is only found as the
11 xref:trace-obj.adoc#type-prop[`type` property] of a trace object.
16 [%autowidth.stretch, cols="d,d,a,d,d", role="can-break"]
18 |Name |Type |Description |{req-abbr} |Default
20 |[[native-bo]]`native-byte-order`
21 |xref:common-values.adoc#byte-order[Byte order]
22 |Native byte order of the system which produces this trace type's
23 instance's xref:how-barectf-works:ctf-primer.adoc#ds[data streams].
28 |xref:common-values.adoc#uuid[UUID] or string
29 |UUID of this trace type.
31 If this property's value is the string `auto`, barectf generates a UUID.
36 |[[ft-aliases-prop]]`$field-type-aliases`
37 |Mapping of string keys to xref:ft-obj.adoc[field type objects]
41 Keys of this mapping are field type alias names.
43 If an entry's value is a string, it must be the name of an existing
46 You can use a field type alias name anywhere you can use a
47 xref:ft-obj.adoc[field type object].
51 |[[ll-aliases-prop]]`$log-level-aliases`
52 |Mapping of string keys to integers
55 Keys of this mapping are log level alias names.
57 Values of this mapping are positive integral log levels.
59 You can use a log level alias name as the value of an event record type
60 object's xref:ert-obj.adoc#ll-prop[`log-level` property].
66 |Features of this trace type's instance (trace).
68 |See <<features-obj>> for default values.
70 |[[clk-types-prop]]`clock-types`
71 |Mapping of string keys to xref:clk-type-obj.adoc[clock type objects]
72 |Clock type store for this trace type.
74 Keys of this mapping are clock type names. They must be valid
75 xref:index.adoc#tsdl-ident[TSDL identifiers].
78 xref:dst-obj.adoc#def-clk-type-name-prop[`$default-clock-type-name`
79 property] of a data stream type object refers to a key of this mapping.
83 |[[dsts-prop]]`data-stream-types`
84 |Mapping of string keys to xref:dst-obj.adoc[data stream
86 |Data stream types of this trace type.
88 Keys of this mapping are data stream type names. They must be valid
91 This mapping must contain at least one entry.
95 |[[include-prop]]`$include`
97 |See xref:include.adoc[].
105 The features of a trace type object.
107 As of barectf{nbsp}{page-component-version}, each feature controls
108 whether or not some information will be part of the header of each
109 xref:how-barectf-works:ctf-primer.adoc#pkt[CTF packet] which the
110 generated tracer produces.
112 You can enable or disable a feature. When you enable one, you can set
113 its xref:ft-obj.adoc[field type] explicitly or make barectf choose a
118 For all the feature properties below, if the value is a boolean:
121 Make barectf use a default field type.
126 All the properties are optional.
128 [%autowidth.stretch, cols="d,d,a,d", role="can-break"]
130 |Name |Type |Description |Default
132 |[[magic-ft-prop]]`magic-field-type`
133 |32-bit{nbsp}unsigned xref:int-ft-obj.adoc[integer field type object],
135 |Type of packet header's magic number field.
137 If this property's value is a string, it must be the name of an existing
138 <<ft-aliases-prop,field type alias>>.
141 |[[uuid-ft-prop]]`uuid-field-type`
142 |xref:static-array-ft-obj.adoc[Static array field type object] of
143 16{nbsp}8-bit{nbsp}unsigned xref:int-ft-obj.adoc[integer field
144 type objects] (8-bit{nbsp}alignment), string, or boolean
145 |Type of packet header's trace type UUID field.
147 If this property's value is a string, it must be the name of an existing
148 <<ft-aliases-prop,field type alias>>.
149 |True if this trace type has a <<uuid-prop,`uuid` property>>, or false
152 |[[dst-id-ft-prop]]`data-stream-type-id-field-type`
153 |Unsigned xref:int-ft-obj.adoc[integer field type object], string,
155 |Type of packet header's xref:dst-obj.adoc[data stream type] ID field.
157 If this property's value is a string, it must be the name of an existing
158 <<ft-aliases-prop,field type alias>>.
160 This feature is required when this trace type has more than one
161 data stream type (<<dsts-prop,`data-stream-types` property>>).
167 NOTE: The following examples can omit <<dsts-prop,data stream type
168 objects>> for clarity.
170 .Basic trace type object.
174 native-byte-order: little-endian
180 .Trace type object with a specific <<uuid-prop,UUID>>.
184 native-byte-order: little-endian
185 uuid: 1b706833-b56c-4960-b5f7-e43651ff01fb
191 .Trace type object with an automatic <<uuid-prop,UUID>>.
195 native-byte-order: little-endian
202 .Trace type object with a disabled <<magic-ft-prop,magic field type feature>>.
206 native-byte-order: little-endian
208 magic-field-type: false
214 .Trace type object with a specific <<dst-id-ft-prop,data stream type ID field type feature>>.
218 native-byte-order: little-endian
220 data-stream-type-id-field-type:
221 class: unsigned-integer
228 .Trace type object with a <<clk-types-prop,clock type object>>.
232 native-byte-order: little-endian
236 description: Clock A13 (8 MHz)
237 origin-is-unix-epoch: false
240 $default-clock-type-name: sys_clock
246 .Trace type object with <<ft-aliases-prop,field type aliases>>.
250 native-byte-order: little-endian
254 preferred-display-base: hexadecimal
260 magic-field-type: hex-uint8
267 messages: string-array
274 .Trace type object with a <<ll-aliases-prop,log level alias>>.
278 native-byte-order: little-endian
293 .Trace type object with <<include-prop,inclusions>>.
297 native-byte-order: little-endian
303 - network-field-type-aliases.yaml
304 - sched-field-type-aliases.yaml
305 - default-log-levels.yaml
306 - project-b-data-stream-types.yaml