yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
yang_feature.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_yang_feature
13#define _H_yang_feature
14
15/* FILE: yang_feature.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
28/*********************************************************************
29* *
30* C H A N G E H I S T O R Y *
31* *
32*********************************************************************
33
34date init comment
35----------------------------------------------------------------------
3620-nov-15 abb Begun; start from yang_obj.c
37
38*/
39
40#ifndef _H_dlq
41#include "dlq.h"
42#endif
43
44#ifndef _H_grp
45#include "grp.h"
46#endif
47
48#ifndef _H_ncxtypes
49#include "ncxtypes.h"
50#endif
51
52#ifndef _H_obj
53#include "obj.h"
54#endif
55
56#ifndef _H_status
57#include "status.h"
58#endif
59
60#ifndef _H_tk
61#include "tk.h"
62#endif
63
64#ifndef _H_yang
65#include "yang.h"
66#endif
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
72/********************************************************************
73* *
74* T Y P E S *
75* *
76*********************************************************************/
77
78
79/********************************************************************
80* *
81* F U N C T I O N S *
82* *
83*********************************************************************/
84
85/* Group definied in ncx_feature.h */
86
87
118extern status_t
120 ncx_module_t *mod,
121 dlq_hdr_t *iffeatureQ,
122 dlq_hdr_t *appinfoQ);
123
124
125
141extern status_t
143 ncx_module_t *mod);
144
145
159extern status_t
161 tk_chain_t *tkc,
162 ncx_module_t *mod,
163 ncx_feature_t *feature);
164
165
183extern status_t
185 ncx_module_t *mod,
186 ncx_feature_t *feature,
187 ncx_feature_t *startfeature);
188
189
202extern status_t
204 tk_chain_t *tkc,
205 ncx_module_t *mod,
206 obj_template_t *obj);
207
208
223extern status_t
225 tk_chain_t *tkc,
226 ncx_module_t *mod,
227 dlq_hdr_t *iffeatureQ);
228
229
245extern status_t
247 ncx_module_t *mod,
248 obj_template_t *ancestor,
249 obj_template_t *testobj,
250 ncx_iffeature_t *iff,
251 boolean iserror);
252
253
262extern boolean
264 ncx_iffeature_t *iff);
265
266
275extern boolean
277 dlq_hdr_t *iffQ);
278
279
283#ifdef __cplusplus
284} /* end extern 'C' */
285#endif
286
287
288#endif /* _H_yang_feature */
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:210
boolean yang_feature_eval_iffeature(ncx_module_t *mod, ncx_iffeature_t *iff)
Evaluate the if-feature expression.
Definition: yang_feature.c:1666
status_t yang_feature_check_iffeature_mismatch(tk_chain_t *tkc, ncx_module_t *mod, obj_template_t *ancestor, obj_template_t *testobj, ncx_iffeature_t *iff, boolean iserror)
Check the child object against the ancestor node for 1 if-feature.
Definition: yang_feature.c:1600
status_t yang_feature_check_feature_loop(tk_chain_t *tkc, ncx_module_t *mod, ncx_feature_t *feature, ncx_feature_t *startfeature)
Check for a feature loop.
Definition: yang_feature.c:1432
status_t yang_feature_resolve_iffeatureQ(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, obj_template_t *obj)
Check the Q of if-feature statements for the specified object.
Definition: yang_feature.c:1500
status_t yang_feature_consume_iffeature(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *iffeatureQ, dlq_hdr_t *appinfoQ)
Consume an if-feature-stmt.
Definition: yang_feature.c:1334
status_t yang_feature_consume_feature(tk_chain_t *tkc, ncx_module_t *mod)
Parse the next N tokens as a feature statement.
Definition: yang_feature.c:1137
status_t yang_feature_resolve_iffeatureQ2(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *iffeatureQ)
Check the Q of if-feature statements for the specified object.
Definition: yang_feature.c:1539
boolean yang_feature_eval_iffeatureQ(ncx_module_t *mod, dlq_hdr_t *iffQ)
Evaluate a Q ofif-feature expressions.
Definition: yang_feature.c:1717
status_t yang_feature_resolve_feature(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, ncx_feature_t *feature)
Validate all the if-feature clauses present in the specified feature.
Definition: yang_feature.c:1382
YANG Grouping Statement Handler.
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
Global error messages for status code enumerations.
YANG feature entry.
Definition: ncxtypes.h:1021
YANG if-feature entry.
Definition: ncxtypes.h:953
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1138
One YANG data-def-stmt.
Definition: obj.h:1229
token parsing chain (main parser control block)
Definition: tk.h:415
YANG parser control block.
Definition: yang.h:204
NCX Syntax Token Handler.
YANG Module parser utilities.