Motr  M0
update_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from dtm/update.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "dtm/update.h"
8 #include "dtm/update_xc.h"
9 
13 
14 static struct _m0_dtm_update_descr_s {
18  ._type = {
20  .xct_name = "m0_dtm_update_descr",
21  .xct_sizeof = sizeof (struct m0_dtm_update_descr),
22  .xct_nr = 3,
23  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
24  }
25 };
26 
28 M0_BASSERT(offsetof(struct _m0_dtm_update_descr_s, _child[0]) ==
29  offsetof(struct m0_xcode_type, xct_child[0]));
30 
31 static struct _m0_dtm_update_data_s {
35  ._type = {
37  .xct_name = "m0_dtm_update_data",
38  .xct_sizeof = sizeof (struct m0_dtm_update_data),
39  .xct_nr = 4,
40  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
41  }
42 };
43 
45 M0_BASSERT(offsetof(struct _m0_dtm_update_data_s, _child[0]) ==
46  offsetof(struct m0_xcode_type, xct_child[0]));
47 
48 static struct _m0_dtm_history_id_s {
52  ._type = {
54  .xct_name = "m0_dtm_history_id",
55  .xct_sizeof = sizeof (struct m0_dtm_history_id),
56  .xct_nr = 4,
57  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
58  }
59 };
60 
62 M0_BASSERT(offsetof(struct _m0_dtm_history_id_s, _child[0]) ==
63  offsetof(struct m0_xcode_type, xct_child[0]));
64 
65 
66 M0_BASSERT(sizeof(struct m0_dtm_update_descr) == 88U);
67 
68 M0_BASSERT(sizeof ((struct m0_dtm_update_descr *)0)->udd_data == 24U);
70 M0_BASSERT(sizeof ((struct m0_dtm_update_descr *)0)->udd_id == 56U);
72 M0_BASSERT(sizeof ((struct m0_dtm_update_descr *)0)->udd_utype == 1U);
74 
75 M0_BASSERT(sizeof(struct m0_dtm_update_data) == 24U);
76 
77 M0_BASSERT(sizeof ((struct m0_dtm_update_data *)0)->da_ver == 8U);
79 M0_BASSERT(sizeof ((struct m0_dtm_update_data *)0)->da_orig_ver == 8U);
81 M0_BASSERT(sizeof ((struct m0_dtm_update_data *)0)->da_label == 4U);
83 M0_BASSERT(sizeof ((struct m0_dtm_update_data *)0)->da_rule == 1U);
85 
86 M0_BASSERT(sizeof(struct m0_dtm_history_id) == 56U);
87 
88 M0_BASSERT(sizeof ((struct m0_dtm_history_id *)0)->hid_id == 16U);
90 M0_BASSERT(sizeof ((struct m0_dtm_history_id *)0)->hid_sender == 16U);
92 M0_BASSERT(sizeof ((struct m0_dtm_history_id *)0)->hid_receiver == 16U);
94 M0_BASSERT(sizeof ((struct m0_dtm_history_id *)0)->hid_htype == 1U);
96 
97 
98 
100 {
102  .xf_name = "udd_data",
103 
104  .xf_type = m0_dtm_update_data_xc,
105 
106  .xf_tag = 0,
107  .xf_opaque = NULL,
108  .xf_offset = offsetof(struct m0_dtm_update_descr, udd_data),
109  .xf_read = NULL,
110  .xf_decor = {
112  }
113  };
115 
117  .xf_name = "udd_id",
118 
119  .xf_type = m0_dtm_history_id_xc,
120 
121  .xf_tag = 0,
122  .xf_opaque = NULL,
123  .xf_offset = offsetof(struct m0_dtm_update_descr, udd_id),
124  .xf_read = NULL,
125  .xf_decor = {
127  }
128  };
130 
132  .xf_name = "udd_utype",
133 
134  .xf_type = &M0_XT_U8,
135 
136  .xf_tag = 0,
137  .xf_opaque = NULL,
138  .xf_offset = offsetof(struct m0_dtm_update_descr, udd_utype),
139  .xf_read = NULL,
140  .xf_decor = {
142  }
143  };
144  m0_xc_u8_init();
145 
147 }
148 
150 {
152  .xf_name = "da_ver",
153 
154  .xf_type = &M0_XT_U64,
155 
156  .xf_tag = 0,
157  .xf_opaque = NULL,
158  .xf_offset = offsetof(struct m0_dtm_update_data, da_ver),
159  .xf_read = NULL,
160  .xf_decor = {
162  }
163  };
164  m0_xc_u64_init();
165 
167  .xf_name = "da_orig_ver",
168 
169  .xf_type = &M0_XT_U64,
170 
171  .xf_tag = 0,
172  .xf_opaque = NULL,
173  .xf_offset = offsetof(struct m0_dtm_update_data, da_orig_ver),
174  .xf_read = NULL,
175  .xf_decor = {
177  }
178  };
179  m0_xc_u64_init();
180 
182  .xf_name = "da_label",
183 
184  .xf_type = &M0_XT_U32,
185 
186  .xf_tag = 0,
187  .xf_opaque = NULL,
188  .xf_offset = offsetof(struct m0_dtm_update_data, da_label),
189  .xf_read = NULL,
190  .xf_decor = {
192  }
193  };
194  m0_xc_u32_init();
195 
197  .xf_name = "da_rule",
198 
199  .xf_type = &M0_XT_U8,
200 
201  .xf_tag = 0,
202  .xf_opaque = NULL,
203  .xf_offset = offsetof(struct m0_dtm_update_data, da_rule),
204  .xf_read = NULL,
205  .xf_decor = {
207  }
208  };
209  m0_xc_u8_init();
210 
212 }
213 
215 {
217  .xf_name = "hid_id",
218 
219  .xf_type = m0_uint128_xc,
220 
221  .xf_tag = 0,
222  .xf_opaque = NULL,
223  .xf_offset = offsetof(struct m0_dtm_history_id, hid_id),
224  .xf_read = NULL,
225  .xf_decor = {
227  }
228  };
230 
232  .xf_name = "hid_sender",
233 
234  .xf_type = m0_cookie_xc,
235 
236  .xf_tag = 0,
237  .xf_opaque = NULL,
238  .xf_offset = offsetof(struct m0_dtm_history_id, hid_sender),
239  .xf_read = NULL,
240  .xf_decor = {
242  }
243  };
245 
247  .xf_name = "hid_receiver",
248 
249  .xf_type = m0_cookie_xc,
250 
251  .xf_tag = 0,
252  .xf_opaque = NULL,
253  .xf_offset = offsetof(struct m0_dtm_history_id, hid_receiver),
254  .xf_read = NULL,
255  .xf_decor = {
257  }
258  };
260 
262  .xf_name = "hid_htype",
263 
264  .xf_type = &M0_XT_U8,
265 
266  .xf_tag = 0,
267  .xf_opaque = NULL,
268  .xf_offset = offsetof(struct m0_dtm_history_id, hid_htype),
269  .xf_read = NULL,
270  .xf_decor = {
272  }
273  };
274  m0_xc_u8_init();
275 
277 }
278 
279 M0_INTERNAL void m0_xc_dtm_update_init(void)
280 {
284 }
285 
286 M0_INTERNAL void m0_xc_dtm_update_fini(void)
287 {
288 }
uint8_t udd_utype
Definition: update.h:80
#define NULL
Definition: misc.h:38
struct m0_uint128 hid_id
Definition: update.h:78
uint8_t da_rule
Definition: update.h:81
struct m0_xcode_type * m0_dtm_update_data_xc
Definition: update_xc.c:11
struct m0_xcode_type _type
Definition: update_xc.c:15
M0_INTERNAL void m0_xc_m0_cookie_struct_init(void)
Definition: cookie_xc.c:39
struct m0_xcode_type * m0_uint128_xc
Definition: types_xc.c:10
struct m0_xcode_type * m0_dtm_history_id_xc
Definition: update_xc.c:12
uint64_t da_ver
Definition: update.h:78
struct m0_xcode_type _type
Definition: update_xc.c:32
struct m0_xcode_type _type
Definition: update_xc.c:49
struct m0_dtm_history_id udd_id
Definition: update.h:79
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_dtm_update_data udd_data
Definition: update.h:78
M0_INTERNAL void m0_xc_m0_uint128_struct_init(void)
Definition: types_xc.c:39
uint8_t hid_htype
Definition: update.h:81
struct m0_xcode_field _child[3]
Definition: update_xc.c:16
M0_BASSERT(offsetof(struct _m0_dtm_update_descr_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
uint64_t da_orig_ver
Definition: update.h:79
M0_INTERNAL void m0_xc_dtm_update_fini(void)
Definition: update_xc.c:286
struct m0_xcode_field _child[4]
Definition: update_xc.c:33
struct m0_cookie hid_receiver
Definition: update.h:80
uint32_t da_label
Definition: update.h:80
M0_INTERNAL void m0_xc_m0_dtm_history_id_struct_init(void)
Definition: update_xc.c:214
struct m0_xcode_field _child[4]
Definition: update_xc.c:50
#define M0_POST(cond)
static struct _m0_dtm_update_descr_s _m0_dtm_update_descr
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
static struct _m0_dtm_update_data_s _m0_dtm_update_data
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_dtm_update_data_struct_init(void)
Definition: update_xc.c:149
struct m0_cookie hid_sender
Definition: update.h:79
static struct _m0_dtm_history_id_s _m0_dtm_history_id
struct m0_xcode_type * m0_dtm_update_descr_xc
Definition: update_xc.c:10
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
struct m0_xcode_type * m0_cookie_xc
Definition: cookie_xc.c:10
M0_INTERNAL void m0_xc_m0_dtm_update_descr_struct_init(void)
Definition: update_xc.c:99
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
M0_INTERNAL void m0_xc_dtm_update_init(void)
Definition: update_xc.c:279
#define offsetof(typ, memb)
Definition: misc.h:29