Adjust the ltt API to reflect that facilities, types and fields belong to
[lttv.git] / ltt / branches / poly / include / ltt / event.h
CommitLineData
7c6b3cd7 1#ifndef EVENT_H
2#define EVENT_H
3
4#include <ltt/ltt.h>
975e44c7 5
6/* Events and their content, including the raw data, are only valid
7 until reading another event from the same tracefile.
8 Indeed, since event reading is critical to the performance,
9 the memory associated with an event may be reused at each read. */
10
11
1b82f325 12/* Obtain the trace unique integer id associated with the type of
975e44c7 13 this event */
14
15unsigned ltt_event_eventtype_id(ltt_event *e);
16
17
18/* Facility and type for the event */
19
20ltt_facility *ltt_event_facility(ltt_event *e);
21
22ltt_eventtype *ltt_event_eventtype(ltt_event *e);
23
1b82f325 24
25/* Root field for the event */
26
975e44c7 27ltt_field *ltt_event_field(ltt_event *e);
28
1b82f325 29
975e44c7 30/* Time and cycle count for the event */
31
32ltt_time ltt_event_time(ltt_event *e);
33
34ltt_cycle_count ltt_event_cycle_count(ltt_event *e);
35
36
37/* CPU id and system name of the event */
38
39unsigned ltt_event_cpu_id(ltt_event *e);
40
41char *ltt_event_system_name(ltt_event *e);
42
43
44/* Pointer to the raw data for the event. This should not be used directly
45 unless prepared to do all the architecture specific conversions. */
46
47void *ltt_event_data(ltt_event *e);
48
49
50/* The number of elements in a sequence field is specific to each event.
51 This function returns the number of elements for an array or sequence
52 field in an event. */
53
54unsigned ltt_event_field_element_number(ltt_event *e, ltt_field *f);
55
56
57/* Set the currently selected element for a sequence or array field. */
58
59int ltt_event_field_element_select(ltt_event *e, ltt_field *f, unsigned i);
60
61
62/* These functions extract data from an event after architecture specific
63 conversions. */
64
65unsigned ltt_event_get_unsigned(ltt_event *e, ltt_field *f);
66
67int ltt_event_get_int(ltt_event *e, ltt_field *f);
68
69unsigned long ltt_event_get_long_unsigned(ltt_event *e, ltt_field *f);
70
71long int ltt_event_get_long_int(ltt_event *e, ltt_field *f);
72
73float ltt_event_get_float(ltt_event *e, ltt_field *f);
74
75double ltt_event_get_double(ltt_event *e, ltt_field *f);
76
77
78/* The string obtained is only valid until the next read from
79 the same tracefile. */
80
81char *ltt_event_get_string(ltt_event *e, ltt_field *f);
7c6b3cd7 82
83#endif // EVENT_H
This page took 0.024747 seconds and 4 git commands to generate.