Motr  M0
sw_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from cm/sw.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "cm/sw.h"
8 #include "cm/sw_xc.h"
9 
14 
15 static struct _m0_cm_sw_s {
18 } _m0_cm_sw = {
19  ._type = {
21  .xct_name = "m0_cm_sw",
22  .xct_sizeof = sizeof (struct m0_cm_sw),
23  .xct_nr = 2,
24  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
25  }
26 };
27 
29 M0_BASSERT(offsetof(struct _m0_cm_sw_s, _child[0]) ==
30  offsetof(struct m0_xcode_type, xct_child[0]));
31 
32 static struct _m0_cm_local_ep_s {
35 } _m0_cm_local_ep = {
36  ._type = {
38  .xct_name = "m0_cm_local_ep",
39  .xct_sizeof = sizeof (struct m0_cm_local_ep),
40  .xct_nr = 2,
41  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
42  }
43 };
44 
46 M0_BASSERT(offsetof(struct _m0_cm_local_ep_s, _child[0]) ==
47  offsetof(struct m0_xcode_type, xct_child[0]));
48 
49 static struct _m0_cm_sw_onwire_s {
52 } _m0_cm_sw_onwire = {
53  ._type = {
55  .xct_name = "m0_cm_sw_onwire",
56  .xct_sizeof = sizeof (struct m0_cm_sw_onwire),
57  .xct_nr = 6,
58  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
59  }
60 };
61 
63 M0_BASSERT(offsetof(struct _m0_cm_sw_onwire_s, _child[0]) ==
64  offsetof(struct m0_xcode_type, xct_child[0]));
65 
66 static struct _m0_cm_sw_onwire_rep_s {
70  ._type = {
72  .xct_name = "m0_cm_sw_onwire_rep",
73  .xct_sizeof = sizeof (struct m0_cm_sw_onwire_rep),
74  .xct_nr = 1,
75  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
76  }
77 };
78 
80 M0_BASSERT(offsetof(struct _m0_cm_sw_onwire_rep_s, _child[0]) ==
81  offsetof(struct m0_xcode_type, xct_child[0]));
82 
83 
84 M0_BASSERT(sizeof(struct m0_cm_sw) == 64U);
85 
86 M0_BASSERT(sizeof ((struct m0_cm_sw *)0)->sw_lo == 32U);
87 M0_BASSERT(offsetof(struct m0_cm_sw, sw_lo) == 0U);
88 M0_BASSERT(sizeof ((struct m0_cm_sw *)0)->sw_hi == 32U);
89 M0_BASSERT(offsetof(struct m0_cm_sw, sw_hi) == 32U);
90 
91 M0_BASSERT(sizeof(struct m0_cm_local_ep) == 16U);
92 
93 M0_BASSERT(sizeof ((struct m0_cm_local_ep *)0)->ep_size == 4U);
95 M0_BASSERT(sizeof ((struct m0_cm_local_ep *)0)->ep == 8U);
96 M0_BASSERT(offsetof(struct m0_cm_local_ep, ep) == 8U);
97 
98 M0_BASSERT(sizeof(struct m0_cm_sw_onwire) == 168U);
99 
100 M0_BASSERT(sizeof ((struct m0_cm_sw_onwire *)0)->swo_cm_epoch == 8U);
102 M0_BASSERT(sizeof ((struct m0_cm_sw_onwire *)0)->swo_sender_id == 8U);
104 M0_BASSERT(sizeof ((struct m0_cm_sw_onwire *)0)->swo_cm_ep == 16U);
106 M0_BASSERT(sizeof ((struct m0_cm_sw_onwire *)0)->swo_in_interval == 64U);
108 M0_BASSERT(sizeof ((struct m0_cm_sw_onwire *)0)->swo_out_interval == 64U);
110 M0_BASSERT(sizeof ((struct m0_cm_sw_onwire *)0)->swo_cm_status == 4U);
112 
113 M0_BASSERT(sizeof(struct m0_cm_sw_onwire_rep) == 4U);
114 
115 M0_BASSERT(sizeof ((struct m0_cm_sw_onwire_rep *)0)->swr_rc == 4U);
117 
118 
119 
120 M0_INTERNAL void m0_xc_m0_cm_sw_struct_init(void)
121 {
122  _m0_cm_sw._child[0] = (struct m0_xcode_field) {
123  .xf_name = "sw_lo",
124 
125  .xf_type = m0_cm_ag_id_xc,
126 
127  .xf_tag = 0,
128  .xf_opaque = NULL,
129  .xf_offset = offsetof(struct m0_cm_sw, sw_lo),
130  .xf_read = NULL,
131  .xf_decor = {
133  }
134  };
136 
137  _m0_cm_sw._child[1] = (struct m0_xcode_field) {
138  .xf_name = "sw_hi",
139 
140  .xf_type = m0_cm_ag_id_xc,
141 
142  .xf_tag = 0,
143  .xf_opaque = NULL,
144  .xf_offset = offsetof(struct m0_cm_sw, sw_hi),
145  .xf_read = NULL,
146  .xf_decor = {
148  }
149  };
151 
153 }
154 
155 M0_INTERNAL void m0_xc_m0_cm_local_ep_struct_init(void)
156 {
157  _m0_cm_local_ep._child[0] = (struct m0_xcode_field) {
158  .xf_name = "ep_size",
159 
160  .xf_type = &M0_XT_U32,
161 
162  .xf_tag = 0,
163  .xf_opaque = NULL,
164  .xf_offset = offsetof(struct m0_cm_local_ep, ep_size),
165  .xf_read = NULL,
166  .xf_decor = {
168  }
169  };
170  m0_xc_u32_init();
171 
172  _m0_cm_local_ep._child[1] = (struct m0_xcode_field) {
173  .xf_name = "ep",
174 
175  .xf_type = &M0_XT_U8,
176 
177  .xf_tag = 0,
178  .xf_opaque = NULL,
179  .xf_offset = offsetof(struct m0_cm_local_ep, ep),
180  .xf_read = NULL,
181  .xf_decor = {
183  }
184  };
185  m0_xc_u8_init();
186 
188 }
189 
190 M0_INTERNAL void m0_xc_m0_cm_sw_onwire_struct_init(void)
191 {
192  _m0_cm_sw_onwire._child[0] = (struct m0_xcode_field) {
193  .xf_name = "swo_cm_epoch",
194 
195  .xf_type = &M0_XT_U64,
196 
197  .xf_tag = 0,
198  .xf_opaque = NULL,
199  .xf_offset = offsetof(struct m0_cm_sw_onwire, swo_cm_epoch),
200  .xf_read = NULL,
201  .xf_decor = {
203  }
204  };
205  m0_xc_u64_init();
206 
207  _m0_cm_sw_onwire._child[1] = (struct m0_xcode_field) {
208  .xf_name = "swo_sender_id",
209 
210  .xf_type = &M0_XT_U64,
211 
212  .xf_tag = 0,
213  .xf_opaque = NULL,
214  .xf_offset = offsetof(struct m0_cm_sw_onwire, swo_sender_id),
215  .xf_read = NULL,
216  .xf_decor = {
218  }
219  };
220  m0_xc_u64_init();
221 
222  _m0_cm_sw_onwire._child[2] = (struct m0_xcode_field) {
223  .xf_name = "swo_cm_ep",
224 
225  .xf_type = m0_cm_local_ep_xc,
226 
227  .xf_tag = 0,
228  .xf_opaque = NULL,
229  .xf_offset = offsetof(struct m0_cm_sw_onwire, swo_cm_ep),
230  .xf_read = NULL,
231  .xf_decor = {
233  }
234  };
236 
237  _m0_cm_sw_onwire._child[3] = (struct m0_xcode_field) {
238  .xf_name = "swo_in_interval",
239 
240  .xf_type = m0_cm_sw_xc,
241 
242  .xf_tag = 0,
243  .xf_opaque = NULL,
244  .xf_offset = offsetof(struct m0_cm_sw_onwire, swo_in_interval),
245  .xf_read = NULL,
246  .xf_decor = {
248  }
249  };
251 
252  _m0_cm_sw_onwire._child[4] = (struct m0_xcode_field) {
253  .xf_name = "swo_out_interval",
254 
255  .xf_type = m0_cm_sw_xc,
256 
257  .xf_tag = 0,
258  .xf_opaque = NULL,
259  .xf_offset = offsetof(struct m0_cm_sw_onwire, swo_out_interval),
260  .xf_read = NULL,
261  .xf_decor = {
263  }
264  };
266 
267  _m0_cm_sw_onwire._child[5] = (struct m0_xcode_field) {
268  .xf_name = "swo_cm_status",
269 
270  .xf_type = &M0_XT_U32,
271 
272  .xf_tag = 0,
273  .xf_opaque = NULL,
274  .xf_offset = offsetof(struct m0_cm_sw_onwire, swo_cm_status),
275  .xf_read = NULL,
276  .xf_decor = {
278  }
279  };
280  m0_xc_u32_init();
281 
283 }
284 
286 {
288  .xf_name = "swr_rc",
289 
290  .xf_type = &M0_XT_U32,
291 
292  .xf_tag = 0,
293  .xf_opaque = NULL,
294  .xf_offset = offsetof(struct m0_cm_sw_onwire_rep, swr_rc),
295  .xf_read = NULL,
296  .xf_decor = {
298  }
299  };
300  m0_xc_u32_init();
301 
303 }
304 
305 M0_INTERNAL void m0_xc_cm_sw_init(void)
306 {
311 }
312 
313 M0_INTERNAL void m0_xc_cm_sw_fini(void)
314 {
315 }
int swr_rc
Definition: sw.h:131
struct m0_xcode_type * m0_cm_ag_id_xc
Definition: ag_xc.c:10
M0_INTERNAL void m0_xc_m0_cm_ag_id_struct_init(void)
Definition: ag_xc.c:39
Definition: sw.h:45
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: sw_xc.c:33
static struct _m0_cm_sw_s _m0_cm_sw
struct m0_cm_ag_id sw_hi
Definition: sw.h:132
static struct _m0_cm_sw_onwire_rep_s _m0_cm_sw_onwire_rep
struct m0_xcode_field _child[6]
Definition: sw_xc.c:51
uint32_t ep_size
Definition: sw.h:131
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_field _child[2]
Definition: sw_xc.c:17
struct m0_xcode_type * m0_cm_sw_onwire_rep_xc
Definition: sw_xc.c:13
struct m0_cm_local_ep swo_cm_ep
Definition: sw.h:137
M0_BASSERT(offsetof(struct _m0_cm_sw_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
Definition: sock.c:754
struct m0_xcode_type * m0_cm_sw_onwire_xc
Definition: sw_xc.c:12
struct m0_xcode_type * m0_cm_sw_xc
Definition: sw_xc.c:10
struct m0_xcode_type _type
Definition: sw_xc.c:50
M0_INTERNAL void m0_xc_cm_sw_fini(void)
Definition: sw_xc.c:313
struct m0_xcode_type _type
Definition: sw_xc.c:16
uint64_t swo_sender_id
Definition: sw.h:134
static struct _m0_cm_local_ep_s _m0_cm_local_ep
M0_INTERNAL void m0_xc_cm_sw_init(void)
Definition: sw_xc.c:305
M0_INTERNAL void m0_xc_m0_cm_sw_struct_init(void)
Definition: sw_xc.c:120
#define M0_POST(cond)
uint32_t swo_cm_status
Definition: sw.h:145
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_m0_cm_sw_onwire_rep_struct_init(void)
Definition: sw_xc.c:285
void m0_xc_u64_init(void)
Definition: xcode.c:904
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_xcode_field _child[1]
Definition: sw_xc.c:68
m0_time_t swo_cm_epoch
Definition: sw.h:132
struct m0_cm_ag_id sw_lo
Definition: sw.h:131
struct m0_xcode_type _type
Definition: sw_xc.c:67
struct m0_xcode_type * m0_cm_local_ep_xc
Definition: sw_xc.c:11
struct m0_xcode_field _child[2]
Definition: sw_xc.c:34
const struct m0_xcode_type M0_XT_U8
Definition: xcode.c:924
M0_INTERNAL void m0_xc_m0_cm_local_ep_struct_init(void)
Definition: sw_xc.c:155
M0_INTERNAL void m0_xc_m0_cm_sw_onwire_struct_init(void)
Definition: sw_xc.c:190
void m0_xc_u8_init(void)
Definition: xcode.c:892
void m0_xc_u32_init(void)
Definition: xcode.c:900
static struct _m0_cm_sw_onwire_s _m0_cm_sw_onwire
const char * xf_name
Definition: xcode.h:251
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_cm_sw swo_out_interval
Definition: sw.h:143
struct m0_cm_sw swo_in_interval
Definition: sw.h:140