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