Commit | Line | Data |
---|---|---|
af2a1fe5 MD |
1 | /* |
2 | * lttng-events-write.h | |
3 | * | |
4 | * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
5 | * | |
6 | * This library is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU Lesser General Public | |
8 | * License as published by the Free Software Foundation; only | |
9 | * version 2.1 of the License. | |
10 | * | |
11 | * This library is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | * Lesser General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU Lesser General Public | |
17 | * License along with this library; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | */ | |
20 | ||
21 | #undef ctf_integer_nowrite | |
22 | #define ctf_integer_nowrite(_type, _item, _user_src) \ | |
23 | _ctf_integer_ext(_type, _item, _user_src, __BYTE_ORDER, 10, 0, 1) | |
24 | ||
25 | #undef ctf_integer_hex_nowrite | |
26 | #define ctf_integer_hex_nowrite(_type, _item, _user_src) \ | |
27 | _ctf_integer_ext(_type, _item, _user_src, __BYTE_ORDER, 16, 0, 1) | |
28 | ||
29 | #undef ctf_integer_oct_nowrite | |
30 | #define ctf_integer_oct_nowrite(_type, _item, _user_src) \ | |
31 | _ctf_integer_ext(_type, _item, _user_src, __BYTE_ORDER, 8, 0, 1) | |
32 | ||
33 | #undef ctf_integer_network_nowrite | |
34 | #define ctf_integer_network_nowrite(_type, _item, _user_src) \ | |
35 | _ctf_integer_ext(_type, _item, _user_src, __BIG_ENDIAN, 10, 0, 1) | |
36 | ||
37 | #undef ctf_integer_network_hex_nowrite | |
38 | #define ctf_integer_network_hex_nowrite(_type, _item, _user_src) \ | |
39 | _ctf_integer_ext(_type, _item, _user_src, __BIG_ENDIAN, 16, 0, 1) | |
40 | ||
41 | #undef ctf_array_nowrite | |
42 | #define ctf_array_nowrite(_type, _item, _user_src, _length) \ | |
43 | _ctf_array_encoded(_type, _item, _user_src, _length, none, 0, 1) | |
44 | ||
45 | #undef ctf_array_text_nowrite | |
46 | #define ctf_array_text_nowrite(_type, _item, _user_src, _length) \ | |
47 | _ctf_array_encoded(_type, _item, _user_src, _length, UTF8, 0, 1) | |
48 | ||
49 | #undef ctf_sequence_nowrite | |
50 | #define ctf_sequence_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
51 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
52 | _length_type, _user_src_length, none, __BYTE_ORDER, 10, 0, 1) | |
53 | ||
54 | #undef ctf_sequence_text_nowrite | |
55 | #define ctf_sequence_text_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
56 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
5e6f60b2 | 57 | _length_type, _user_src_length, UTF8, __BYTE_ORDER, 10, 0, 1) |
af2a1fe5 MD |
58 | |
59 | #undef ctf_string_nowrite | |
60 | #define ctf_string_nowrite(_item, _user_src) \ | |
61 | _ctf_string(_item, _user_src, 0, 1) | |
62 | ||
63 | /* user src */ | |
64 | #undef ctf_user_integer_nowrite | |
65 | #define ctf_user_integer_nowrite(_type, _item, _user_src) \ | |
66 | _ctf_integer_ext(_type, _item, _user_src, __BYTE_ORDER, 10, 1, 1) | |
67 | ||
68 | #undef ctf_user_integer_hex_nowrite | |
69 | #define ctf_user_integer_hex_nowrite(_type, _item, _user_src) \ | |
70 | _ctf_integer_ext(_type, _item, _user_src, __BYTE_ORDER, 16, 1, 1) | |
71 | ||
72 | #undef ctf_user_integer_network_nowrite | |
73 | #define ctf_user_integer_network_nowrite(_type, _item, _user_src) \ | |
74 | _ctf_integer_ext(_type, _item, _user_src, __BIG_ENDIAN, 10, 1, 1) | |
75 | ||
76 | #undef ctf_user_integer_network_hex_nowrite | |
77 | #define ctf_user_integer_network_hex_nowrite(_type, _item, _user_src) \ | |
78 | _ctf_integer_ext(_type, _item, _user_src, __BIG_ENDIAN, 16, 1, 1) | |
79 | ||
80 | #undef ctf_user_array_nowrite | |
81 | #define ctf_user_array_nowrite(_type, _item, _user_src, _length) \ | |
82 | _ctf_array_encoded(_type, _item, _user_src, _length, none, 1, 1) | |
83 | ||
84 | #undef ctf_user_array_text_nowrite | |
85 | #define ctf_user_array_text_nowrite(_type, _item, _user_src, _length) \ | |
86 | _ctf_array_encoded(_type, _item, _user_src, _length, UTF8, 1, 1) | |
87 | ||
88 | #undef ctf_user_sequence_nowrite | |
89 | #define ctf_user_sequence_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
90 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
91 | _length_type, _user_src_length, none, __BYTE_ORDER, 10, 1, 1) | |
92 | ||
93 | #undef ctf_user_sequence_text_nowrite | |
94 | #define ctf_user_sequence_text_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
95 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
5e6f60b2 | 96 | _length_type, _user_src_length, UTF8, __BYTE_ORDER, 10, 1, 1) |
af2a1fe5 MD |
97 | |
98 | #undef ctf_user_string_nowrite | |
99 | #define ctf_user_string_nowrite(_item, _user_src) \ | |
100 | _ctf_string(_item, _user_src, 1, 1) |