Motr  M0
at_ut_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from rpc/ut/at/at_ut.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "rpc/ut/at/at_ut.h"
8 #include "rpc/ut/at/at_ut_xc.h"
9 
12 
13 static struct _atut__req_s {
16 } _atut__req = {
17  ._type = {
19  .xct_name = "atut__req",
20  .xct_sizeof = sizeof (struct atut__req),
21  .xct_nr = 2,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
27 M0_BASSERT(offsetof(struct _atut__req_s, _child[0]) ==
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
30 static struct _atut__rep_s {
33 } _atut__rep = {
34  ._type = {
36  .xct_name = "atut__rep",
37  .xct_sizeof = sizeof (struct atut__rep),
38  .xct_nr = 2,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
44 M0_BASSERT(offsetof(struct _atut__rep_s, _child[0]) ==
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct atut__req) == 64U);
49 
50 M0_BASSERT(sizeof ((struct atut__req *)0)->arq_test_id == 4U);
52 M0_BASSERT(sizeof ((struct atut__req *)0)->arq_buf == 56U);
53 M0_BASSERT(offsetof(struct atut__req, arq_buf) == 8U);
54 
55 M0_BASSERT(sizeof(struct atut__rep) == 64U);
56 
57 M0_BASSERT(sizeof ((struct atut__rep *)0)->arp_rc == 4U);
58 M0_BASSERT(offsetof(struct atut__rep, arp_rc) == 0U);
59 M0_BASSERT(sizeof ((struct atut__rep *)0)->arp_buf == 56U);
60 M0_BASSERT(offsetof(struct atut__rep, arp_buf) == 8U);
61 
62 
63 
64 M0_INTERNAL void m0_xc_atut__req_struct_init(void)
65 {
66  _atut__req._child[0] = (struct m0_xcode_field) {
67  .xf_name = "arq_test_id",
68 
69  .xf_type = &M0_XT_U32,
70 
71  .xf_tag = 0,
72  .xf_opaque = NULL,
73  .xf_offset = offsetof(struct atut__req, arq_test_id),
74  .xf_read = NULL,
75  .xf_decor = {
77  }
78  };
80 
81  _atut__req._child[1] = (struct m0_xcode_field) {
82  .xf_name = "arq_buf",
83 
84  .xf_type = m0_rpc_at_buf_xc,
85 
86  .xf_tag = 0,
87  .xf_opaque = NULL,
88  .xf_offset = offsetof(struct atut__req, arq_buf),
89  .xf_read = NULL,
90  .xf_decor = {
92  }
93  };
95 
97 }
98 
99 M0_INTERNAL void m0_xc_atut__rep_struct_init(void)
100 {
101  _atut__rep._child[0] = (struct m0_xcode_field) {
102  .xf_name = "arp_rc",
103 
104  .xf_type = &M0_XT_U32,
105 
106  .xf_tag = 0,
107  .xf_opaque = NULL,
108  .xf_offset = offsetof(struct atut__rep, arp_rc),
109  .xf_read = NULL,
110  .xf_decor = {
112  }
113  };
114  m0_xc_u32_init();
115 
116  _atut__rep._child[1] = (struct m0_xcode_field) {
117  .xf_name = "arp_buf",
118 
119  .xf_type = m0_rpc_at_buf_xc,
120 
121  .xf_tag = 0,
122  .xf_opaque = NULL,
123  .xf_offset = offsetof(struct atut__rep, arp_buf),
124  .xf_read = NULL,
125  .xf_decor = {
127  }
128  };
130 
132 }
133 
134 M0_INTERNAL void m0_xc_rpc_ut_at_at_ut_init(void)
135 {
138 }
139 
140 M0_INTERNAL void m0_xc_rpc_ut_at_at_ut_fini(void)
141 {
142 }
#define NULL
Definition: misc.h:38
M0_BASSERT(offsetof(struct _atut__req_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_rpc_at_buf arq_buf
Definition: at_ut.h:58
M0_INTERNAL void m0_xc_atut__req_struct_init(void)
Definition: at_ut_xc.c:64
static struct _atut__req_s _atut__req
struct m0_xcode_field _child[2]
Definition: at_ut_xc.c:15
uint32_t arp_rc
Definition: at_ut.h:57
struct m0_xcode_type * atut__rep_xc
Definition: at_ut_xc.c:11
struct m0_xcode_type _type
Definition: at_ut_xc.c:31
M0_INTERNAL void m0_xc_rpc_ut_at_at_ut_fini(void)
Definition: at_ut_xc.c:140
struct m0_rpc_at_buf arp_buf
Definition: at_ut.h:58
uint32_t arq_test_id
Definition: at_ut.h:57
#define M0_POST(cond)
static struct _atut__rep_s _atut__rep
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_atut__rep_struct_init(void)
Definition: at_ut_xc.c:99
struct m0_xcode_type _type
Definition: at_ut_xc.c:14
M0_INTERNAL void m0_xc_rpc_ut_at_at_ut_init(void)
Definition: at_ut_xc.c:134
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_xcode_type * atut__req_xc
Definition: at_ut_xc.c:10
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_rpc_at_buf_struct_init(void)
Definition: at_xc.c:184
struct m0_xcode_type * m0_rpc_at_buf_xc
Definition: at_xc.c:12
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_xcode_field _child[2]
Definition: at_ut_xc.c:32