Motr  M0
ping_fop_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from rpc/it/ping_fop.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "rpc/it/ping_fop.h"
8 #include "rpc/it/ping_fop_xc.h"
9 
13 
14 static struct _m0_fop_ping_arr_s {
17 } _m0_fop_ping_arr = {
18  ._type = {
20  .xct_name = "m0_fop_ping_arr",
21  .xct_sizeof = sizeof (struct m0_fop_ping_arr),
22  .xct_nr = 2,
23  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
24  }
25 };
26 
28 M0_BASSERT(offsetof(struct _m0_fop_ping_arr_s, _child[0]) ==
29  offsetof(struct m0_xcode_type, xct_child[0]));
30 
31 static struct _m0_fop_ping_s {
34 } _m0_fop_ping = {
35  ._type = {
37  .xct_name = "m0_fop_ping",
38  .xct_sizeof = sizeof (struct m0_fop_ping),
39  .xct_nr = 1,
40  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
41  }
42 };
43 
45 M0_BASSERT(offsetof(struct _m0_fop_ping_s, _child[0]) ==
46  offsetof(struct m0_xcode_type, xct_child[0]));
47 
48 static struct _m0_fop_ping_rep_s {
51 } _m0_fop_ping_rep = {
52  ._type = {
54  .xct_name = "m0_fop_ping_rep",
55  .xct_sizeof = sizeof (struct m0_fop_ping_rep),
56  .xct_nr = 1,
57  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
58  }
59 };
60 
62 M0_BASSERT(offsetof(struct _m0_fop_ping_rep_s, _child[0]) ==
63  offsetof(struct m0_xcode_type, xct_child[0]));
64 
65 
66 M0_BASSERT(sizeof(struct m0_fop_ping_arr) == 16U);
67 
68 M0_BASSERT(sizeof ((struct m0_fop_ping_arr *)0)->f_count == 4U);
70 M0_BASSERT(sizeof ((struct m0_fop_ping_arr *)0)->f_data == 8U);
72 
73 M0_BASSERT(sizeof(struct m0_fop_ping) == 16U);
74 
75 M0_BASSERT(sizeof ((struct m0_fop_ping *)0)->fp_arr == 16U);
76 M0_BASSERT(offsetof(struct m0_fop_ping, fp_arr) == 0U);
77 
78 M0_BASSERT(sizeof(struct m0_fop_ping_rep) == 4U);
79 
80 M0_BASSERT(sizeof ((struct m0_fop_ping_rep *)0)->fpr_rc == 4U);
82 
83 
84 
85 M0_INTERNAL void m0_xc_m0_fop_ping_arr_struct_init(void)
86 {
87  _m0_fop_ping_arr._child[0] = (struct m0_xcode_field) {
88  .xf_name = "f_count",
89 
90  .xf_type = &M0_XT_U32,
91 
92  .xf_tag = 0,
93  .xf_opaque = NULL,
94  .xf_offset = offsetof(struct m0_fop_ping_arr, f_count),
95  .xf_read = NULL,
96  .xf_decor = {
98  }
99  };
100  m0_xc_u32_init();
101 
102  _m0_fop_ping_arr._child[1] = (struct m0_xcode_field) {
103  .xf_name = "f_data",
104 
105  .xf_type = &M0_XT_U64,
106 
107  .xf_tag = 0,
108  .xf_opaque = NULL,
109  .xf_offset = offsetof(struct m0_fop_ping_arr, f_data),
110  .xf_read = NULL,
111  .xf_decor = {
113  }
114  };
115  m0_xc_u64_init();
116 
118 }
119 
120 M0_INTERNAL void m0_xc_m0_fop_ping_struct_init(void)
121 {
122  _m0_fop_ping._child[0] = (struct m0_xcode_field) {
123  .xf_name = "fp_arr",
124 
125  .xf_type = m0_fop_ping_arr_xc,
126 
127  .xf_tag = 0,
128  .xf_opaque = NULL,
129  .xf_offset = offsetof(struct m0_fop_ping, fp_arr),
130  .xf_read = NULL,
131  .xf_decor = {
133  }
134  };
136 
138 }
139 
140 M0_INTERNAL void m0_xc_m0_fop_ping_rep_struct_init(void)
141 {
142  _m0_fop_ping_rep._child[0] = (struct m0_xcode_field) {
143  .xf_name = "fpr_rc",
144 
145  .xf_type = &M0_XT_U32,
146 
147  .xf_tag = 0,
148  .xf_opaque = NULL,
149  .xf_offset = offsetof(struct m0_fop_ping_rep, fpr_rc),
150  .xf_read = NULL,
151  .xf_decor = {
153  }
154  };
155  m0_xc_u32_init();
156 
158 }
159 
160 M0_INTERNAL void m0_xc_rpc_it_ping_fop_init(void)
161 {
165 }
166 
167 M0_INTERNAL void m0_xc_rpc_it_ping_fop_fini(void)
168 {
169 }
M0_INTERNAL void m0_xc_rpc_it_ping_fop_fini(void)
Definition: ping_fop_xc.c:167
M0_INTERNAL void m0_xc_m0_fop_ping_rep_struct_init(void)
Definition: ping_fop_xc.c:140
struct m0_xcode_type * m0_fop_ping_arr_xc
Definition: ping_fop_xc.c:10
#define NULL
Definition: misc.h:38
struct m0_xcode_field _child[1]
Definition: ping_fop_xc.c:33
M0_BASSERT(offsetof(struct _m0_fop_ping_arr_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
static struct _m0_fop_ping_rep_s _m0_fop_ping_rep
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
int32_t fpr_rc
Definition: ping_fop.h:35
struct m0_xcode_type * m0_fop_ping_xc
Definition: ping_fop_xc.c:11
struct m0_xcode_field _child[1]
Definition: ping_fop_xc.c:50
M0_INTERNAL void m0_xc_m0_fop_ping_struct_init(void)
Definition: ping_fop_xc.c:120
#define M0_POST(cond)
struct m0_fop_ping_arr fp_arr
Definition: ping_fop.h:35
uint64_t * f_data
Definition: ping_fop.h:36
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_rpc_it_ping_fop_init(void)
Definition: ping_fop_xc.c:160
struct m0_xcode_field _child[2]
Definition: ping_fop_xc.c:16
static struct _m0_fop_ping_arr_s _m0_fop_ping_arr
void m0_xc_u64_init(void)
Definition: xcode.c:904
struct m0_xcode_type _type
Definition: ping_fop_xc.c:49
static struct _m0_fop_ping_s _m0_fop_ping
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
uint32_t f_count
Definition: ping_fop.h:35
M0_INTERNAL void m0_xc_m0_fop_ping_arr_struct_init(void)
Definition: ping_fop_xc.c:85
struct m0_xcode_type _type
Definition: ping_fop_xc.c:32
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_xcode_type * m0_fop_ping_rep_xc
Definition: ping_fop_xc.c:12
struct m0_xcode_type _type
Definition: ping_fop_xc.c:15
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