![]() |
yumapro
25.10-3
YumaPro SDK
|
Support YANG to CBOR SID File. More...

Functions | |
| status_t | sid_file_init (void) |
| Initialize the SID FIle Parser Module. More... | |
| void | sid_file_cleanup (void) |
| Cleanup the SID FIle Parser Module. More... | |
| val_value_t * | sid_file_load (ncx_module_t *mod, status_t *res) |
| |
| val_value_t * | sid_file_load_update (ncx_module_t *mod, const xmlChar *parmstr, boolean is_date, status_t *res) |
| |
| status_t | sid_file_apply (uint32 sid_tree_id, val_value_t *sidfile, ncx_module_t *mod, boolean internal, boolean update_mode) |
| Apply the SID file contents to specified YANG module. More... | |
| obj_template_t * | sid_file_get_obj (void) |
| Get the OBJ template for the SID file. More... | |
| status_t | sid_file_get_ranges (val_value_t *sidfile, dlq_hdr_t *sid_rangeQ, uint32 *total) |
| Get the assignment ranges from the SID file val_value_t. More... | |
| status_t | sid_file_add_range (ncx_sid_t range_start, uint32 range_size, dlq_hdr_t *sid_rangeQ) |
| Add a specified range struct to the end of the sid_rangeQ. More... | |
| status_t | sid_file_check_ranges (ncx_sid_t sid, dlq_hdr_t *sid_rangeQ, boolean set_highest, ncx_sid_range_t **ret_range) |
| Check if a SID value is in range. More... | |
| status_t | sid_file_verify_ranges (dlq_hdr_t *sid_rangeQ) |
| Verify that all the SID ranges are separate and do not overlap. More... | |
Support YANG to CBOR SID File.
Implement obj_template_t schema to val_value conversion of SID files.
| status_t sid_file_add_range | ( | ncx_sid_t | range_start, |
| uint32 | range_size, | ||
| dlq_hdr_t * | sid_rangeQ | ||
| ) |
Add a specified range struct to the end of the sid_rangeQ.
An ncx_sid_range_t struct will be created and added to the rangeQ
| range_start | SID number to start the range | |
| range_size | number of SID numbers in range | |
| [out] | sid_rangeQ | initialized Q for receiving the ncx_sid_range_t structs |

| status_t sid_file_apply | ( | uint32 | sid_tree_id, |
| val_value_t * | sidfile, | ||
| ncx_module_t * | mod, | ||
| boolean | internal, | ||
| boolean | update_mode | ||
| ) |
Apply the SID file contents to specified YANG module.
For augments, the expanded nodes in the augmented tree will be updated. The sid_dict registry will be updated for each schema item.
| sid_tree_id | YANG SID Tree ID to use (from sid_dict) | |
| sidfile | value tree representing a SID file to apply. value treated as const. | |
| [out] | mod | module to load SID file for
|
| internal |
| |
| update_mode |
|

| status_t sid_file_check_ranges | ( | ncx_sid_t | sid, |
| dlq_hdr_t * | sid_rangeQ, | ||
| boolean | set_highest, | ||
| ncx_sid_range_t ** | ret_range | ||
| ) |
Check if a SID value is in range.
A Queue of ncx_sid_range_t structs will be checked
| sid | SID number to check | |
| sid_rangeQ | Q of ncx_sid_range_t to check | |
| set_highest | TRUE to set sid_range_used if sid is highest in range | |
| [out] | ret_range | return pointer to found range
|
| void sid_file_cleanup | ( | void | ) |
Cleanup the SID FIle Parser Module.

| obj_template_t * sid_file_get_obj | ( | void | ) |
Get the OBJ template for the SID file.
| status_t sid_file_get_ranges | ( | val_value_t * | sidfile, |
| dlq_hdr_t * | sid_rangeQ, | ||
| uint32 * | total | ||
| ) |
Get the assignment ranges from the SID file val_value_t.
An ncx_sid_range_t struct will be created and added to the rangeQ
| sidfile | SID file as a val_value_t tree | |
| [out] | sid_rangeQ | initialized Q for receiving the ncx_sid_range_t structs |
| [out] | total | if non-NULL set to number of SIDs in all ranges found |

| status_t sid_file_init | ( | void | ) |
Initialize the SID FIle Parser Module.


| val_value_t * sid_file_load | ( | ncx_module_t * | mod, |
| status_t * | res | ||
| ) |
Just creates a val_value_t representing the JSON contents Does not apply the SIDs to the module
| mod | module to load SID file for | |
| [out] | res | address of return status
|
| val_value_t * sid_file_load_update | ( | ncx_module_t * | mod, |
| const xmlChar * | parmstr, | ||
| boolean | is_date, | ||
| status_t * | res | ||
| ) |
Just creates a val_value_t representing the JSON contents Does not apply the SIDs to the module
| mod | module to load SID file for | |
| parmstr | –sid-update-file parameter string | |
| is_date |
| |
| [out] | res | address of return status
|
| status_t sid_file_verify_ranges | ( | dlq_hdr_t * | sid_rangeQ | ) |
Verify that all the SID ranges are separate and do not overlap.
Generate log_error messages if problems found
| sid_rangeQ | Q of ncx_sid_range_t to check |