Motr  M0
protocol_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from lib/protocol.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "lib/protocol.h"
8 #include "lib/protocol_xc.h"
9 
11 
12 static struct _m0_protocol_id_s {
15 } _m0_protocol_id = {
16  ._type = {
18  .xct_name = "m0_protocol_id",
19  .xct_sizeof = sizeof (struct m0_protocol_id),
20  .xct_nr = 1,
21  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
22  }
23 };
24 
26 M0_BASSERT(offsetof(struct _m0_protocol_id_s, _child[0]) ==
27  offsetof(struct m0_xcode_type, xct_child[0]));
28 
29 
30 M0_BASSERT(sizeof(struct m0_protocol_id) == 64U);
31 
32 M0_BASSERT(sizeof ((struct m0_protocol_id *)0)->p_id == 64U);
33 M0_BASSERT(offsetof(struct m0_protocol_id, p_id) == 0U);
34 
35 
36 
37 M0_INTERNAL void m0_xc_m0_protocol_id_struct_init(void)
38 {
39  _m0_protocol_id._child[0] = (struct m0_xcode_field) {
40  .xf_name = "p_id",
41 
42  .xf_type = &M0_XT_U8,
43 
44  .xf_tag = 64,
45  .xf_opaque = NULL,
46  .xf_offset = offsetof(struct m0_protocol_id, p_id),
47  .xf_read = NULL,
48  .xf_decor = {
50  }
51  };
52  m0_xc_u8_init();
53 
55 }
56 
57 M0_INTERNAL void m0_xc_lib_protocol_init(void)
58 {
60 }
61 
62 M0_INTERNAL void m0_xc_lib_protocol_fini(void)
63 {
64 }
#define NULL
Definition: misc.h:38
M0_BASSERT(offsetof(struct _m0_protocol_id_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_xcode_type * m0_protocol_id_xc
Definition: protocol_xc.c:10
static struct _m0_protocol_id_s _m0_protocol_id
M0_INTERNAL void m0_xc_m0_protocol_id_struct_init(void)
Definition: protocol_xc.c:37
uint8_t p_id[64]
Definition: protocol.h:187
struct m0_xcode_type _type
Definition: protocol_xc.c:13
struct m0_xcode_field _child[1]
Definition: protocol_xc.c:14
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_lib_protocol_fini(void)
Definition: protocol_xc.c:62
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
const struct m0_xcode_type M0_XT_U8
Definition: xcode.c:924
void m0_xc_u8_init(void)
Definition: xcode.c:892
M0_INTERNAL void m0_xc_lib_protocol_init(void)
Definition: protocol_xc.c:57
const char * xf_name
Definition: xcode.h:251
#define offsetof(typ, memb)
Definition: misc.h:29