# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
+from pkg_resources import resource_filename
from termcolor import cprint, colored
import barectf.tsdl182gen
import barectf.config
if not os.path.isfile(args.config):
_perror('"{}" is not an existing file'.format(args.config))
+ # append current working directory and provided include directory
+ args.include_dir += [os.getcwd(), resource_filename(__name__, 'include')]
+
return args
metadata.Variant: self._create_variant,
}
self._include_dirs = include_dirs
- self._include_dirs.append(os.getcwd())
self._ignore_include_not_found = ignore_include_not_found
self._dump_config = dump_config
--- /dev/null
+# Include this in the metadata object to have access to the LTTng-UST
+# log level values by name.
+#
+# Note that the values from 0 to 7 are compatible with syslog log
+# levels, although the debug severity in syslog is named DEBUG_SYSTEM
+# here.
+
+$log-levels:
+ EMERG: 0
+ ALERT: 1
+ CRIT: 2
+ ERR: 3
+ WARNING: 4
+ NOTICE: 5
+ INFO: 6
+ DEBUG_SYSTEM: 7
+ DEBUG_PROGRAM: 8
+ DEBUG_PROCESS: 9
+ DEBUG_MODULE: 10
+ DEBUG_UNIT: 11
+ DEBUG_FUNCTION: 12
+ DEBUG_LINE: 13
+ DEBUG: 14
--- /dev/null
+# Include this in the metadata object of your configuration to have
+# access to basic floating point number type aliases.
+
+type-aliases:
+ # IEEE 754-2008 binary32 (single-precision)
+ float:
+ class: floating-point
+ size:
+ exp: 8
+ mant: 24
+ align: 32
+
+ # IEEE 754-2008 binary64 (double-precision)
+ double:
+ class: floating-point
+ size:
+ exp: 11
+ mant: 53
+ align: 64
--- /dev/null
+# Include this in the metadata object of your configuratio
+# access to basic integer type aliases.
+
+type-aliases:
+ # 8-bit unsigned integer, 8-bit aligned
+ uint8:
+ class: int
+ size: 8
+ align: 8
+ byte: uint8
+
+ # 8-bit signed integer, 8-bit aligned
+ int8:
+ $inherit: uint8
+ signed: true
+
+ # 16-bit unsigned integer, 16-bit aligned
+ uint16:
+ class: int
+ size: 16
+ align: 16
+ word: uint16
+
+ # 16-bit signed integer, 16-bit aligned
+ int16:
+ $inherit: uint8
+ signed: true
+
+ # 32-bit unsigned integer, 32-bit aligned
+ uint32:
+ class: int
+ size: 32
+ align: 32
+ dword: uint32
+
+ # 32-bit signed integer, 32-bit aligned
+ int32:
+ $inherit: uint8
+ signed: true
+
+ # 64-bit unsigned integer, 64-bit aligned
+ uint64:
+ class: int
+ size: 64
+ align: 64
+
+ # 64-bit signed integer, 64-bit aligned
+ int64:
+ $inherit: uint8
+ signed: true
+
+ # byte-packed 8-bit unsigned integer
+ byte-packed-uint8: uint8
+
+ # byte-packed 8-bit signed integer
+ byte-packed-int8: int8
+
+ # byte-packed 16-bit unsigned integer
+ byte-packed-uint16:
+ $inherit: uint16
+ align: 8
+
+ # byte-packed 16-bit signed integer
+ byte-packed-int16:
+ $inherit: int16
+ align: 8
+
+ # byte-packed 32-bit unsigned integer
+ byte-packed-uint32:
+ $inherit: uint32
+ align: 8
+
+ # byte-packed 32-bit signed integer
+ byte-packed-int32:
+ $inherit: int32
+ align: 8
+
+ # byte-packed 64-bit unsigned integer
+ byte-packed-uint64:
+ $inherit: uint64
+ align: 8
+
+ # byte-packed 64-bit signed integer
+ byte-packed-int64:
+ $inherit: int64
+ align: 8
+
+ # byte-packed 8-bit unsigned integer
+ bit-packed-uint8:
+ $inherit: uint8
+ align: 1
+
+ # bit-packed 8-bit signed integer
+ bit-packed-int8:
+ $inherit: int8
+ align: 1
+
+ # bit-packed 16-bit unsigned integer
+ bit-packed-uint16:
+ $inherit: uint16
+ align: 1
+
+ # bit-packed 16-bit signed integer
+ bit-packed-int16:
+ $inherit: int16
+ align: 1
+
+ # bit-packed 32-bit unsigned integer
+ bit-packed-uint32:
+ $inherit: uint32
+ align: 1
+
+ # bit-packed 32-bit signed integer
+ bit-packed-int32:
+ $inherit: int32
+ align: 1
+
+ # bit-packed 64-bit unsigned integer
+ bit-packed-uint64:
+ $inherit: uint64
+ align: 1
+
+ # bit-packed 64-bit signed integer
+ bit-packed-int64:
+ $inherit: int64
+ align: 1
--- /dev/null
+# Include this in the metadata object of your configuration to have
+# access to various useful type aliases.
+
+type-aliases:
+ # UUID array
+ uuid:
+ class: array
+ length: 16
+ element-type:
+ class: int
+ size: 8
+
+ # CTF magic number type
+ ctf-magic:
+ class: int
+ size: 32
+ align: 32
+
+ # a simple string
+ string:
+ class: string
--- /dev/null
+# Include this in the trace object of your configuration to get a
+# default, basic trace object with a little-endian byte order. The
+# packet header type contains the 32-bit magic number, followed by the
+# UUID, followed by an 8-bit stream ID. The trace's UUID is
+# automatically generated by barectf.
+
+byte-order: le
+uuid: auto
+packet-header-type:
+ class: struct
+ fields:
+ magic:
+ class: int
+ size: 32
+ align: 32
+ uuid:
+ class: array
+ length: 16
+ element-type:
+ class: int
+ size: 8
+ stream_id:
+ class: int
+ size: 8
packages=[
'barectf',
],
+ package_data={
+ 'barectf': [
+ 'include/*.yaml',
+ ],
+ },
install_requires=[
'termcolor',
'pyyaml',