Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
7ecf9215
Commit
7ecf9215
authored
Dec 08, 2013
by
Jeroen Vreeken
Browse files
add trace_def.h to git
parent
7561dbc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/trace/trace_def.h
0 → 100644
View file @
7ecf9215
/*
trace definitions
Copyright Jeroen Vreeken (jeroen@vreeken.net), 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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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 <http://www.gnu.org/licenses/>.
*/
#ifndef _INCLUDE_TRACE_DEF_H_
#define _INCLUDE_TRACE_DEF_H_
#include
<stdint.h>
#ifndef __packed
#define __packed __attribute__((packed))
#endif
#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_ */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment