Motr  M0
fi_command_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from fis/fi_command.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "fis/fi_command.h"
8 #include "fis/fi_command_xc.h"
9 
12 
13 static struct _m0_fi_command_req_s {
17  ._type = {
19  .xct_name = "m0_fi_command_req",
20  .xct_sizeof = sizeof (struct m0_fi_command_req),
21  .xct_nr = 5,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _m0_fi_command_req_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _m0_fi_command_rep_s {
34  ._type = {
36  .xct_name = "m0_fi_command_rep",
37  .xct_sizeof = sizeof (struct m0_fi_command_rep),
38  .xct_nr = 1,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _m0_fi_command_rep_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_fi_command_req) == 48U);
49 
50 M0_BASSERT(sizeof ((struct m0_fi_command_req *)0)->fcr_func == 16U);
52 M0_BASSERT(sizeof ((struct m0_fi_command_req *)0)->fcr_tag == 16U);
54 M0_BASSERT(sizeof ((struct m0_fi_command_req *)0)->fcr_disp == 1U);
56 M0_BASSERT(sizeof ((struct m0_fi_command_req *)0)->fcr_num1 == 4U);
58 M0_BASSERT(sizeof ((struct m0_fi_command_req *)0)->fcr_num2 == 4U);
60 
61 M0_BASSERT(sizeof(struct m0_fi_command_rep) == 4U);
62 
63 M0_BASSERT(sizeof ((struct m0_fi_command_rep *)0)->fcp_rc == 4U);
65 
66 
67 
69 {
71  .xf_name = "fcr_func",
72 
73  .xf_type = m0_buf_xc,
74 
75  .xf_tag = 0,
76  .xf_opaque = NULL,
77  .xf_offset = offsetof(struct m0_fi_command_req, fcr_func),
78  .xf_read = NULL,
79  .xf_decor = {
81  }
82  };
84 
86  .xf_name = "fcr_tag",
87 
88  .xf_type = m0_buf_xc,
89 
90  .xf_tag = 0,
91  .xf_opaque = NULL,
92  .xf_offset = offsetof(struct m0_fi_command_req, fcr_tag),
93  .xf_read = NULL,
94  .xf_decor = {
96  }
97  };
99 
101  .xf_name = "fcr_disp",
102 
103  .xf_type = &M0_XT_U8,
104 
105  .xf_tag = 0,
106  .xf_opaque = NULL,
107  .xf_offset = offsetof(struct m0_fi_command_req, fcr_disp),
108  .xf_read = NULL,
109  .xf_decor = {
111  }
112  };
113  m0_xc_u8_init();
114 
116  .xf_name = "fcr_num1",
117 
118  .xf_type = &M0_XT_U32,
119 
120  .xf_tag = 0,
121  .xf_opaque = NULL,
122  .xf_offset = offsetof(struct m0_fi_command_req, fcr_num1),
123  .xf_read = NULL,
124  .xf_decor = {
126  }
127  };
128  m0_xc_u32_init();
129 
131  .xf_name = "fcr_num2",
132 
133  .xf_type = &M0_XT_U32,
134 
135  .xf_tag = 0,
136  .xf_opaque = NULL,
137  .xf_offset = offsetof(struct m0_fi_command_req, fcr_num2),
138  .xf_read = NULL,
139  .xf_decor = {
141  }
142  };
143  m0_xc_u32_init();
144 
146 }
147 
149 {
151  .xf_name = "fcp_rc",
152 
153  .xf_type = &M0_XT_U32,
154 
155  .xf_tag = 0,
156  .xf_opaque = NULL,
157  .xf_offset = offsetof(struct m0_fi_command_rep, fcp_rc),
158  .xf_read = NULL,
159  .xf_decor = {
161  }
162  };
163  m0_xc_u32_init();
164 
166 }
167 
168 M0_INTERNAL void m0_xc_fis_fi_command_init(void)
169 {
172 }
173 
174 M0_INTERNAL void m0_xc_fis_fi_command_fini(void)
175 {
176 }
M0_BASSERT(offsetof(struct _m0_fi_command_req_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type * m0_buf_xc
Definition: buf_xc.c:10
struct m0_xcode_field _child[1]
Definition: fi_command_xc.c:32
int32_t fcp_rc
Definition: fi_command.h:57
M0_INTERNAL void m0_xc_m0_fi_command_rep_struct_init(void)
#define NULL
Definition: misc.h:38
struct m0_xcode_type _type
Definition: fi_command_xc.c:14
struct m0_xcode_field _child[5]
Definition: fi_command_xc.c:15
struct m0_xcode_type * m0_fi_command_rep_xc
Definition: fi_command_xc.c:11
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_buf_struct_init(void)
Definition: buf_xc.c:64
struct m0_buf fcr_tag
Definition: fi_command.h:58
M0_INTERNAL void m0_xc_fis_fi_command_fini(void)
uint8_t fcr_disp
Definition: fi_command.h:59
#define M0_POST(cond)
M0_INTERNAL void m0_xc_m0_fi_command_req_struct_init(void)
Definition: fi_command_xc.c:68
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
static struct _m0_fi_command_rep_s _m0_fi_command_rep
struct m0_xcode_type _type
Definition: fi_command_xc.c:31
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_fi_command_req_s _m0_fi_command_req
struct m0_buf fcr_func
Definition: fi_command.h:57
M0_INTERNAL void m0_xc_fis_fi_command_init(void)
uint32_t fcr_num1
Definition: fi_command.h:60
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_fi_command_req_xc
Definition: fi_command_xc.c:10
const char * xf_name
Definition: xcode.h:251
#define offsetof(typ, memb)
Definition: misc.h:29
uint32_t fcr_num2
Definition: fi_command.h:61