-
Notifications
You must be signed in to change notification settings - Fork 17
Event object
A CTF event.
Event objects are used in the events
property of a
stream object.
Property | Type | Description | Required? | Default value |
---|---|---|---|---|
log-level |
String (predefined log level name) or integer (zero or positive) | Log level of this event | Optional | No log level |
context-type |
Structure type object or string (alias name) | Type of event context | Optional | No event context |
payload-type |
Structure type object or string (alias name) | Type of event payload | Optional | No event payload |
$include (Including external YAML files) |
String or array of strings | Include base properties from external YAML file(s) | Optional | [] |
All the properties which have a default value can also be set to
null
to force this default value. This is especially useful when
including external YAML files.
Available log level names, for a given event, are defined by the
$log-levels
property of the metadata object
containing it.
Each field of the event context structure type (context-type
property)
corresponds to one parameter
of the generated tracing function (prefixed with sc_
).
Each field of the event payload structure type (payload-type
property)
corresponds to one parameter
of the generated tracing function (prefixed with p_
).
Both the context and payload types are optional, but the event must contain at least one field in one of the following types:
- The event header type of its parent stream
- The event context type of its parent stream
- Its context type
- Its payload type
In other words, the event cannot be completely empty.
Each field name of the context-type
and payload-type
properties must be a
valid C identifier.
log-level: error
context-type:
class: struct
fields:
msg_id: uint16
payload-type:
class: struct
fields:
src:
type: string
dst:
type: string
payload_sz: uint32
Copyright © 2014-2016 Philippe Proulx (project license)