Motr  M0
console_fop_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from console/console_fop.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "console/console_fop.h"
9 
15 
16 static struct _m0_cons_fop_fid_s {
19 } _m0_cons_fop_fid = {
20  ._type = {
22  .xct_name = "m0_cons_fop_fid",
23  .xct_sizeof = sizeof (struct m0_cons_fop_fid),
24  .xct_nr = 2,
25  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
26  }
27 };
28 
30 M0_BASSERT(offsetof(struct _m0_cons_fop_fid_s, _child[0]) ==
31  offsetof(struct m0_xcode_type, xct_child[0]));
32 
33 static struct _m0_cons_fop_buf_s {
36 } _m0_cons_fop_buf = {
37  ._type = {
39  .xct_name = "m0_cons_fop_buf",
40  .xct_sizeof = sizeof (struct m0_cons_fop_buf),
41  .xct_nr = 2,
42  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
43  }
44 };
45 
47 M0_BASSERT(offsetof(struct _m0_cons_fop_buf_s, _child[0]) ==
48  offsetof(struct m0_xcode_type, xct_child[0]));
49 
50 static struct _m0_cons_fop_test_s {
54  ._type = {
56  .xct_name = "m0_cons_fop_test",
57  .xct_sizeof = sizeof (struct m0_cons_fop_test),
58  .xct_nr = 4,
59  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
60  }
61 };
62 
64 M0_BASSERT(offsetof(struct _m0_cons_fop_test_s, _child[0]) ==
65  offsetof(struct m0_xcode_type, xct_child[0]));
66 
67 static struct _m0_cons_fop_device_s {
71  ._type = {
73  .xct_name = "m0_cons_fop_device",
74  .xct_sizeof = sizeof (struct m0_cons_fop_device),
75  .xct_nr = 4,
76  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
77  }
78 };
79 
81 M0_BASSERT(offsetof(struct _m0_cons_fop_device_s, _child[0]) ==
82  offsetof(struct m0_xcode_type, xct_child[0]));
83 
84 static struct _m0_cons_fop_reply_s {
88  ._type = {
90  .xct_name = "m0_cons_fop_reply",
91  .xct_sizeof = sizeof (struct m0_cons_fop_reply),
92  .xct_nr = 2,
93  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
94  }
95 };
96 
98 M0_BASSERT(offsetof(struct _m0_cons_fop_reply_s, _child[0]) ==
99  offsetof(struct m0_xcode_type, xct_child[0]));
100 
101 
102 M0_BASSERT(sizeof(struct m0_cons_fop_fid) == 16U);
103 
104 M0_BASSERT(sizeof ((struct m0_cons_fop_fid *)0)->cons_seq == 8U);
106 M0_BASSERT(sizeof ((struct m0_cons_fop_fid *)0)->cons_oid == 8U);
108 
109 M0_BASSERT(sizeof(struct m0_cons_fop_buf) == 16U);
110 
111 M0_BASSERT(sizeof ((struct m0_cons_fop_buf *)0)->cons_size == 4U);
113 M0_BASSERT(sizeof ((struct m0_cons_fop_buf *)0)->cons_buf == 8U);
115 
116 M0_BASSERT(sizeof(struct m0_cons_fop_test) == 48U);
117 
118 M0_BASSERT(sizeof ((struct m0_cons_fop_test *)0)->cons_test_type == 1U);
120 M0_BASSERT(sizeof ((struct m0_cons_fop_test *)0)->cons_test_id == 8U);
122 M0_BASSERT(sizeof ((struct m0_cons_fop_test *)0)->cons_id == 16U);
124 M0_BASSERT(sizeof ((struct m0_cons_fop_test *)0)->cons_test_buf == 16U);
126 
127 M0_BASSERT(sizeof(struct m0_cons_fop_device) == 48U);
128 
129 M0_BASSERT(sizeof ((struct m0_cons_fop_device *)0)->cons_id == 16U);
131 M0_BASSERT(sizeof ((struct m0_cons_fop_device *)0)->cons_notify_type == 4U);
133 M0_BASSERT(sizeof ((struct m0_cons_fop_device *)0)->cons_dev_id == 8U);
135 M0_BASSERT(sizeof ((struct m0_cons_fop_device *)0)->cons_dev_name == 16U);
137 
138 M0_BASSERT(sizeof(struct m0_cons_fop_reply) == 8U);
139 
140 M0_BASSERT(sizeof ((struct m0_cons_fop_reply *)0)->cons_return == 4U);
142 M0_BASSERT(sizeof ((struct m0_cons_fop_reply *)0)->cons_notify_type == 4U);
144 
145 
146 
147 M0_INTERNAL void m0_xc_m0_cons_fop_fid_struct_init(void)
148 {
149  _m0_cons_fop_fid._child[0] = (struct m0_xcode_field) {
150  .xf_name = "cons_seq",
151 
152  .xf_type = &M0_XT_U64,
153 
154  .xf_tag = 0,
155  .xf_opaque = NULL,
156  .xf_offset = offsetof(struct m0_cons_fop_fid, cons_seq),
157  .xf_read = NULL,
158  .xf_decor = {
160  }
161  };
162  m0_xc_u64_init();
163 
164  _m0_cons_fop_fid._child[1] = (struct m0_xcode_field) {
165  .xf_name = "cons_oid",
166 
167  .xf_type = &M0_XT_U64,
168 
169  .xf_tag = 0,
170  .xf_opaque = NULL,
171  .xf_offset = offsetof(struct m0_cons_fop_fid, cons_oid),
172  .xf_read = NULL,
173  .xf_decor = {
175  }
176  };
177  m0_xc_u64_init();
178 
180 }
181 
182 M0_INTERNAL void m0_xc_m0_cons_fop_buf_struct_init(void)
183 {
184  _m0_cons_fop_buf._child[0] = (struct m0_xcode_field) {
185  .xf_name = "cons_size",
186 
187  .xf_type = &M0_XT_U32,
188 
189  .xf_tag = 0,
190  .xf_opaque = NULL,
191  .xf_offset = offsetof(struct m0_cons_fop_buf, cons_size),
192  .xf_read = NULL,
193  .xf_decor = {
195  }
196  };
197  m0_xc_u32_init();
198 
199  _m0_cons_fop_buf._child[1] = (struct m0_xcode_field) {
200  .xf_name = "cons_buf",
201 
202  .xf_type = &M0_XT_U8,
203 
204  .xf_tag = 0,
205  .xf_opaque = NULL,
206  .xf_offset = offsetof(struct m0_cons_fop_buf, cons_buf),
207  .xf_read = NULL,
208  .xf_decor = {
210  }
211  };
212  m0_xc_u8_init();
213 
215 }
216 
218 {
219  _m0_cons_fop_test._child[0] = (struct m0_xcode_field) {
220  .xf_name = "cons_test_type",
221 
222  .xf_type = &M0_XT_U8,
223 
224  .xf_tag = 0,
225  .xf_opaque = NULL,
226  .xf_offset = offsetof(struct m0_cons_fop_test, cons_test_type),
227  .xf_read = NULL,
228  .xf_decor = {
230  }
231  };
232  m0_xc_u8_init();
233 
234  _m0_cons_fop_test._child[1] = (struct m0_xcode_field) {
235  .xf_name = "cons_test_id",
236 
237  .xf_type = &M0_XT_U64,
238 
239  .xf_tag = 0,
240  .xf_opaque = NULL,
241  .xf_offset = offsetof(struct m0_cons_fop_test, cons_test_id),
242  .xf_read = NULL,
243  .xf_decor = {
245  }
246  };
247  m0_xc_u64_init();
248 
249  _m0_cons_fop_test._child[2] = (struct m0_xcode_field) {
250  .xf_name = "cons_id",
251 
252  .xf_type = m0_cons_fop_fid_xc,
253 
254  .xf_tag = 0,
255  .xf_opaque = NULL,
256  .xf_offset = offsetof(struct m0_cons_fop_test, cons_id),
257  .xf_read = NULL,
258  .xf_decor = {
260  }
261  };
263 
264  _m0_cons_fop_test._child[3] = (struct m0_xcode_field) {
265  .xf_name = "cons_test_buf",
266 
267  .xf_type = m0_cons_fop_buf_xc,
268 
269  .xf_tag = 0,
270  .xf_opaque = NULL,
271  .xf_offset = offsetof(struct m0_cons_fop_test, cons_test_buf),
272  .xf_read = NULL,
273  .xf_decor = {
275  }
276  };
278 
280 }
281 
283 {
285  .xf_name = "cons_id",
286 
287  .xf_type = m0_cons_fop_fid_xc,
288 
289  .xf_tag = 0,
290  .xf_opaque = NULL,
291  .xf_offset = offsetof(struct m0_cons_fop_device, cons_id),
292  .xf_read = NULL,
293  .xf_decor = {
295  }
296  };
298 
300  .xf_name = "cons_notify_type",
301 
302  .xf_type = &M0_XT_U32,
303 
304  .xf_tag = 0,
305  .xf_opaque = NULL,
306  .xf_offset = offsetof(struct m0_cons_fop_device, cons_notify_type),
307  .xf_read = NULL,
308  .xf_decor = {
310  }
311  };
312  m0_xc_u32_init();
313 
315  .xf_name = "cons_dev_id",
316 
317  .xf_type = &M0_XT_U64,
318 
319  .xf_tag = 0,
320  .xf_opaque = NULL,
321  .xf_offset = offsetof(struct m0_cons_fop_device, cons_dev_id),
322  .xf_read = NULL,
323  .xf_decor = {
325  }
326  };
327  m0_xc_u64_init();
328 
330  .xf_name = "cons_dev_name",
331 
332  .xf_type = m0_cons_fop_buf_xc,
333 
334  .xf_tag = 0,
335  .xf_opaque = NULL,
336  .xf_offset = offsetof(struct m0_cons_fop_device, cons_dev_name),
337  .xf_read = NULL,
338  .xf_decor = {
340  }
341  };
343 
345 }
346 
348 {
350  .xf_name = "cons_return",
351 
352  .xf_type = &M0_XT_U32,
353 
354  .xf_tag = 0,
355  .xf_opaque = NULL,
356  .xf_offset = offsetof(struct m0_cons_fop_reply, cons_return),
357  .xf_read = NULL,
358  .xf_decor = {
360  }
361  };
362  m0_xc_u32_init();
363 
365  .xf_name = "cons_notify_type",
366 
367  .xf_type = &M0_XT_U32,
368 
369  .xf_tag = 0,
370  .xf_opaque = NULL,
371  .xf_offset = offsetof(struct m0_cons_fop_reply, cons_notify_type),
372  .xf_read = NULL,
373  .xf_decor = {
375  }
376  };
377  m0_xc_u32_init();
378 
380 }
381 
382 M0_INTERNAL void m0_xc_console_console_fop_init(void)
383 {
389 }
390 
391 M0_INTERNAL void m0_xc_console_console_fop_fini(void)
392 {
393 }
struct m0_xcode_type * m0_cons_fop_test_xc
struct m0_xcode_type _type
struct m0_xcode_field _child[2]
uint32_t cons_size
Definition: console_fop.h:52
uint64_t cons_oid
Definition: console_fop.h:53
M0_INTERNAL void m0_xc_m0_cons_fop_buf_struct_init(void)
#define NULL
Definition: misc.h:38
struct m0_cons_fop_buf cons_dev_name
Definition: console_fop.h:55
static struct _m0_cons_fop_reply_s _m0_cons_fop_reply
M0_INTERNAL void m0_xc_m0_cons_fop_test_struct_init(void)
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_field _child[4]
struct m0_xcode_type _type
struct m0_xcode_field _child[2]
static struct _m0_cons_fop_device_s _m0_cons_fop_device
uint8_t cons_test_type
Definition: console_fop.h:52
struct m0_xcode_type * m0_cons_fop_buf_xc
struct m0_xcode_type * m0_cons_fop_fid_xc
struct m0_xcode_type _type
struct m0_xcode_field _child[4]
int32_t cons_return
Definition: console_fop.h:52
uint64_t cons_dev_id
Definition: console_fop.h:54
struct m0_xcode_type _type
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
void m0_xc_u64_init(void)
Definition: xcode.c:904
struct m0_xcode_type * m0_cons_fop_reply_xc
static struct _m0_cons_fop_fid_s _m0_cons_fop_fid
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
static struct _m0_cons_fop_test_s _m0_cons_fop_test
M0_INTERNAL void m0_xc_console_console_fop_fini(void)
struct m0_cons_fop_buf cons_test_buf
Definition: console_fop.h:55
M0_INTERNAL void m0_xc_m0_cons_fop_reply_struct_init(void)
struct m0_xcode_type _type
const struct m0_xcode_type M0_XT_U8
Definition: xcode.c:924
void m0_xc_u8_init(void)
Definition: xcode.c:892
void m0_xc_u32_init(void)
Definition: xcode.c:900
M0_BASSERT(offsetof(struct _m0_cons_fop_fid_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_field _child[2]
uint64_t cons_seq
Definition: console_fop.h:52
M0_INTERNAL void m0_xc_console_console_fop_init(void)
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_cons_fop_fid_struct_init(void)
struct m0_cons_fop_fid cons_id
Definition: console_fop.h:54
static struct _m0_cons_fop_buf_s _m0_cons_fop_buf
uint32_t cons_notify_type
Definition: console_fop.h:53
M0_INTERNAL void m0_xc_m0_cons_fop_device_struct_init(void)
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
struct m0_xcode_type * m0_cons_fop_device_xc
uint64_t cons_test_id
Definition: console_fop.h:53
#define offsetof(typ, memb)
Definition: misc.h:29
uint8_t * cons_buf
Definition: console_fop.h:53