Commit 7ecf9215 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

add trace_def.h to git

parent 7561dbc4
trace definitions
Copyright Jeroen Vreeken (, 2013
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <>.
#include <stdint.h>
#ifndef __packed
#define __packed __attribute__((packed))
#define TRACE_END 192
#define TRACE_ESC 219
#define TRACE_ESC_END 220
#define TRACE_ESC_ESC 221
struct trace_header {
uint8_t type;
} __packed;
struct trace_ptype_timestamp {
uint64_t sec;
uint32_t nsec;
} __packed;
/* trace_ptype_list
strings are null terminated
name (str), value type byte, unit (str)
struct trace_ptype_interval {
uint64_t sec;
uint32_t nsec;
uint8_t type;
} __packed;
/* trace_ptype_name
null terminated string
struct trace_ptype_value_type {
uint8_t type;
} __packed;
struct trace_ptype_value {
union {
uint32_t u32;
uint16_t u16;
uint8_t u8;
} u;
} __packed;
#endif /* _INCLUDE_TRACE_DEF_H_ */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment