CBOR output to a session control block or a file.
More...
|
void | cbor_wr_begin_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj, cbor_wr_parms_t *parms) |
| Write a start CBOR node to the specified session. More...
|
|
void | cbor_wr_begin_list (ses_cb_t *scb, xml_msg_hdr_t *msg) |
| Write a start CBOR list entry. More...
|
|
void | cbor_wr_end_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj) |
| Write an end container: indef (break) to the specified session. More...
|
|
void | cbor_wr_string_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *strval, obj_template_t *obj, cbor_wr_parms_t *parms) |
| Write a string CBOR node to the specified session. More...
|
|
void | cbor_wr_uint_elem (ses_cb_t *scb, xml_msg_hdr_t *msg, uint64 val, obj_template_t *obj, cbor_wr_parms_t *parms) |
| Write a UINT CBOR node to the specified session. More...
|
|
void | cbor_wr_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, cbor_wr_parms_t *parms) |
| Output val_value_t node contents only. More...
|
|
void | cbor_wr_child_obj (ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *parent_get2cb, obj_template_t *objnode, cbor_wr_parms_t *parms) |
| Write an entire <get2> val_value_t out from the obj_template_t callback. More...
|
|
void | cbor_wr_start_msg (ses_cb_t *scb) |
| Write the CBOR start message byte. More...
|
|
status_t | cbor_wr_file (const xmlChar *filespec, xml_msg_hdr_t *hdr, val_value_t *val, cbor_wr_parms_t *parms) |
| Write the specified value to a FILE in CBOR format. More...
|
|
status_t | cbor_wr_open_file (FILE *fp, xml_msg_hdr_t *hdr, val_value_t *val, cbor_wr_parms_t *parms) |
| Write the specified value to an open FILE in CBOR format. More...
|
|
CBOR output to a session control block or a file.
◆ cbor_wr_begin_elem()
Write a start CBOR node to the specified session.
- Parameters
-
scb | session control block |
msg | top header from message in progress |
obj | object template to use |
parms | CBOR write parms
- parent_sid forced parent SID to use (if non-zero)
- force_parent_sid forced parent SID to use (even if zero)
- To start a top container use parent_sid=0 and force_parent_prefix = true
|
◆ cbor_wr_begin_list()
Write a start CBOR list entry.
Call for each list entry from agt_tree_get2.c Write a start YANG list entry Call cbor_wr_end_list to finish list entry
- Parameters
-
scb | session control block |
msg | top header from message in progress |
◆ cbor_wr_child_obj()
Write an entire <get2> val_value_t out from the obj_template_t callback.
Using an optional testfn to filter output Start from parent_get2cb, not parent object node
- Parameters
-
scb | session control block |
msg | xml_msg_hdr_t in progress |
parent_get2cb | parent get2 control block of the object to write |
objnode | child object node to write |
parms | set of write parameters to use, may be NULL ot accept all defaults |
◆ cbor_wr_end_elem()
Write an end container: indef (break) to the specified session.
- Parameters
-
scb | session control block |
msg | top header from message in progress |
obj | object being ended (can be NULL if unknown) |
◆ cbor_wr_file()
Write the specified value to a FILE in CBOR format.
This is a main module API for high level code.
- Parameters
-
filespec | exact path of filename to open |
hdr | xml_msg_hdr_t for processing (NULL to use empty hdr) |
val | value for output |
parms | CBOR write parms |
- Returns
- status
◆ cbor_wr_open_file()
Write the specified value to an open FILE in CBOR format.
This is a main module API for high level code
- Parameters
-
fp | open FILE control block |
hdr | xml_msg_hdr_t for processing (NULL to use empty hdr) |
val | value for output |
parms | CBOR write parms |
- Returns
- status
◆ cbor_wr_start_msg()
void cbor_wr_start_msg |
( |
ses_cb_t * |
scb | ) |
|
Write the CBOR start message byte.
Writes a map(1) start. No finish_msg is required! The cbor_wr_ functions are expected to output one <identifier, value> map representing the top-level object
- Parameters
-
◆ cbor_wr_string_elem()
Write a string CBOR node to the specified session.
- Parameters
-
scb | session control block |
msg | top header from message in progress |
strval | == string value to write |
obj | object template to use |
parms | CBOR write parms
- parent_sid forced parent SID to use (if non-zero)
- force_parent_sid forced parent SID to use (even if zero)
- It is expected that a parent-level map entry is in progress.
- A map entry using the object SID or name is writter
|
◆ cbor_wr_uint_elem()
Write a UINT CBOR node to the specified session.
- Parameters
-
scb | session control block |
msg | top header from message in progress |
val | == UINT value to write |
obj | object template to use |
parms | CBOR write parms
- parent_sid forced parent SID to use (if non-zero)
- force_parent_sid forced parent SID to use (even if zero)
- It is expected that a parent-level map entry is in progress.
- A map entry using the object SID or name is writter
|
◆ cbor_wr_val()
Output val_value_t node contents only.
Write an NCX value node in CBOR encoding See cbor_wr_check_write for full details of this fn. It is the same, except a NULL testfn is supplied.
- Parameters
-
scb | session control block |
msg | xml_msg_hdr_t in progress |
val | value to write |
parms | the set of write parameters to use |