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 | ||
43803cf2 MD |
49 | #undef ctf_array_bitfield_nowrite |
50 | #define ctf_array_bitfield_nowrite(_type, _item, _src, _length) \ | |
51 | _ctf_array_bitfield(_type, _item, _src, _length, 0, 1) | |
52 | ||
af2a1fe5 MD |
53 | #undef ctf_sequence_nowrite |
54 | #define ctf_sequence_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
55 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
56 | _length_type, _user_src_length, none, __BYTE_ORDER, 10, 0, 1) | |
57 | ||
58 | #undef ctf_sequence_text_nowrite | |
59 | #define ctf_sequence_text_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
60 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
5e6f60b2 | 61 | _length_type, _user_src_length, UTF8, __BYTE_ORDER, 10, 0, 1) |
af2a1fe5 | 62 | |
43803cf2 MD |
63 | #undef ctf_sequence_bitfield_nowrite |
64 | #define ctf_sequence_bitfield_nowrite(_type, _item, _src, _length_type, _src_length) \ | |
65 | _ctf_sequence_bitfield(_type, _item, _src, \ | |
66 | _length_type, _src_length, 0, 1) | |
67 | ||
af2a1fe5 MD |
68 | #undef ctf_string_nowrite |
69 | #define ctf_string_nowrite(_item, _user_src) \ | |
70 | _ctf_string(_item, _user_src, 0, 1) | |
71 | ||
72 | /* user src */ | |
73 | #undef ctf_user_integer_nowrite | |
74 | #define ctf_user_integer_nowrite(_type, _item, _user_src) \ | |
75 | _ctf_integer_ext(_type, _item, _user_src, __BYTE_ORDER, 10, 1, 1) | |
76 | ||
77 | #undef ctf_user_integer_hex_nowrite | |
78 | #define ctf_user_integer_hex_nowrite(_type, _item, _user_src) \ | |
79 | _ctf_integer_ext(_type, _item, _user_src, __BYTE_ORDER, 16, 1, 1) | |
80 | ||
81 | #undef ctf_user_integer_network_nowrite | |
82 | #define ctf_user_integer_network_nowrite(_type, _item, _user_src) \ | |
83 | _ctf_integer_ext(_type, _item, _user_src, __BIG_ENDIAN, 10, 1, 1) | |
84 | ||
85 | #undef ctf_user_integer_network_hex_nowrite | |
86 | #define ctf_user_integer_network_hex_nowrite(_type, _item, _user_src) \ | |
87 | _ctf_integer_ext(_type, _item, _user_src, __BIG_ENDIAN, 16, 1, 1) | |
88 | ||
89 | #undef ctf_user_array_nowrite | |
90 | #define ctf_user_array_nowrite(_type, _item, _user_src, _length) \ | |
91 | _ctf_array_encoded(_type, _item, _user_src, _length, none, 1, 1) | |
92 | ||
93 | #undef ctf_user_array_text_nowrite | |
94 | #define ctf_user_array_text_nowrite(_type, _item, _user_src, _length) \ | |
95 | _ctf_array_encoded(_type, _item, _user_src, _length, UTF8, 1, 1) | |
96 | ||
43803cf2 MD |
97 | #undef ctf_user_array_bitfield_nowrite |
98 | #define ctf_user_array_bitfield_nowrite(_type, _item, _src, _length) \ | |
99 | _ctf_array_bitfield(_type, _item, _src, _length, 1, 1) | |
100 | ||
af2a1fe5 MD |
101 | #undef ctf_user_sequence_nowrite |
102 | #define ctf_user_sequence_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
103 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
104 | _length_type, _user_src_length, none, __BYTE_ORDER, 10, 1, 1) | |
105 | ||
106 | #undef ctf_user_sequence_text_nowrite | |
107 | #define ctf_user_sequence_text_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ | |
108 | _ctf_sequence_encoded(_type, _item, _user_src, \ | |
5e6f60b2 | 109 | _length_type, _user_src_length, UTF8, __BYTE_ORDER, 10, 1, 1) |
af2a1fe5 | 110 | |
43803cf2 MD |
111 | #undef ctf_user_sequence_bitfield_nowrite |
112 | #define ctf_user_sequence_bitfield_nowrite(_type, _item, _src, _length_type, _src_length) \ | |
113 | _ctf_sequence_bitfield(_type, _item, _src, \ | |
114 | _length_type, _src_length, 1, 1) | |
115 | ||
af2a1fe5 MD |
116 | #undef ctf_user_string_nowrite |
117 | #define ctf_user_string_nowrite(_item, _user_src) \ | |
118 | _ctf_string(_item, _user_src, 1, 1) |