Motr  M0
fops_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from rpc/ub/fops.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "rpc/ub/fops.h"
8 #include "rpc/ub/fops_xc.h"
9 
12 
13 static struct _ub_req_s {
16 } _ub_req = {
17  ._type = {
19  .xct_name = "ub_req",
20  .xct_sizeof = sizeof (struct ub_req),
21  .xct_nr = 2,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _ub_req_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _ub_resp_s {
33 } _ub_resp = {
34  ._type = {
36  .xct_name = "ub_resp",
37  .xct_sizeof = sizeof (struct ub_resp),
38  .xct_nr = 3,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _ub_resp_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct ub_req) == 24U);
49 
50 M0_BASSERT(sizeof ((struct ub_req *)0)->uq_seqn == 8U);
51 M0_BASSERT(offsetof(struct ub_req, uq_seqn) == 0U);
52 M0_BASSERT(sizeof ((struct ub_req *)0)->uq_data == 16U);
53 M0_BASSERT(offsetof(struct ub_req, uq_data) == 8U);
54 
55 M0_BASSERT(sizeof(struct ub_resp) == 32U);
56 
57 M0_BASSERT(sizeof ((struct ub_resp *)0)->ur_rc == 4U);
58 M0_BASSERT(offsetof(struct ub_resp, ur_rc) == 0U);
59 M0_BASSERT(sizeof ((struct ub_resp *)0)->ur_seqn == 8U);
60 M0_BASSERT(offsetof(struct ub_resp, ur_seqn) == 8U);
61 M0_BASSERT(sizeof ((struct ub_resp *)0)->ur_data == 16U);
62 M0_BASSERT(offsetof(struct ub_resp, ur_data) == 16U);
63 
64 
65 
66 M0_INTERNAL void m0_xc_ub_req_struct_init(void)
67 {
68  _ub_req._child[0] = (struct m0_xcode_field) {
69  .xf_name = "uq_seqn",
70 
71  .xf_type = &M0_XT_U64,
72 
73  .xf_tag = 0,
74  .xf_opaque = NULL,
75  .xf_offset = offsetof(struct ub_req, uq_seqn),
76  .xf_read = NULL,
77  .xf_decor = {
79  }
80  };
82 
83  _ub_req._child[1] = (struct m0_xcode_field) {
84  .xf_name = "uq_data",
85 
86  .xf_type = m0_buf_xc,
87 
88  .xf_tag = 0,
89  .xf_opaque = NULL,
90  .xf_offset = offsetof(struct ub_req, uq_data),
91  .xf_read = NULL,
92  .xf_decor = {
94  }
95  };
97 
99 }
100 
101 M0_INTERNAL void m0_xc_ub_resp_struct_init(void)
102 {
103  _ub_resp._child[0] = (struct m0_xcode_field) {
104  .xf_name = "ur_rc",
105 
106  .xf_type = &M0_XT_U32,
107 
108  .xf_tag = 0,
109  .xf_opaque = NULL,
110  .xf_offset = offsetof(struct ub_resp, ur_rc),
111  .xf_read = NULL,
112  .xf_decor = {
114  }
115  };
116  m0_xc_u32_init();
117 
118  _ub_resp._child[1] = (struct m0_xcode_field) {
119  .xf_name = "ur_seqn",
120 
121  .xf_type = &M0_XT_U64,
122 
123  .xf_tag = 0,
124  .xf_opaque = NULL,
125  .xf_offset = offsetof(struct ub_resp, ur_seqn),
126  .xf_read = NULL,
127  .xf_decor = {
129  }
130  };
131  m0_xc_u64_init();
132 
133  _ub_resp._child[2] = (struct m0_xcode_field) {
134  .xf_name = "ur_data",
135 
136  .xf_type = m0_buf_xc,
137 
138  .xf_tag = 0,
139  .xf_opaque = NULL,
140  .xf_offset = offsetof(struct ub_resp, ur_data),
141  .xf_read = NULL,
142  .xf_decor = {
144  }
145  };
147 
149 }
150 
151 M0_INTERNAL void m0_xc_rpc_ub_fops_init(void)
152 {
155 }
156 
157 M0_INTERNAL void m0_xc_rpc_ub_fops_fini(void)
158 {
159 }
M0_BASSERT(offsetof(struct _m0_fdmi_flt_id_arr_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[3]
Definition: fops_xc.c:32
M0_INTERNAL void m0_xc_rpc_ub_fops_init(void)
Definition: fops_xc.c:151
#define NULL
Definition: misc.h:38
int32_t ur_rc
Definition: onwire.h:282
Definition: fops.h:38
uint64_t ur_seqn
Definition: fops.h:135
static struct _ub_req_s _ub_req
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_type * ub_resp_xc
Definition: fops_xc.c:11
struct m0_xcode_field _child[2]
Definition: fops_xc.c:15
Definition: fops.h:32
M0_INTERNAL void m0_xc_m0_buf_struct_init(void)
Definition: buf_xc.c:64
struct m0_xcode_type _type
Definition: fops_xc.c:31
M0_INTERNAL void m0_xc_ub_resp_struct_init(void)
Definition: fops_xc.c:101
struct m0_xcode_type * ub_req_xc
Definition: fops_xc.c:10
#define M0_POST(cond)
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_ub_req_struct_init(void)
Definition: fops_xc.c:66
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
M0_INTERNAL void m0_xc_rpc_ub_fops_fini(void)
Definition: fops_xc.c:157
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_buf uq_data
Definition: fops.h:135
struct m0_buf ur_data
Definition: fops.h:136
uint64_t uq_seqn
Definition: fops.h:134
static struct _ub_resp_s _ub_resp
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_xcode_type _type
Definition: fops_xc.c:14