yumapro  23.10T-6
YumaPro SDK
Loading...
Searching...
No Matches
yang_sid.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022, YumaWorks, Inc., All Rights Reserved.
3 *
4 * Unless required by applicable law or agreed to in writing,
5 * software distributed under the License is distributed on an
6 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
7 * KIND, either express or implied. See the License for the
8 * specific language governing permissions and limitations
9 * under the License.
10 */
11#ifndef _H_yang_sid
12#define _H_yang_sid
13
14#ifdef WITH_YANG_CBOR
15
16/* FILE: yang_sid.h
17*********************************************************************
18* *
19* P U R P O S E *
20* *
21*********************************************************************/
22
29/*********************************************************************
30* *
31* C H A N G E H I S T O R Y *
32* *
33*********************************************************************
34
35date init comment
36----------------------------------------------------------------------
3701-may-22 abb Begun; moved from ncx.c
38
39*/
40
41#include "status_enum.h"
42
43/*** assumes procdefs.h has been included ***/
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/********************************************************************
50* *
51* T Y P E S *
52* *
53*********************************************************************/
54
55
56/********************************************************************
57* *
58* F U N C T I O N S *
59* *
60*********************************************************************/
61
62/* Group definied in yang.h */
63
64
78typedef enum yang_sid_status_t_ {
81
84
87
90
92
93
102
103
104
113extern status_t
115 ncx_yang_sid_mode_t yang_sid_mode);
116
117
118
142extern status_t
144 boolean strict_mode,
145 yang_sid_test_fn_t test_fn);
146
147
152extern void yang_sid_init (void);
153
154
159extern void yang_sid_cleanup (void);
160
161
171extern uint8
172 yang_sid_num_bits (void);
173
174
175/*
176* @brief string for the ncx_sid_ns_t enumeration
177*
178* @param sidns SID namespace enumeration to convert to string
179* @return string value for the enum or NULL if none
180*/
181extern const xmlChar *
182 yang_sid_ns_str (ncx_sid_ns_t sidns);
183
184
191extern const xmlChar *
193
194
197#endif // WITH_YANG_CBOR
198
199#ifdef __cplusplus
200} /* end extern 'C' */
201#endif
202
203#endif /* _H_yang_sid */
status_t
global error return code
Definition: status_enum.h:210
status_t yang_sid_set_all_modules(ncx_yang_sid_mode_t yang_sid_mode, boolean strict_mode, yang_sid_test_fn_t test_fn)
Attempt to assign the YANG SIDs for all the loaded modules.
Definition: yang_sid.c:194
const xmlChar * yang_sid_mode_str(ncx_yang_sid_mode_t sidmode)
string for the yang_sid_mode enumeration
Definition: yang_sid.c:350
void yang_sid_cleanup(void)
Cleanup the YANG SID module.
Definition: yang_sid.c:278
yang_sid_status_t
enum for the keep-module status returned by the test function Only used for LSID assignment at this t...
Definition: yang_sid.h:78
uint8 yang_sid_num_bits(void)
Number of bits in the SID implementation.
Definition: yang_sid.c:295
yang_sid_status_t(* yang_sid_test_fn_t)(ncx_module_t *mod)
function callback to test if module is external, internal, or should be skipped for SID assignment
Definition: yang_sid.h:101
void yang_sid_init(void)
Initialize the YANG SID module.
Definition: yang_sid.c:273
status_t yang_sid_set_module(ncx_module_t *mod, ncx_yang_sid_mode_t yang_sid_mode)
Attempt to assign SIDs for the module.
Definition: yang_sid.c:86
@ YANG_SID_STAT_INTERNAL
keep module as internally visible
Definition: yang_sid.h:86
@ YANG_SID_STAT_NONE
not set
Definition: yang_sid.h:80
@ YANG_SID_STAT_SKIP
do not assign SIDs to this module
Definition: yang_sid.h:89
@ YANG_SID_STAT_EXTERNAL
keep module as externally visible
Definition: yang_sid.h:83
ncx_yang_sid_mode_t
YANG SID Allocation mode from yang-sid-mode typedef.
Definition: ncxtypes.h:1763
ncx_sid_ns_t
enumeration for YANG SID namespace identifiers
Definition: ncxtypes.h:1753
global error status code enumerations
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1125