yumapro  23.10T-6
YumaPro SDK
Loading...
Searching...
No Matches
yangconst.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012, 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_yangconst
13#define _H_yangconst
14
15/* FILE: yangconst.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----------------------------------------------------------------------
3527-oct-07 abb Begun; started from ncxconst.h
36*/
37
38#include <math.h>
39#include <xmlstring.h>
40
41#include "xmlns.h"
42#include "status.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/********************************************************************
49* *
50* C O N S T A N T S *
51* *
52*********************************************************************/
53
64#define YANG_URN (const xmlChar *)"urn:ietf:params:xml:ns:yang:1"
65
67#define YANG_PREFIX (const xmlChar *)"y"
68
70#define YANG_MODULE (const xmlChar *)"yang-attributes"
71
73#define YANG_SUFFIX (const xmlChar *)"yang"
74
76#define SID_SUFFIX (const xmlChar *)"sid"
77
79#define YIN_URN (const xmlChar *)"urn:ietf:params:xml:ns:yang:yin:1"
80
82#define YIN_PREFIX (const xmlChar *)"yin"
83
85#define YIN_MODULE (const xmlChar *)"yin"
86
88#define YIN_SUFFIX (const xmlChar *)"yin"
89
91#define YANG_VERSION_STR (const xmlChar *)"1"
92
94#define YANG_VERSION_NUM 1
95
97#define YANG11_VERSION_STR (const xmlChar *)"1.1"
98
100#define YANG11_VERSION_NUM 11
101
103#define YANG_FILE_SEPCHAR '@'
104
106#define YANG_SII_STRING \
107 (const xmlChar *)"schema-instance-identifier"
108
111#define YANG_K_ACTION (const xmlChar *)"action"
112#define YANG_K_ADD (const xmlChar *)"add"
113#define YANG_K_AFTER (const xmlChar *)"after"
114#define YANG_K_ARGUMENT (const xmlChar *)"argument"
115#define YANG_K_AUGMENT (const xmlChar *)"augment"
116#define YANG_K_ANYDATA (const xmlChar *)"anydata"
117#define YANG_K_ANYXML (const xmlChar *)"anyxml"
118#define YANG_K_BASE (const xmlChar *)"base"
119#define YANG_K_BEFORE (const xmlChar *)"before"
120#define YANG_K_BELONGS_TO (const xmlChar *)"belongs-to"
121#define YANG_K_BIT (const xmlChar *)"bit"
122#define YANG_K_CASE (const xmlChar *)"case"
123#define YANG_K_CHOICE (const xmlChar *)"choice"
124#define YANG_K_CONDITION (const xmlChar *)"condition"
125#define YANG_K_CONFIG (const xmlChar *)"config"
126#define YANG_K_CONTACT (const xmlChar *)"contact"
127#define YANG_K_CONTAINER (const xmlChar *)"container"
128#define YANG_K_DATE (const xmlChar *)"date"
129#define YANG_K_DEFAULT (const xmlChar *)"default"
130#define YANG_K_DELETE (const xmlChar *)"delete"
131#define YANG_K_DESCRIPTION (const xmlChar *)"description"
132#define YANG_K_DEVIATE (const xmlChar *)"deviate"
133#define YANG_K_DEVIATION (const xmlChar *)"deviation"
134#define YANG_K_DEVIATIONS (const xmlChar *)"deviations"
135#define YANG_K_ENUM (const xmlChar *)"enum"
136#define YANG_K_ERROR_APP_TAG (const xmlChar *)"error-app-tag"
137#define YANG_K_ERROR_MESSAGE (const xmlChar *)"error-message"
138#define YANG_K_EXTENSION (const xmlChar *)"extension"
139#define YANG_K_FEATURE (const xmlChar *)"feature"
140#define YANG_K_FEATURES (const xmlChar *)"features"
141#define YANG_K_FIRST (const xmlChar *)"first"
142#define YANG_K_FRACTION_DIGITS (const xmlChar *)"fraction-digits"
143#define YANG_K_GROUPING (const xmlChar *)"grouping"
144#define YANG_K_IDENTITY (const xmlChar *)"identity"
145#define YANG_K_IDENTITYREF (const xmlChar *)"identityref"
146#define YANG_K_IF_FEATURE (const xmlChar *)"if-feature"
147#define YANG_K_IMPORT (const xmlChar *)"import"
148#define YANG_K_INCLUDE (const xmlChar *)"include"
149#define YANG_K_INFO (const xmlChar *)"info"
150#define YANG_K_INPUT (const xmlChar *)"input"
151#define YANG_K_INSERT (const xmlChar *)"insert"
152#define YANG_K_INVERT_MATCH (const xmlChar *)"invert-match"
153#define YANG_K_KEY (const xmlChar *)"key"
154#define YANG_K_LAST (const xmlChar *)"last"
155#define YANG_K_LEAF (const xmlChar *)"leaf"
156#define YANG_K_LEAF_LIST (const xmlChar *)"leaf-list"
157#define YANG_K_LENGTH (const xmlChar *)"length"
158#define YANG_K_LIST (const xmlChar *)"list"
159#define YANG_K_MANDATORY (const xmlChar *)"mandatory"
160#define YANG_K_MAX (const xmlChar *)"max"
161#define YANG_K_MAX_ELEMENTS (const xmlChar *)"max-elements"
162#define YANG_K_MIN (const xmlChar *)"min"
163#define YANG_K_MIN_ELEMENTS (const xmlChar *)"min-elements"
164#define YANG_K_MODIFIER (const xmlChar *)"modifier"
165#define YANG_K_MODULE (const xmlChar *)"module"
166#define YANG_K_MUST (const xmlChar *)"must"
167#define YANG_K_NAME (const xmlChar *)"name"
168#define YANG_K_NAMESPACE (const xmlChar *)"namespace"
169#define YANG_K_NAN (const xmlChar *)"NaN"
170#define YANG_K_NEGINF (const xmlChar *)"-INF"
171#define YANG_K_NOTIFICATION (const xmlChar *)"notification"
172#define YANG_K_NOT_SUPPORTED (const xmlChar *)"not-supported"
173#define YANG_K_ORDERED_BY (const xmlChar *)"ordered-by"
174#define YANG_K_ORGANIZATION (const xmlChar *)"organization"
175#define YANG_K_OUTPUT (const xmlChar *)"output"
176#define YANG_K_PATH (const xmlChar *)"path"
177#define YANG_K_PATTERN (const xmlChar *)"pattern"
178#define YANG_K_POSITION (const xmlChar *)"position"
179#define YANG_K_POSINF (const xmlChar *)"INF"
180#define YANG_K_PREFIX (const xmlChar *)"prefix"
181#define YANG_K_PRESENCE (const xmlChar *)"presence"
182#define YANG_K_RANGE (const xmlChar *)"range"
183#define YANG_K_REFERENCE (const xmlChar *)"reference"
184#define YANG_K_REFINE (const xmlChar *)"refine"
185#define YANG_K_REPLACE (const xmlChar *)"replace"
186#define YANG_K_REQUIRE_INSTANCE (const xmlChar *)"require-instance"
187#define YANG_K_REVISION (const xmlChar *)"revision"
188#define YANG_K_REVISION_DATE (const xmlChar *)"revision-date"
189#define YANG_K_RPC (const xmlChar *)"rpc"
190#define YANG_K_STATUS (const xmlChar *)"status"
191#define YANG_K_SUBMODULE (const xmlChar *)"submodule"
192#define YANG_K_SYSTEM (const xmlChar *)"system"
193#define YANG_K_TAG (const xmlChar *)"tag"
194#define YANG_K_TEXT (const xmlChar *)"text"
195#define YANG_K_TARGET_NODE (const xmlChar *)"target-node"
196#define YANG_K_TYPE (const xmlChar *)"type"
197#define YANG_K_TYPEDEF (const xmlChar *)"typedef"
198#define YANG_K_UNBOUNDED (const xmlChar *)"unbounded"
199#define YANG_K_UNION (const xmlChar *)"union"
200#define YANG_K_UNIQUE (const xmlChar *)"unique"
201#define YANG_K_UNITS (const xmlChar *)"units"
202#define YANG_K_URI (const xmlChar *)"uri"
203#define YANG_K_USER (const xmlChar *)"user"
204#define YANG_K_USES (const xmlChar *)"uses"
205#define YANG_K_VALUE (const xmlChar *)"value"
206#define YANG_K_WHEN (const xmlChar *)"when"
207#define YANG_K_YANG_VERSION (const xmlChar *)"yang-version"
208#define YANG_K_YIN_ELEMENT (const xmlChar *)"yin-element"
209
216static inline boolean terminate_parse( status_t res )
217{
218 return ( res != NO_ERR && ( res < ERR_LAST_SYS_ERR || res==ERR_NCX_EOF ));
219}
220
224#define CHK_EXIT(res, retres) \
225 if ((res) != NO_ERR) { \
226 if (terminate_parse(res)) { \
227 return res; \
228 } else { \
229 retres = res; \
230 } \
231 }
232
237#define NEED_EXIT(res) \
238 (((res) == NO_ERR) ? FALSE : \
239 ((res) < ERR_LAST_SYS_ERR || (res)==ERR_NCX_EOF \
240 || (res)==ERR_NCX_MISSING_PARM) ? TRUE : FALSE)
241
242
245#ifdef __cplusplus
246} /* end extern 'C' */
247#endif
248
249#endif /* _H_yangconst */
status_t
global error return code
Definition: status_enum.h:210
@ ERR_NCX_EOF
244
Definition: status_enum.h:306
@ ERR_LAST_SYS_ERR
124 – not really used
Definition: status_enum.h:259
@ NO_ERR
000
Definition: status_enum.h:211
Global error messages for status code enumerations.
XML namespace support.