Motr  M0
wire_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from fop/wire.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "fop/wire.h"
8 #include "fop/wire_xc.h"
9 
15 int m0_fop_xc_type(const struct m0_xcode_obj *par,
16  const struct m0_xcode_type **out);
17 int m0_fop_rep_xc_type(const struct m0_xcode_obj *par,
18  const struct m0_xcode_type **out);
19 
20 static struct _m0_fop_fol_frag_s {
23 } _m0_fop_fol_frag = {
24  ._type = {
26  .xct_name = "m0_fop_fol_frag",
27  .xct_sizeof = sizeof (struct m0_fop_fol_frag),
28  .xct_nr = 4,
29  .xct_flags = 0,
30  }
31 };
32 
34 M0_BASSERT(offsetof(struct _m0_fop_fol_frag_s, _child[0]) ==
35  offsetof(struct m0_xcode_type, xct_child[0]));
36 
37 static struct _m0_fop_str_s {
40 } _m0_fop_str = {
41  ._type = {
43  .xct_name = "m0_fop_str",
44  .xct_sizeof = sizeof (struct m0_fop_str),
45  .xct_nr = 2,
46  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
47  }
48 };
49 
51 M0_BASSERT(offsetof(struct _m0_fop_str_s, _child[0]) ==
52  offsetof(struct m0_xcode_type, xct_child[0]));
53 
54 static struct _m0_fop_generic_reply_s {
58  ._type = {
60  .xct_name = "m0_fop_generic_reply",
61  .xct_sizeof = sizeof (struct m0_fop_generic_reply),
62  .xct_nr = 2,
63  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
64  }
65 };
66 
68 M0_BASSERT(offsetof(struct _m0_fop_generic_reply_s, _child[0]) ==
69  offsetof(struct m0_xcode_type, xct_child[0]));
70 
71 static struct _m0_be_tx_remid_s {
74 } _m0_be_tx_remid = {
75  ._type = {
77  .xct_name = "m0_be_tx_remid",
78  .xct_sizeof = sizeof (struct m0_be_tx_remid),
79  .xct_nr = 2,
81  }
82 };
83 
85 M0_BASSERT(offsetof(struct _m0_be_tx_remid_s, _child[0]) ==
86  offsetof(struct m0_xcode_type, xct_child[0]));
87 
88 static struct _m0_fop_mod_rep_s {
91 } _m0_fop_mod_rep = {
92  ._type = {
94  .xct_name = "m0_fop_mod_rep",
95  .xct_sizeof = sizeof (struct m0_fop_mod_rep),
96  .xct_nr = 1,
97  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
98  }
99 };
100 
102 M0_BASSERT(offsetof(struct _m0_fop_mod_rep_s, _child[0]) ==
103  offsetof(struct m0_xcode_type, xct_child[0]));
104 
105 
106 M0_BASSERT(sizeof(struct m0_fop_fol_frag) == 24U);
107 
108 M0_BASSERT(sizeof ((struct m0_fop_fol_frag *)0)->ffrp_fop_code == 4U);
109 M0_BASSERT(offsetof(struct m0_fop_fol_frag, ffrp_fop_code) == 0U);
110 M0_BASSERT(sizeof ((struct m0_fop_fol_frag *)0)->ffrp_rep_code == 4U);
111 M0_BASSERT(offsetof(struct m0_fop_fol_frag, ffrp_rep_code) == 4U);
112 M0_BASSERT(sizeof ((struct m0_fop_fol_frag *)0)->ffrp_fop == 8U);
113 M0_BASSERT(offsetof(struct m0_fop_fol_frag, ffrp_fop) == 8U);
114 M0_BASSERT(sizeof ((struct m0_fop_fol_frag *)0)->ffrp_rep == 8U);
115 M0_BASSERT(offsetof(struct m0_fop_fol_frag, ffrp_rep) == 16U);
116 
117 M0_BASSERT(sizeof(struct m0_fop_str) == 16U);
118 
119 M0_BASSERT(sizeof ((struct m0_fop_str *)0)->s_len == 4U);
120 M0_BASSERT(offsetof(struct m0_fop_str, s_len) == 0U);
121 M0_BASSERT(sizeof ((struct m0_fop_str *)0)->s_buf == 8U);
122 M0_BASSERT(offsetof(struct m0_fop_str, s_buf) == 8U);
123 
124 M0_BASSERT(sizeof(struct m0_fop_generic_reply) == 24U);
125 
126 M0_BASSERT(sizeof ((struct m0_fop_generic_reply *)0)->gr_rc == 4U);
128 M0_BASSERT(sizeof ((struct m0_fop_generic_reply *)0)->gr_msg == 16U);
130 
131 M0_BASSERT(sizeof(struct m0_be_tx_remid) == 16U);
132 
133 M0_BASSERT(sizeof ((struct m0_be_tx_remid *)0)->tri_txid == 8U);
135 M0_BASSERT(sizeof ((struct m0_be_tx_remid *)0)->tri_locality == 8U);
137 
138 M0_BASSERT(sizeof(struct m0_fop_mod_rep) == 16U);
139 
140 M0_BASSERT(sizeof ((struct m0_fop_mod_rep *)0)->fmr_remid == 16U);
142 
143 
144 
145 M0_INTERNAL void m0_xc_m0_fop_fol_frag_struct_init(void)
146 {
147  _m0_fop_fol_frag._child[0] = (struct m0_xcode_field) {
148  .xf_name = "ffrp_fop_code",
149 
150  .xf_type = &M0_XT_U32,
151 
152  .xf_tag = 0,
153  .xf_opaque = NULL,
154  .xf_offset = offsetof(struct m0_fop_fol_frag, ffrp_fop_code),
155  .xf_read = NULL,
156  .xf_decor = {
158  }
159  };
160  m0_xc_u32_init();
161 
162  _m0_fop_fol_frag._child[1] = (struct m0_xcode_field) {
163  .xf_name = "ffrp_rep_code",
164 
165  .xf_type = &M0_XT_U32,
166 
167  .xf_tag = 0,
168  .xf_opaque = NULL,
169  .xf_offset = offsetof(struct m0_fop_fol_frag, ffrp_rep_code),
170  .xf_read = NULL,
171  .xf_decor = {
173  }
174  };
175  m0_xc_u32_init();
176 
177  _m0_fop_fol_frag._child[2] = (struct m0_xcode_field) {
178  .xf_name = "ffrp_fop",
179 
180  .xf_type = &M0_XT_OPAQUE,
181 
182  .xf_tag = 0,
183  .xf_opaque = m0_fop_xc_type,
184  .xf_offset = offsetof(struct m0_fop_fol_frag, ffrp_fop),
185  .xf_read = NULL,
186  .xf_decor = {
188  }
189  };
191 
192  _m0_fop_fol_frag._child[3] = (struct m0_xcode_field) {
193  .xf_name = "ffrp_rep",
194 
195  .xf_type = &M0_XT_OPAQUE,
196 
197  .xf_tag = 0,
198  .xf_opaque = m0_fop_rep_xc_type,
199  .xf_offset = offsetof(struct m0_fop_fol_frag, ffrp_rep),
200  .xf_read = NULL,
201  .xf_decor = {
203  }
204  };
206 
208 }
209 
210 M0_INTERNAL void m0_xc_m0_fop_str_struct_init(void)
211 {
212  _m0_fop_str._child[0] = (struct m0_xcode_field) {
213  .xf_name = "s_len",
214 
215  .xf_type = &M0_XT_U32,
216 
217  .xf_tag = 0,
218  .xf_opaque = NULL,
219  .xf_offset = offsetof(struct m0_fop_str, s_len),
220  .xf_read = NULL,
221  .xf_decor = {
223  }
224  };
225  m0_xc_u32_init();
226 
227  _m0_fop_str._child[1] = (struct m0_xcode_field) {
228  .xf_name = "s_buf",
229 
230  .xf_type = &M0_XT_U8,
231 
232  .xf_tag = 0,
233  .xf_opaque = NULL,
234  .xf_offset = offsetof(struct m0_fop_str, s_buf),
235  .xf_read = NULL,
236  .xf_decor = {
238  }
239  };
240  m0_xc_u8_init();
241 
243 }
244 
246 {
248  .xf_name = "gr_rc",
249 
250  .xf_type = &M0_XT_U32,
251 
252  .xf_tag = 0,
253  .xf_opaque = NULL,
254  .xf_offset = offsetof(struct m0_fop_generic_reply, gr_rc),
255  .xf_read = NULL,
256  .xf_decor = {
258  }
259  };
260  m0_xc_u32_init();
261 
263  .xf_name = "gr_msg",
264 
265  .xf_type = m0_fop_str_xc,
266 
267  .xf_tag = 0,
268  .xf_opaque = NULL,
269  .xf_offset = offsetof(struct m0_fop_generic_reply, gr_msg),
270  .xf_read = NULL,
271  .xf_decor = {
273  }
274  };
276 
278 }
279 
280 M0_INTERNAL void m0_xc_m0_be_tx_remid_struct_init(void)
281 {
282  _m0_be_tx_remid._child[0] = (struct m0_xcode_field) {
283  .xf_name = "tri_txid",
284 
285  .xf_type = &M0_XT_U64,
286 
287  .xf_tag = 0,
288  .xf_opaque = NULL,
289  .xf_offset = offsetof(struct m0_be_tx_remid, tri_txid),
290  .xf_read = NULL,
291  .xf_decor = {
293  }
294  };
295  m0_xc_u64_init();
296 
297  _m0_be_tx_remid._child[1] = (struct m0_xcode_field) {
298  .xf_name = "tri_locality",
299 
300  .xf_type = &M0_XT_U64,
301 
302  .xf_tag = 0,
303  .xf_opaque = NULL,
304  .xf_offset = offsetof(struct m0_be_tx_remid, tri_locality),
305  .xf_read = NULL,
306  .xf_decor = {
308  }
309  };
310  m0_xc_u64_init();
311 
313 }
314 
315 M0_INTERNAL void m0_xc_m0_fop_mod_rep_struct_init(void)
316 {
317  _m0_fop_mod_rep._child[0] = (struct m0_xcode_field) {
318  .xf_name = "fmr_remid",
319 
320  .xf_type = m0_be_tx_remid_xc,
321 
322  .xf_tag = 0,
323  .xf_opaque = NULL,
324  .xf_offset = offsetof(struct m0_fop_mod_rep, fmr_remid),
325  .xf_read = NULL,
326  .xf_decor = {
328  }
329  };
331 
333 }
334 
335 M0_INTERNAL void m0_xc_fop_wire_init(void)
336 {
342 }
343 
344 M0_INTERNAL void m0_xc_fop_wire_fini(void)
345 {
346 }
static struct _m0_fop_str_s _m0_fop_str
struct m0_xcode_type * m0_fop_mod_rep_xc
Definition: wire_xc.c:14
int32_t gr_rc
Definition: wire.h:126
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: wire_xc.c:72
uint32_t s_len
Definition: wire.h:126
struct m0_xcode_field _child[2]
Definition: wire_xc.c:73
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_field _child[4]
Definition: wire_xc.c:22
M0_INTERNAL void m0_xc_m0_fop_fol_frag_struct_init(void)
Definition: wire_xc.c:145
struct m0_xcode_type * m0_be_tx_remid_xc
Definition: wire_xc.c:13
M0_INTERNAL void m0_xc_fop_wire_init(void)
Definition: wire_xc.c:335
M0_INTERNAL void m0_xc_m0_be_tx_remid_struct_init(void)
Definition: wire_xc.c:280
struct m0_xcode_type * m0_fop_generic_reply_xc
Definition: wire_xc.c:12
int m0_fop_rep_xc_type(const struct m0_xcode_obj *par, const struct m0_xcode_type **out)
Definition: fop.c:418
M0_INTERNAL void m0_xc_m0_fop_generic_reply_struct_init(void)
Definition: wire_xc.c:245
const struct m0_xcode_type M0_XT_OPAQUE
Definition: xcode.c:948
struct m0_xcode_field _child[2]
Definition: wire_xc.c:56
struct m0_xcode_type _type
Definition: wire_xc.c:38
struct m0_xcode_type _type
Definition: wire_xc.c:21
struct m0_xcode_type * m0_fop_str_xc
Definition: wire_xc.c:11
struct m0_xcode_type _type
Definition: wire_xc.c:55
#define M0_POST(cond)
static struct _m0_fop_mod_rep_s _m0_fop_mod_rep
static struct _m0_be_tx_remid_s _m0_be_tx_remid
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_m0_fop_mod_rep_struct_init(void)
Definition: wire_xc.c:315
struct m0_xcode_type * m0_fop_fol_frag_xc
Definition: wire_xc.c:10
int m0_fop_xc_type(const struct m0_xcode_obj *par, const struct m0_xcode_type **out)
Definition: fop.c:410
struct m0_xcode_type _type
Definition: wire_xc.c:89
void m0_xc_u64_init(void)
Definition: xcode.c:904
M0_INTERNAL void m0_xc_fop_wire_fini(void)
Definition: wire_xc.c:344
struct m0_xcode_field _child[2]
Definition: wire_xc.c:39
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_be_tx_remid fmr_remid
Definition: wire.h:127
static struct _m0_fop_fol_frag_s _m0_fop_fol_frag
M0_BASSERT(offsetof(struct _m0_fop_fol_frag_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
const struct m0_xcode_type M0_XT_U8
Definition: xcode.c:924
static struct _m0_fop_generic_reply_s _m0_fop_generic_reply
void m0_xc_u8_init(void)
Definition: xcode.c:892
void m0_xc_u32_init(void)
Definition: xcode.c:900
uint64_t tri_txid
Definition: wire.h:126
uint64_t tri_locality
Definition: wire.h:127
#define out(...)
Definition: gen.c:41
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
void m0_xc_opaque_init(void)
Definition: xcode.c:912
uint8_t * s_buf
Definition: wire.h:127
M0_INTERNAL void m0_xc_m0_fop_str_struct_init(void)
Definition: wire_xc.c:210
struct m0_fop_str gr_msg
Definition: wire.h:127
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_field _child[1]
Definition: wire_xc.c:90