Motr  M0
flt_eval.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2017-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_FDMI_FDMI_FLT_EVAL_H__
26 #define __MOTR_FDMI_FDMI_FLT_EVAL_H__
27 
28 #include "fdmi/filter.h"
38 struct m0_conf_fdmi_filter;
39 
44  int ffp_count;
46 };
47 
51 typedef int (*m0_fdmi_flt_op_cb_t)(struct m0_fdmi_flt_operands *opnds,
52  struct m0_fdmi_flt_operand *res);
53 
63 };
64 
69  void *user_data;
71  struct m0_fdmi_flt_var_node *value_desc,
72  struct m0_fdmi_flt_operand *value);
73 };
74 
80 M0_INTERNAL void m0_fdmi_eval_init(struct m0_fdmi_eval_ctx *ctx);
81 
94 M0_INTERNAL int m0_fdmi_eval_add_op_cb(struct m0_fdmi_eval_ctx *ctx,
97 
106 M0_INTERNAL void m0_fdmi_eval_del_op_cb(struct m0_fdmi_eval_ctx *ctx,
107  enum m0_fdmi_flt_op_code op);
108 
121 M0_INTERNAL int m0_fdmi_eval_flt(struct m0_fdmi_eval_ctx *ctx,
122  struct m0_conf_fdmi_filter *filter,
123  struct m0_fdmi_eval_var_info *var_info);
124 
130 M0_INTERNAL void m0_fdmi_eval_fini(struct m0_fdmi_eval_ctx *ctx);
131 
134 #endif /* __MOTR_FDMI_FDMI_FLT_EVAL_H__ */
135 
136 /*
137  * Local variables:
138  * c-indentation-style: "K&R"
139  * c-basic-offset: 8
140  * tab-width: 8
141  * fill-column: 80
142  * scroll-step: 1
143  * End:
144  */
145 /*
146  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
147  */
M0_INTERNAL int m0_fdmi_eval_add_op_cb(struct m0_fdmi_eval_ctx *ctx, enum m0_fdmi_flt_op_code op, m0_fdmi_flt_op_cb_t cb)
Definition: flt_eval.c:101
m0_fdmi_flt_op_code
Definition: filter.h:96
int const char const void * value
Definition: dir.c:325
M0_INTERNAL void m0_fdmi_eval_del_op_cb(struct m0_fdmi_eval_ctx *ctx, enum m0_fdmi_flt_op_code op)
Definition: flt_eval.c:119
op
Definition: libdemo.c:64
M0_INTERNAL void m0_fdmi_eval_init(struct m0_fdmi_eval_ctx *ctx)
Definition: flt_eval.c:130
Definition: filter.py:1
int(* get_value_cb)(void *user_data, struct m0_fdmi_flt_var_node *value_desc, struct m0_fdmi_flt_operand *value)
Definition: flt_eval.h:70
M0_INTERNAL int m0_fdmi_eval_flt(struct m0_fdmi_eval_ctx *ctx, struct m0_conf_fdmi_filter *filter, struct m0_fdmi_eval_var_info *var_info)
Definition: flt_eval.c:184
int(* m0_fdmi_flt_op_cb_t)(struct m0_fdmi_flt_operands *opnds, struct m0_fdmi_flt_operand *res)
Definition: flt_eval.h:51
struct m0_fdmi_flt_operand ffp_operands[FDMI_FLT_MAX_OPNDS_NR]
Definition: flt_eval.h:45
Definition: nucleus.c:42
M0_INTERNAL void m0_fdmi_eval_fini(struct m0_fdmi_eval_ctx *ctx)
Definition: flt_eval.c:204
m0_fdmi_flt_op_cb_t opers[M0_FFO_TOTAL_OPS_CNT]
Definition: flt_eval.h:62