Motr  M0
at_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from rpc/at.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "rpc/at.h"
8 #include "rpc/at_xc.h"
9 
13 
14 static struct _m0_rpc_at_bulk_rep_s {
18  ._type = {
20  .xct_name = "m0_rpc_at_bulk_rep",
21  .xct_sizeof = sizeof (struct m0_rpc_at_bulk_rep),
22  .xct_nr = 2,
23  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
24  }
25 };
26 
28 M0_BASSERT(offsetof(struct _m0_rpc_at_bulk_rep_s, _child[0]) ==
29  offsetof(struct m0_xcode_type, xct_child[0]));
30 
31 static struct _m0_rpc_at_extra_s {
34 } _m0_rpc_at_extra = {
35  ._type = {
37  .xct_name = "m0_rpc_at_extra",
38  .xct_sizeof = sizeof (struct m0_rpc_at_extra),
39  .xct_nr = 3,
40  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
41  }
42 };
43 
45 M0_BASSERT(offsetof(struct _m0_rpc_at_extra_s, _child[0]) ==
46  offsetof(struct m0_xcode_type, xct_child[0]));
47 
48 static struct _m0_rpc_at_buf_s {
51 } _m0_rpc_at_buf = {
52  ._type = {
54  .xct_name = "m0_rpc_at_buf",
55  .xct_sizeof = sizeof (struct m0_rpc_at_buf),
56  .xct_nr = 6,
57  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
58  }
59 };
60 
62 M0_BASSERT(offsetof(struct _m0_rpc_at_buf_s, _child[0]) ==
63  offsetof(struct m0_xcode_type, xct_child[0]));
64 
65 
66 M0_BASSERT(sizeof(struct m0_rpc_at_bulk_rep) == 16U);
67 
68 M0_BASSERT(sizeof ((struct m0_rpc_at_bulk_rep *)0)->abr_rc == 4U);
70 M0_BASSERT(sizeof ((struct m0_rpc_at_bulk_rep *)0)->abr_len == 8U);
72 
73 M0_BASSERT(sizeof(struct m0_rpc_at_extra) == 48U);
74 
75 M0_BASSERT(sizeof ((struct m0_rpc_at_extra *)0)->abr_desc == 24U);
77 M0_BASSERT(sizeof ((struct m0_rpc_at_extra *)0)->abr_bulk == 8U);
79 M0_BASSERT(sizeof ((struct m0_rpc_at_extra *)0)->abr_user_buf == 16U);
81 
82 M0_BASSERT(sizeof(struct m0_rpc_at_buf) == 56U);
83 
84 M0_BASSERT(sizeof ((struct m0_rpc_at_buf *)0)->ab_type == 4U);
86 M0_BASSERT(sizeof ((struct m0_rpc_at_buf *)0)->u.ab_buf == 16U);
87 M0_BASSERT(offsetof(struct m0_rpc_at_buf, u.ab_buf) == 8U);
88 M0_BASSERT(sizeof ((struct m0_rpc_at_buf *)0)->u.ab_send == 24U);
89 M0_BASSERT(offsetof(struct m0_rpc_at_buf, u.ab_send) == 8U);
90 M0_BASSERT(sizeof ((struct m0_rpc_at_buf *)0)->u.ab_recv == 24U);
91 M0_BASSERT(offsetof(struct m0_rpc_at_buf, u.ab_recv) == 8U);
92 M0_BASSERT(sizeof ((struct m0_rpc_at_buf *)0)->u.ab_rep == 16U);
93 M0_BASSERT(offsetof(struct m0_rpc_at_buf, u.ab_rep) == 8U);
94 M0_BASSERT(sizeof ((struct m0_rpc_at_buf *)0)->u.ab_extra == 48U);
95 M0_BASSERT(offsetof(struct m0_rpc_at_buf, u.ab_extra) == 8U);
96 
97 
98 
100 {
102  .xf_name = "abr_rc",
103 
104  .xf_type = &M0_XT_U32,
105 
106  .xf_tag = 0,
107  .xf_opaque = NULL,
108  .xf_offset = offsetof(struct m0_rpc_at_bulk_rep, abr_rc),
109  .xf_read = NULL,
110  .xf_decor = {
112  }
113  };
114  m0_xc_u32_init();
115 
117  .xf_name = "abr_len",
118 
119  .xf_type = &M0_XT_U64,
120 
121  .xf_tag = 0,
122  .xf_opaque = NULL,
123  .xf_offset = offsetof(struct m0_rpc_at_bulk_rep, abr_len),
124  .xf_read = NULL,
125  .xf_decor = {
127  }
128  };
129  m0_xc_u64_init();
130 
132 }
133 
134 M0_INTERNAL void m0_xc_m0_rpc_at_extra_struct_init(void)
135 {
136  _m0_rpc_at_extra._child[0] = (struct m0_xcode_field) {
137  .xf_name = "abr_desc",
138 
139  .xf_type = m0_net_buf_desc_data_xc,
140 
141  .xf_tag = 0,
142  .xf_opaque = NULL,
143  .xf_offset = offsetof(struct m0_rpc_at_extra, abr_desc),
144  .xf_read = NULL,
145  .xf_decor = {
147  }
148  };
150 
151  _m0_rpc_at_extra._child[1] = (struct m0_xcode_field) {
152  .xf_name = "abr_bulk",
153 
154  .xf_type = &M0_XT_U64,
155 
156  .xf_tag = 0,
157  .xf_opaque = NULL,
158  .xf_offset = offsetof(struct m0_rpc_at_extra, abr_bulk),
159  .xf_read = NULL,
160  .xf_decor = {
162  }
163  };
164  m0_xc_u64_init();
165 
166  _m0_rpc_at_extra._child[2] = (struct m0_xcode_field) {
167  .xf_name = "abr_user_buf",
168 
169  .xf_type = m0_buf_xc,
170 
171  .xf_tag = 0,
172  .xf_opaque = NULL,
173  .xf_offset = offsetof(struct m0_rpc_at_extra, abr_user_buf),
174  .xf_read = NULL,
175  .xf_decor = {
177  }
178  };
180 
182 }
183 
184 M0_INTERNAL void m0_xc_m0_rpc_at_buf_struct_init(void)
185 {
186  _m0_rpc_at_buf._child[0] = (struct m0_xcode_field) {
187  .xf_name = "ab_type",
188 
189  .xf_type = &M0_XT_U32,
190 
191  .xf_tag = 0,
192  .xf_opaque = NULL,
193  .xf_offset = offsetof(struct m0_rpc_at_buf, ab_type),
194  .xf_read = NULL,
195  .xf_decor = {
197  }
198  };
199  m0_xc_u32_init();
200 
201  _m0_rpc_at_buf._child[1] = (struct m0_xcode_field) {
202  .xf_name = "ab_buf",
203 
204  .xf_type = m0_buf_xc,
205 
206  .xf_tag = M0_RPC_AT_INLINE,
207  .xf_opaque = NULL,
208  .xf_offset = offsetof(struct m0_rpc_at_buf, u.ab_buf),
209  .xf_read = NULL,
210  .xf_decor = {
212  }
213  };
215 
216  _m0_rpc_at_buf._child[2] = (struct m0_xcode_field) {
217  .xf_name = "ab_send",
218 
219  .xf_type = m0_net_buf_desc_data_xc,
220 
221  .xf_tag = M0_RPC_AT_BULK_SEND,
222  .xf_opaque = NULL,
223  .xf_offset = offsetof(struct m0_rpc_at_buf, u.ab_send),
224  .xf_read = NULL,
225  .xf_decor = {
227  }
228  };
230 
231  _m0_rpc_at_buf._child[3] = (struct m0_xcode_field) {
232  .xf_name = "ab_recv",
233 
234  .xf_type = m0_net_buf_desc_data_xc,
235 
236  .xf_tag = M0_RPC_AT_BULK_RECV,
237  .xf_opaque = NULL,
238  .xf_offset = offsetof(struct m0_rpc_at_buf, u.ab_recv),
239  .xf_read = NULL,
240  .xf_decor = {
242  }
243  };
245 
246  _m0_rpc_at_buf._child[4] = (struct m0_xcode_field) {
247  .xf_name = "ab_rep",
248 
249  .xf_type = m0_rpc_at_bulk_rep_xc,
250 
251  .xf_tag = M0_RPC_AT_BULK_REP,
252  .xf_opaque = NULL,
253  .xf_offset = offsetof(struct m0_rpc_at_buf, u.ab_rep),
254  .xf_read = NULL,
255  .xf_decor = {
257  }
258  };
260 
261  _m0_rpc_at_buf._child[5] = (struct m0_xcode_field) {
262  .xf_name = "ab_extra",
263 
264  .xf_type = m0_rpc_at_extra_xc,
265 
266  .xf_tag = M0_RPC_AT_TYPE_NR,
267  .xf_opaque = NULL,
268  .xf_offset = offsetof(struct m0_rpc_at_buf, u.ab_extra),
269  .xf_read = NULL,
270  .xf_decor = {
272  }
273  };
275 
277 }
278 
279 M0_INTERNAL void m0_xc_rpc_at_init(void)
280 {
284 }
285 
286 M0_INTERNAL void m0_xc_rpc_at_fini(void)
287 {
288 }
struct m0_xcode_field _child[2]
Definition: at_xc.c:16
struct m0_xcode_type * m0_buf_xc
Definition: buf_xc.c:10
#define NULL
Definition: misc.h:38
struct m0_buf abr_user_buf
Definition: at.h:76
union @126 u
static struct _m0_rpc_at_extra_s _m0_rpc_at_extra
uint64_t abr_len
Definition: at.h:81
static struct _m0_rpc_at_buf_s _m0_rpc_at_buf
struct rpc_at_bulk * abr_bulk
Definition: at.h:75
M0_INTERNAL void m0_xc_rpc_at_init(void)
Definition: at_xc.c:279
int32_t abr_rc
Definition: at.h:78
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_field _child[6]
Definition: at_xc.c:50
struct m0_xcode_type _type
Definition: at_xc.c:49
M0_INTERNAL void m0_xc_m0_buf_struct_init(void)
Definition: buf_xc.c:64
struct m0_xcode_type _type
Definition: at_xc.c:32
M0_BASSERT(offsetof(struct _m0_rpc_at_bulk_rep_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type * m0_rpc_at_extra_xc
Definition: at_xc.c:11
uint32_t ab_type
Definition: at.h:74
struct m0_xcode_type * m0_rpc_at_bulk_rep_xc
Definition: at_xc.c:10
struct m0_xcode_field _child[3]
Definition: at_xc.c:33
#define M0_POST(cond)
M0_INTERNAL void m0_xc_rpc_at_fini(void)
Definition: at_xc.c:286
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
M0_INTERNAL void m0_xc_m0_net_buf_desc_data_struct_init(void)
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
M0_INTERNAL void m0_xc_m0_rpc_at_extra_struct_init(void)
Definition: at_xc.c:134
struct m0_xcode_type _type
Definition: at_xc.c:15
static struct _m0_rpc_at_bulk_rep_s _m0_rpc_at_bulk_rep
void m0_xc_u32_init(void)
Definition: xcode.c:900
M0_INTERNAL void m0_xc_m0_rpc_at_bulk_rep_struct_init(void)
Definition: at_xc.c:99
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_rpc_at_buf_struct_init(void)
Definition: at_xc.c:184
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
struct m0_xcode_type * m0_rpc_at_buf_xc
Definition: at_xc.c:12
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_type * m0_net_buf_desc_data_xc
struct m0_net_buf_desc_data abr_desc
Definition: at.h:74