yumapro  20.10-12
YumaPro SDK
obj_dict.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2021, 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_obj_dict
12 #define _H_obj_dict
13 
14 // #define OBJ_DICT_TEST 1
15 
16 #ifdef WITH_YANG_HASH
17 #ifdef OBJ_DICT_TEST
18 
19 /* FILE: obj_dict.h
20 *********************************************************************
21 * *
22 * P U R P O S E *
23 * *
24 *********************************************************************/
25 
32 /*********************************************************************
33 * *
34 * C H A N G E H I S T O R Y *
35 * *
36 *********************************************************************
37 
38 date init comment
39 ----------------------------------------------------------------------
40 27-sep-15 abb Begun; start from ydump.c
41 
42 */
43 
44 /*** assumes procdefs.h has been included ***/
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /********************************************************************
51 * *
52 * T Y P E S *
53 * *
54 *********************************************************************/
55 
56 
57 /********************************************************************
58 * *
59 * F U N C T I O N S *
60 * *
61 *********************************************************************/
62 
63 /* Group defined in obj.h */
64 
65 
81 extern status_t
82  obj_dict_init (void);
83 
84 
90 extern void
91  obj_dict_cleanup (void);
92 
93 
102 extern status_t
103  obj_dict_add_object (obj_template_t *obj);
104 
105 
114 extern boolean
115  obj_dict_remove_object (obj_template_t *obj);
116 
117 
123 extern void
124  obj_dict_dump (void);
125 
126 
130 #endif // OBJ_DICT_TEST
131 #endif // WITH_YANG_HASH
132 
133 #ifdef __cplusplus
134 } /* end extern 'C' */
135 #endif
136 
137 #endif /* _H_obj_dict */
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
obj_get_mod
ncx_module_t * obj_get_mod(obj_template_t *obj)
Get the module pointer for this object.
Definition: obj.c:12218
xpath_pcb_t_::obj
obj_template_t * obj
these parms are used by leafref and XPath1 parsing obj is a bptr to start object
Definition: xpath.h:734
obj_dict_cleanup
void obj_dict_cleanup(void)
Cleanup the object dictionary.
Definition: obj_dict.c:188
ERR_NCX_DUP_ENTRY
@ ERR_NCX_DUP_ENTRY
224
Definition: status_enum.h:263
obj_dict_remove_object
boolean obj_dict_remove_object(obj_template_t *obj)
Remove an object from the object dictionary.
Definition: obj_dict.c:325
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
obj_dict_dump
void obj_dict_dump(void)
Print the sorted dictionary contents.
Definition: obj_dict.c:345
obj_gen_object_id_oid
status_t obj_gen_object_id_oid(ncx_module_t *mod, const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node Used for canonical ID string comparison to gener...
Definition: obj.c:10085
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
obj_dict_add_object
status_t obj_dict_add_object(obj_template_t *obj)
Generate an object identifier and insert into the AVL tree.
Definition: obj_dict.c:273
yang_hash
uint32 yang_hash(const xmlChar *key, uint32 len)
Generate a yang-hash for the specified key.
Definition: yang_hash.c:75
obj_dict_init
status_t obj_dict_init(void)
Initialize the object dictionary.
Definition: obj_dict.c:168
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
yang_hash.h
YANG Hash utilities.
log_error_append
void void log_error_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_ERROR log entry.
obj.h
Data Object Support.
obj_dict.h
Object Dictionary utilities (NOT USED) The YANG Hash for the object identifier is used as the hash ke...