yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
yang_typ.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_typ
13#define _H_yang_typ
14
15/* FILE: yang_typ.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
27/*********************************************************************
28* *
29* C H A N G E H I S T O R Y *
30* *
31*********************************************************************
32
33date init comment
34----------------------------------------------------------------------
3515-nov-07 abb Begun; start from yang_parse.c
36
37*/
38
39#ifndef _H_dlq
40#include "dlq.h"
41#endif
42
43#ifndef _H_grp
44#include "grp.h"
45#endif
46
47#ifndef _H_ncxtypes
48#include "ncxtypes.h"
49#endif
50
51#ifndef _H_status
52#include "status.h"
53#endif
54
55#ifndef _H_tk
56#include "tk.h"
57#endif
58
59#ifndef _H_yang
60#include "yang.h"
61#endif
62
63#ifdef __cplusplus
64extern "C" {
65#endif
66
67
68/********************************************************************
69* *
70* T Y P E S *
71* *
72*********************************************************************/
73
74
75/********************************************************************
76* *
77* F U N C T I O N S *
78* *
79*********************************************************************/
80
107extern status_t
109 tk_chain_t *tkc,
110 ncx_module_t *mod,
111 typ_def_t *intypdef);
112
113
129extern status_t
131 tk_chain_t *tkc,
132 ncx_module_t *mod,
133 typ_def_t *intypdef);
134
135
153extern status_t
155 tk_chain_t *tkc,
156 ncx_module_t *mod,
157 dlq_hdr_t *que);
158
159
194extern status_t
196 tk_chain_t *tkc,
197 ncx_module_t *mod,
198 dlq_hdr_t *typeQ,
199 obj_template_t *parent);
200
201
216extern status_t
218 ncx_module_t *mod,
219 dlq_hdr_t *typeQ);
220
221
257extern status_t
259 tk_chain_t *tkc,
260 ncx_module_t *mod,
261 dlq_hdr_t *typeQ,
262 obj_template_t *parent,
263 grp_template_t *grp);
264
265
298extern status_t
300 tk_chain_t *tkc,
301 ncx_module_t *mod,
302 typ_def_t *typdef,
303 const xmlChar *defval,
304 obj_template_t *obj);
305
306
325extern status_t
327 ncx_module_t *mod,
328 typ_def_t *typdef,
329 const xmlChar *name,
330 const xmlChar *defval,
331 obj_template_t *obj);
332
333
345extern status_t
347 const ncx_num_t *num);
348
349
359extern boolean
361
362
372extern boolean
374
375
385extern status_t
387 tk_chain_t *tkc,
388 ncx_module_t *mod,
389 obj_template_t *testobj);
390
391
395#ifdef __cplusplus
396} /* end extern 'C' */
397#endif
398
399#endif /* _H_yang_typ */
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:210
status_t yang_typ_resolve_type_final(tk_chain_t *tkc, ncx_module_t *mod, typ_def_t *typdef, const xmlChar *name, const xmlChar *defval, obj_template_t *obj)
Resolve a type-stmt (final pass)
Definition: yang_typ.c:5567
status_t yang_typ_resolve_type(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, typ_def_t *typdef, const xmlChar *defval, obj_template_t *obj)
Resolve a type-stmt.
Definition: yang_typ.c:5528
status_t yang_typ_resolve_typedefs_grp(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *typeQ, obj_template_t *parent, grp_template_t *grp)
Resolve typedefs in a grouping (final pass)
Definition: yang_typ.c:5465
status_t yang_typ_resolve_typedefs_final(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *typeQ)
Resolve typedefs (final pass)
Definition: yang_typ.c:5401
status_t yang_typ_consume_type(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, typ_def_t *intypdef)
Consume a type-stmt.
Definition: yang_typ.c:4996
status_t yang_typ_rangenum_ok(typ_def_t *typdef, const ncx_num_t *num)
Check is a range number is OK.
Definition: yang_typ.c:5601
status_t yang_typ_resolve_leafref(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, obj_template_t *testobj)
Resolve the typdef in a leafref leaf or leaf-list.
Definition: yang_typ.c:5715
boolean yang_typ_identity_enabled(ncx_identity_t *id)
Check if an identity-stmt is enabled.
Definition: yang_typ.c:5677
boolean yang_typ_enubit_enabled(typ_enum_t *enubit)
Check if an enum or bit is enabled.
Definition: yang_typ.c:5641
status_t yang_typ_resolve_typedefs(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *typeQ, obj_template_t *parent)
Resovlve the typeQ of typedefs.
Definition: yang_typ.c:5351
status_t yang_typ_consume_metadata_type(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, typ_def_t *intypdef)
Consume a type-stmt for metadata.
Definition: yang_typ.c:5028
status_t yang_typ_consume_typedef(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *que)
Consume a typedef-stmt.
Definition: yang_typ.c:5062
YANG Grouping Statement Handler.
YANG module data structures Many internal representations of YANG module constructs.
Global error messages for status code enumerations.
One YANG 'grouping' definition – sibling set template.
Definition: grp.h:87
YANG identity entry.
Definition: ncxtypes.h:1104
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
Discriminated union for all data typedefs.
Definition: typ.h:458
one ENUM typdef value – stored in simple.valQ Used for NCX_BT_ENUM and NCX_BT_BITS data type
Definition: typ.h:262
YANG parser control block.
Definition: yang.h:204
NCX Syntax Token Handler.
union of all the basic number types if float not supported, then it is stored as an int64
Definition: ncxtypes.h:784
YANG Module parser utilities.