Motr  M0
controller.c File Reference
#include "lib/trace.h"
#include "conf/objs/common.h"
#include "conf/onwire_xc.h"
#include "motr/magic.h"
Include dependency graph for controller.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF
 
#define XCAST(xobj)   ((struct m0_confx_controller *)(&(xobj)->xo_u))
 

Functions

 M0_BASSERT (offsetof(struct m0_confx_controller, xc_header)==0)
 
static bool controller_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_controller, M0_CONF_CONTROLLER_MAGIC, controller_check)
 
 M0_CONF__INVARIANT_DEFINE (controller_invariant, m0_conf_controller)
 
static int controller_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int controller_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool controller_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int controller_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** controller_downlinks (const struct m0_conf_obj *obj)
 
static void controller_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (controller_create, m0_conf_controller, &controller_ops)
 

Variables

static const struct m0_conf_obj_ops controller_ops
 
const struct m0_conf_obj_type M0_CONF_CONTROLLER_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file controller.c.

◆ XCAST

#define XCAST (   xobj)    ((struct m0_confx_controller *)(&(xobj)->xo_u))

Definition at line 29 of file controller.c.

Function Documentation

◆ controller_check()

static bool controller_check ( const void *  bob)
static

Definition at line 32 of file controller.c.

Here is the call graph for this function:

◆ controller_decode()

static int controller_decode ( struct m0_conf_obj dest,
const struct m0_confx_obj src 
)
static

Definition at line 47 of file controller.c.

Here is the call graph for this function:

◆ controller_delete()

static void controller_delete ( struct m0_conf_obj obj)
static

Definition at line 110 of file controller.c.

Here is the call graph for this function:

◆ controller_downlinks()

static const struct m0_fid** controller_downlinks ( const struct m0_conf_obj obj)
static

Definition at line 102 of file controller.c.

Here is the call graph for this function:

◆ controller_encode()

static int controller_encode ( struct m0_confx_obj dest,
const struct m0_conf_obj src 
)
static

Definition at line 64 of file controller.c.

Here is the call graph for this function:

◆ controller_lookup()

static int controller_lookup ( const struct m0_conf_obj parent,
const struct m0_fid name,
struct m0_conf_obj **  out 
)
static

Definition at line 89 of file controller.c.

Here is the call graph for this function:

◆ controller_match()

static bool controller_match ( const struct m0_conf_obj cached,
const struct m0_confx_obj flat 
)
static

Definition at line 79 of file controller.c.

Here is the call graph for this function:

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_controller, xc_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_controller  ,
M0_CONF_CONTROLLER_MAGIC  ,
controller_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( controller_create  ,
m0_conf_controller  ,
controller_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( controller_invariant  ,
m0_conf_controller   
)

Variable Documentation

◆ controller_ops

const struct m0_conf_obj_ops controller_ops
static
Initial value:
= {
.coo_invariant = controller_invariant,
.coo_decode = controller_decode,
.coo_encode = controller_encode,
.coo_match = controller_match,
.coo_lookup = controller_lookup,
.coo_readdir = NULL,
.coo_downlinks = controller_downlinks,
.coo_delete = controller_delete
}
#define NULL
Definition: misc.h:38
static bool controller_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: controller.c:79
static void controller_delete(struct m0_conf_obj *obj)
Definition: controller.c:110
static const struct m0_fid ** controller_downlinks(const struct m0_conf_obj *obj)
Definition: controller.c:102
static int controller_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: controller.c:89
static int controller_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: controller.c:64
static int controller_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: controller.c:47

Definition at line 118 of file controller.c.

◆ M0_CONF_CONTROLLER_TYPE

const struct m0_conf_obj_type M0_CONF_CONTROLLER_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__CONTROLLER_FT_ID,
.ft_name = "conf_controller"
},
.cot_create = &controller_create,
.cot_xt = &m0_confx_controller_xc,
.cot_branch = "u_controller",
.cot_xc_init = &m0_xc_m0_confx_controller_struct_init,
}

Definition at line 131 of file controller.c.