7ff057f5cf2489f53025ebc3a96697fba4d523a1
1 #ifndef BABELTRACE_CTF_IR_PACKET_H
2 #define BABELTRACE_CTF_IR_PACKET_H
5 * BabelTrace - CTF IR: Stream packet
7 * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * The Common Trace Format (CTF) Specification is available at
28 * http://www.efficios.com/ctf
33 /* For enum bt_property_availability */
34 #include <babeltrace/property.h>
36 /* For enum bt_clock_value_status */
37 #include <babeltrace/ctf-ir/clock-value.h>
44 struct bt_packet_header_field
;
45 struct bt_packet_context_field
;
47 struct bt_clock_value
;
49 extern struct bt_packet
*bt_packet_create(struct bt_stream
*stream
);
51 extern struct bt_stream
*bt_packet_borrow_stream(struct bt_packet
*packet
);
54 struct bt_field
*bt_packet_borrow_header_field(struct bt_packet
*packet
);
57 int bt_packet_move_header_field(struct bt_packet
*packet
,
58 struct bt_packet_header_field
*header
);
61 struct bt_field
*bt_packet_borrow_context_field(struct bt_packet
*packet
);
64 int bt_packet_move_context_field(struct bt_packet
*packet
,
65 struct bt_packet_context_field
*context
);
68 enum bt_clock_value_status
bt_packet_borrow_default_beginning_clock_value(
69 struct bt_packet
*packet
, struct bt_clock_value
**clock_value
);
72 int bt_packet_set_default_beginning_clock_value(struct bt_packet
*packet
,
73 uint64_t value_cycles
);
76 enum bt_clock_value_status
bt_packet_borrow_default_end_clock_valeu(
77 struct bt_packet
*packet
, struct bt_clock_value
**clock_value
);
80 int bt_packet_set_default_end_clock_value(struct bt_packet
*packet
,
81 uint64_t value_cycles
);
84 enum bt_property_availability
bt_packet_get_discarded_event_counter_snapshot(
85 struct bt_packet
*packet
, uint64_t *value
);
88 int bt_packet_set_discarded_event_counter_snapshot(struct bt_packet
*packet
,
92 enum bt_property_availability
bt_packet_get_packet_counter_snapshot(
93 struct bt_packet
*packet
, uint64_t *value
);
96 int bt_packet_set_packet_counter_snapshot(struct bt_packet
*packet
,
103 #endif /* BABELTRACE_CTF_IR_PACKET_H */
This page took 0.031167 seconds and 3 git commands to generate.