Motr  M0
msg_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from ha/msg.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "ha/msg.h"
8 #include "ha/msg_xc.h"
9 
12 
13 static struct _m0_ha_msg_s {
16 } _m0_ha_msg = {
17  ._type = {
19  .xct_name = "m0_ha_msg",
20  .xct_sizeof = sizeof (struct m0_ha_msg),
21  .xct_nr = 7,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_ha_msg_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_ha_msg_data_s {
32  struct m0_xcode_field _child[12];
33 } _m0_ha_msg_data = {
34  ._type = {
36  .xct_name = "m0_ha_msg_data",
37  .xct_sizeof = sizeof (struct m0_ha_msg_data),
38  .xct_nr = 12,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_ha_msg_data_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_ha_msg) == 24696U);
49 
50 M0_BASSERT(sizeof ((struct m0_ha_msg *)0)->hm_fid == 16U);
51 M0_BASSERT(offsetof(struct m0_ha_msg, hm_fid) == 0U);
52 M0_BASSERT(sizeof ((struct m0_ha_msg *)0)->hm_source_process == 16U);
54 M0_BASSERT(sizeof ((struct m0_ha_msg *)0)->hm_source_service == 16U);
56 M0_BASSERT(sizeof ((struct m0_ha_msg *)0)->hm_time == 8U);
57 M0_BASSERT(offsetof(struct m0_ha_msg, hm_time) == 48U);
58 M0_BASSERT(sizeof ((struct m0_ha_msg *)0)->hm_epoch == 8U);
59 M0_BASSERT(offsetof(struct m0_ha_msg, hm_epoch) == 56U);
60 M0_BASSERT(sizeof ((struct m0_ha_msg *)0)->hm_data == 24624U);
61 M0_BASSERT(offsetof(struct m0_ha_msg, hm_data) == 64U);
62 M0_BASSERT(sizeof ((struct m0_ha_msg *)0)->hm_tag == 8U);
63 M0_BASSERT(offsetof(struct m0_ha_msg, hm_tag) == 24688U);
64 
65 M0_BASSERT(sizeof(struct m0_ha_msg_data) == 24624U);
66 
67 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->hed_type == 8U);
69 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_stob_ioq == 96U);
70 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_stob_ioq) == 8U);
71 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_nvec == 24608U);
72 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_nvec) == 8U);
73 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_fvec_req == 32U);
74 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_fvec_req) == 8U);
75 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_fvec_rep == 24616U);
76 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_fvec_rep) == 8U);
77 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_keepalive_req == 16U);
78 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_keepalive_req) == 8U);
79 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_keepalive_rep == 24U);
80 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_keepalive_rep) == 8U);
81 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_event_process == 24U);
82 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_event_process) == 8U);
83 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_event_service == 24U);
84 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_event_service) == 8U);
85 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_event_rpc == 16U);
86 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_event_rpc) == 8U);
87 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_be_io_err == 8U);
88 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_be_io_err) == 8U);
89 M0_BASSERT(sizeof ((struct m0_ha_msg_data *)0)->u.hed_ha_sns_err == 8U);
90 M0_BASSERT(offsetof(struct m0_ha_msg_data, u.hed_ha_sns_err) == 8U);
91 
92 
93 
94 M0_INTERNAL void m0_xc_m0_ha_msg_struct_init(void)
95 {
96  _m0_ha_msg._child[0] = (struct m0_xcode_field) {
97  .xf_name = "hm_fid",
98 
99  .xf_type = m0_fid_xc,
100 
101  .xf_tag = 0,
102  .xf_opaque = NULL,
103  .xf_offset = offsetof(struct m0_ha_msg, hm_fid),
104  .xf_read = NULL,
105  .xf_decor = {
107  }
108  };
110 
111  _m0_ha_msg._child[1] = (struct m0_xcode_field) {
112  .xf_name = "hm_source_process",
113 
114  .xf_type = m0_fid_xc,
115 
116  .xf_tag = 0,
117  .xf_opaque = NULL,
118  .xf_offset = offsetof(struct m0_ha_msg, hm_source_process),
119  .xf_read = NULL,
120  .xf_decor = {
122  }
123  };
125 
126  _m0_ha_msg._child[2] = (struct m0_xcode_field) {
127  .xf_name = "hm_source_service",
128 
129  .xf_type = m0_fid_xc,
130 
131  .xf_tag = 0,
132  .xf_opaque = NULL,
133  .xf_offset = offsetof(struct m0_ha_msg, hm_source_service),
134  .xf_read = NULL,
135  .xf_decor = {
137  }
138  };
140 
141  _m0_ha_msg._child[3] = (struct m0_xcode_field) {
142  .xf_name = "hm_time",
143 
144  .xf_type = &M0_XT_U64,
145 
146  .xf_tag = 0,
147  .xf_opaque = NULL,
148  .xf_offset = offsetof(struct m0_ha_msg, hm_time),
149  .xf_read = NULL,
150  .xf_decor = {
152  }
153  };
154  m0_xc_u64_init();
155 
156  _m0_ha_msg._child[4] = (struct m0_xcode_field) {
157  .xf_name = "hm_epoch",
158 
159  .xf_type = &M0_XT_U64,
160 
161  .xf_tag = 0,
162  .xf_opaque = NULL,
163  .xf_offset = offsetof(struct m0_ha_msg, hm_epoch),
164  .xf_read = NULL,
165  .xf_decor = {
167  }
168  };
169  m0_xc_u64_init();
170 
171  _m0_ha_msg._child[5] = (struct m0_xcode_field) {
172  .xf_name = "hm_data",
173 
174  .xf_type = m0_ha_msg_data_xc,
175 
176  .xf_tag = 0,
177  .xf_opaque = NULL,
178  .xf_offset = offsetof(struct m0_ha_msg, hm_data),
179  .xf_read = NULL,
180  .xf_decor = {
182  }
183  };
185 
186  _m0_ha_msg._child[6] = (struct m0_xcode_field) {
187  .xf_name = "hm_tag",
188 
189  .xf_type = &M0_XT_U64,
190 
191  .xf_tag = 0,
192  .xf_opaque = NULL,
193  .xf_offset = offsetof(struct m0_ha_msg, hm_tag),
194  .xf_read = NULL,
195  .xf_decor = {
197  }
198  };
199  m0_xc_u64_init();
200 
202 }
203 
204 M0_INTERNAL void m0_xc_m0_ha_msg_data_struct_init(void)
205 {
206  _m0_ha_msg_data._child[0] = (struct m0_xcode_field) {
207  .xf_name = "hed_type",
208 
209  .xf_type = &M0_XT_U64,
210 
211  .xf_tag = 0,
212  .xf_opaque = NULL,
213  .xf_offset = offsetof(struct m0_ha_msg_data, hed_type),
214  .xf_read = NULL,
215  .xf_decor = {
217  }
218  };
219  m0_xc_u64_init();
220 
221  _m0_ha_msg_data._child[1] = (struct m0_xcode_field) {
222  .xf_name = "hed_stob_ioq",
223 
224  .xf_type = m0_stob_ioq_error_xc,
225 
226  .xf_tag = M0_HA_MSG_STOB_IOQ,
227  .xf_opaque = NULL,
228  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_stob_ioq),
229  .xf_read = NULL,
230  .xf_decor = {
232  }
233  };
235 
236  _m0_ha_msg_data._child[2] = (struct m0_xcode_field) {
237  .xf_name = "hed_nvec",
238 
239  .xf_type = m0_ha_msg_nvec_xc,
240 
241  .xf_tag = M0_HA_MSG_NVEC,
242  .xf_opaque = NULL,
243  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_nvec),
244  .xf_read = NULL,
245  .xf_decor = {
247  }
248  };
250 
251  _m0_ha_msg_data._child[3] = (struct m0_xcode_field) {
252  .xf_name = "hed_fvec_req",
253 
254  .xf_type = m0_ha_msg_failure_vec_req_xc,
255 
256  .xf_tag = M0_HA_MSG_FAILURE_VEC_REQ,
257  .xf_opaque = NULL,
258  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_fvec_req),
259  .xf_read = NULL,
260  .xf_decor = {
262  }
263  };
265 
266  _m0_ha_msg_data._child[4] = (struct m0_xcode_field) {
267  .xf_name = "hed_fvec_rep",
268 
269  .xf_type = m0_ha_msg_failure_vec_rep_xc,
270 
271  .xf_tag = M0_HA_MSG_FAILURE_VEC_REP,
272  .xf_opaque = NULL,
273  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_fvec_rep),
274  .xf_read = NULL,
275  .xf_decor = {
277  }
278  };
280 
281  _m0_ha_msg_data._child[5] = (struct m0_xcode_field) {
282  .xf_name = "hed_keepalive_req",
283 
284  .xf_type = m0_ha_msg_keepalive_req_xc,
285 
286  .xf_tag = M0_HA_MSG_KEEPALIVE_REQ,
287  .xf_opaque = NULL,
288  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_keepalive_req),
289  .xf_read = NULL,
290  .xf_decor = {
292  }
293  };
295 
296  _m0_ha_msg_data._child[6] = (struct m0_xcode_field) {
297  .xf_name = "hed_keepalive_rep",
298 
299  .xf_type = m0_ha_msg_keepalive_rep_xc,
300 
301  .xf_tag = M0_HA_MSG_KEEPALIVE_REP,
302  .xf_opaque = NULL,
303  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_keepalive_rep),
304  .xf_read = NULL,
305  .xf_decor = {
307  }
308  };
310 
311  _m0_ha_msg_data._child[7] = (struct m0_xcode_field) {
312  .xf_name = "hed_event_process",
313 
314  .xf_type = m0_conf_ha_process_xc,
315 
316  .xf_tag = M0_HA_MSG_EVENT_PROCESS,
317  .xf_opaque = NULL,
318  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_event_process),
319  .xf_read = NULL,
320  .xf_decor = {
322  }
323  };
325 
326  _m0_ha_msg_data._child[8] = (struct m0_xcode_field) {
327  .xf_name = "hed_event_service",
328 
329  .xf_type = m0_conf_ha_service_xc,
330 
331  .xf_tag = M0_HA_MSG_EVENT_SERVICE,
332  .xf_opaque = NULL,
333  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_event_service),
334  .xf_read = NULL,
335  .xf_decor = {
337  }
338  };
340 
341  _m0_ha_msg_data._child[9] = (struct m0_xcode_field) {
342  .xf_name = "hed_event_rpc",
343 
344  .xf_type = m0_ha_msg_rpc_xc,
345 
346  .xf_tag = M0_HA_MSG_EVENT_RPC,
347  .xf_opaque = NULL,
348  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_event_rpc),
349  .xf_read = NULL,
350  .xf_decor = {
352  }
353  };
355 
356  _m0_ha_msg_data._child[10] = (struct m0_xcode_field) {
357  .xf_name = "hed_be_io_err",
358 
359  .xf_type = m0_be_io_err_xc,
360 
361  .xf_tag = M0_HA_MSG_BE_IO_ERR,
362  .xf_opaque = NULL,
363  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_be_io_err),
364  .xf_read = NULL,
365  .xf_decor = {
367  }
368  };
370 
371  _m0_ha_msg_data._child[11] = (struct m0_xcode_field) {
372  .xf_name = "hed_ha_sns_err",
373 
374  .xf_type = m0_ha_sns_err_xc,
375 
376  .xf_tag = M0_HA_MSG_SNS_ERR,
377  .xf_opaque = NULL,
378  .xf_offset = offsetof(struct m0_ha_msg_data, u.hed_ha_sns_err),
379  .xf_read = NULL,
380  .xf_decor = {
382  }
383  };
385 
387 }
388 
389 M0_INTERNAL void m0_xc_ha_msg_init(void)
390 {
393 }
394 
395 M0_INTERNAL void m0_xc_ha_msg_fini(void)
396 {
397 }
M0_INTERNAL void m0_xc_m0_ha_msg_keepalive_req_struct_init(void)
Definition: keepalive_xc.c:62
struct m0_xcode_field _child[7]
Definition: msg_xc.c:15
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: msg_xc.c:14
struct m0_xcode_type * m0_ha_msg_keepalive_rep_xc
Definition: keepalive_xc.c:11
M0_INTERNAL void m0_xc_m0_ha_msg_rpc_struct_init(void)
Definition: ha_xc.c:39
union @126 u
M0_INTERNAL void m0_xc_m0_stob_ioq_error_struct_init(void)
Definition: ioq_error_xc.c:51
struct m0_xcode_type * m0_ha_msg_failure_vec_rep_xc
Definition: failvec_xc.c:11
M0_INTERNAL void m0_xc_m0_ha_msg_keepalive_rep_struct_init(void)
Definition: keepalive_xc.c:82
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_ha_msg_struct_init(void)
Definition: msg_xc.c:94
M0_INTERNAL void m0_xc_m0_fid_struct_init(void)
Definition: fid_xc.c:64
struct m0_ha_msg_data hm_data
Definition: msg.h:70
M0_INTERNAL void m0_xc_m0_ha_msg_failure_vec_rep_struct_init(void)
Definition: failvec_xc.c:103
M0_INTERNAL void m0_xc_m0_conf_ha_process_struct_init(void)
Definition: ha_xc.c:68
uint64_t hed_type
Definition: msg.h:64
M0_BASSERT(offsetof(struct _m0_ha_msg_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type _type
Definition: msg_xc.c:31
struct m0_xcode_type * m0_ha_msg_data_xc
Definition: msg_xc.c:11
m0_time_t hm_time
Definition: msg.h:68
static struct _m0_ha_msg_s _m0_ha_msg
M0_INTERNAL void m0_xc_ha_msg_fini(void)
Definition: msg_xc.c:395
struct m0_xcode_type * m0_ha_msg_failure_vec_req_xc
Definition: failvec_xc.c:10
M0_INTERNAL void m0_xc_m0_ha_msg_nvec_struct_init(void)
Definition: note_xc.c:208
struct m0_xcode_type * m0_stob_ioq_error_xc
Definition: ioq_error_xc.c:10
struct m0_xcode_type * m0_ha_sns_err_xc
Definition: ha_xc.c:10
uint64_t hm_tag
Definition: msg.h:73
M0_INTERNAL void m0_xc_m0_be_io_err_struct_init(void)
Definition: ha_xc.c:41
Definition: msg.h:115
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
struct m0_fid hm_source_service
Definition: msg.h:67
struct m0_xcode_type * m0_ha_msg_rpc_xc
Definition: ha_xc.c:10
struct m0_xcode_type * m0_ha_msg_nvec_xc
Definition: note_xc.c:13
void m0_xc_u64_init(void)
Definition: xcode.c:904
M0_INTERNAL void m0_xc_m0_ha_msg_data_struct_init(void)
Definition: msg_xc.c:204
M0_INTERNAL void m0_xc_ha_msg_init(void)
Definition: msg_xc.c:389
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_fid hm_fid
Definition: msg.h:65
M0_INTERNAL void m0_xc_m0_ha_msg_failure_vec_req_struct_init(void)
Definition: failvec_xc.c:68
M0_INTERNAL void m0_xc_m0_ha_sns_err_struct_init(void)
Definition: ha_xc.c:39
struct m0_xcode_field _child[12]
Definition: msg_xc.c:32
struct m0_xcode_type * m0_ha_msg_keepalive_req_xc
Definition: keepalive_xc.c:10
struct m0_xcode_type * m0_ha_msg_xc
Definition: msg_xc.c:10
M0_INTERNAL void m0_xc_m0_conf_ha_service_struct_init(void)
Definition: ha_xc.c:118
struct m0_xcode_type * m0_be_io_err_xc
Definition: ha_xc.c:10
uint64_t hm_epoch
Definition: msg.h:69
struct m0_xcode_type * m0_conf_ha_process_xc
Definition: ha_xc.c:10
const char * xf_name
Definition: xcode.h:251
struct m0_xcode_type * m0_fid_xc
Definition: fid_xc.c:10
struct m0_fid hm_source_process
Definition: msg.h:66
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
static struct _m0_ha_msg_data_s _m0_ha_msg_data
struct m0_xcode_type * m0_conf_ha_service_xc
Definition: ha_xc.c:11