yumapro
24.10-2
YumaPro SDK
|
GET2 control block. More...
#include <getcb.h>
Data Fields | |
dlq_hdr_t | qhdr |
queue header | |
xmlChar * | txid_str |
transaction ID string | |
obj_template_t * | obj |
object template containing this callback | |
val_nodetest_fn_t | testfn |
value node test function (may be obsolete for get2) | |
dlq_hdr_t | keyQ |
Q of malloced val_value_t; 1 entry for each key leaf includes the ancestor keys and keys for the current list (if applicable) If the set of keys for the current list is incomplete, then the provided keys are 'fixed'. | |
dlq_hdr_t | matchQ |
Q of malloced val_value_t; 1 entry for each content-match leaf in the subtree or XPath filter; these leafs only apply to the current object. | |
dlq_hdr_t | selectQ |
Q of malloced getcb_get2_select_t; 1 entry for each child select node of the object in this get2cb these select nodes only apply to the current object if the 'select_only' flag is set then this queue is used. More... | |
getcb_mode_t | cbmode |
reason for the callback (get or getnext) | |
uint32 | max_entries |
max instances to get 0 for all entries, 1 . More... | |
uint32 | max_levels |
0 for all levels, 1 . More... | |
boolean | oper_data |
TRUE to get operational data. | |
boolean | config_data |
TBD: TRUE to get configuration data not supported yet! All config must be in the cfg->root val_value_t tree. | |
boolean | expand_varexpr |
variable expressions: TRUE if a varexpr node should be expanded; FALSE if printed as an expression | |
boolean | keys_only |
keys-only: TRUE if only the key leafs are desired from list objects; FALSE if normal retrieval | |
boolean | select_only |
select: TRUE if only the selectQ child nodes are desired from the parent for this callback; FALSE if no select mode retrieval | |
boolean | with_defaults |
with_defaults: TRUE if default nodes should be returned this is needed for operational data because the server does not process when-stmts on operational data, so the instrumentation has to return operational defaults if they are requested | |
getcb_api_mode_t | api_mode |
api_mode: consumer API callback mode More... | |
boolean | with_origin |
get-request with-origin flag | |
val_value_t * | start_add_key |
first key val node that was moved from the return_keyQ to the keyQ for nested nodes to process; needs to be removed after each nested list is processed | |
boolean | acmtest_result |
acmtest result used for NACM check | |
boolean | last_sibling |
flag to track JSON state | |
boolean | isfirst_nokey |
flag to track JSON state | |
boolean | first_llsibling |
leaf-list siblings | |
boolean | last_llsibling |
leaf-list siblings | |
boolean | islast |
Used only for AIO RESTCONF processing. More... | |
boolean | isfirst |
also used for JSON subtree proc | |
boolean | aio_done |
AIO processing is completed. | |
boolean | first_child |
Used for JSON subtree proccessing. More... | |
boolean | first_sibling |
first sibling done | |
boolean | force_lastsibling |
force JSON state | |
boolean | force_lastsib_value |
force JSON state | |
boolean | force_array_obj |
force JSON array output | |
boolean | finish_list |
Used for CBOR processing to know if the special finish-list callback mode is needed. | |
boolean | more_data |
set by the callback function if there are more instances that follow the specified instance; this is a global flag that applies to the entire response | |
dlq_hdr_t | getbulkQ |
set by the callback function if this is a list callback and multiple entries are returned; this is a global queue that applies to the entire response More... | |
xmlChar * | active_case_modname |
set by a choice test_mode callback to return the name of the active case; If the active_case_modname is NULL then the module name of the parent choice-stmt will be used | |
xmlChar * | active_case |
name of the active case | |
dlq_hdr_t | return_keyQ |
Q of malloced val_value_t. | |
dlq_hdr_t | return_valQ |
Q of malloced val_value_t. | |
val_value_t | return_val |
if just 1 instance is returned, then the return_val will be used; if the btyp is set to something other than NCX_BT_NONE, then the server will use this value; otherwise 1 or more malloced val_value_t structs are expected in the return_valQ More... | |
dlq_hdr_t | responseQ |
if this is a request that causes multiple responses then the responseQ will have each response get2cb | |
boolean | match_test_done |
content-match done flag ignored unless the matchQ is non-empty If TRUE. More... | |
boolean | wrote_some_lists |
If TRUE then Last list failed BUT some of the entries were written successfully. More... | |
val_value_t * | parent_val |
save parent backtrs for when-stmt processing of GET2 data | |
struct getcb_get2_t_ * | parent_cb |
backptr to parent CB | |
dlq_hdr_t | return_aioQ |
Q of malloced val_value_t. More... | |
ncx_nmda_ds_t | nmda_ds |
save NMDA datastore for GET operational | |
ncx_nmda_origin_t | nmda_origin |
caller will set the return nmda_origin | |
ncx_msg_encoding_t | aio_encoding |
In AIO GET2 callback is used with JSON/XML buffers the encoding will represent corresponding encoding type. | |
xmlChar * | aio_return_buff |
AIO XML or JSON malloced buffer from callback to use. More... | |
ncx_sm_mpid_t * | sm_mpid |
If schema-mount is in use then the MPID is set for GET2 callbacks that have a ancestor that is a rootcb (MPID) This is a backpointer NOT a malloced struct. | |
boolean | sm_mpid_malloced |
The MPID will be malloced on the SIL-SA side (TRUE) otherwise set to FALSE if the sm_mpid is a backptr. | |
void * | user_data_ref |
User Data Reference Can be used by GET2 callbacks to store and reference a pointer during the GET2 callback walk through lists and data structures. More... | |
uint32 | user_data_index |
User Data Index Can be used by GET2 callbacks to store and reference an index during the GET2 callback walk through lists and data structures. More... | |
boolean | pre_process |
YPW-2273: pre_process_mode is TRUE if Subtree filter is doing Pre process Selection nodes to see if the server should start to write the parent node or not. | |
GET2 control block.
xmlChar* aio_return_buff |
AIO XML or JSON malloced buffer from callback to use.
Must be freed after it is converted to val value.
getcb_api_mode_t api_mode |
api_mode: consumer API callback mode
GETCB_API_MODE_NORMAL: normal walk through objects including subtrees complex nodes are walked START, TERM*, END simple nodes are walked TERM GETCB_API_MODE_1SHOT: the specified object is retrieved according to the keys and content-match nodes and the consumer callback is called only one The callbacks will not include nested subtrees GETCB_API_MODE_CHOICE: The getcb code is retrieving implied choice-stmt active-case values and possibly terminal values
boolean first_child |
Used for JSON subtree proccessing.
first child done
dlq_hdr_t getbulkQ |
set by the callback function if this is a list callback and multiple entries are returned; this is a global queue that applies to the entire response
Q of getcb_get2_getbulk_t
boolean islast |
Used only for AIO RESTCONF processing.
also used for JSON subtree proc
boolean match_test_done |
content-match done flag ignored unless the matchQ is non-empty If TRUE.
indicates that the callback performed the requested content-match tests and the returned output is post-filter If FALSE, then the content-match tests were not done
uint32 max_entries |
max instances to get 0 for all entries, 1 .
. N for specific max
uint32 max_levels |
0 for all levels, 1 .
. N for max max_levels forced to 1 if testmode=TRUE
dlq_hdr_t return_aioQ |
Q of malloced val_value_t.
Used for sil-aio-get2 extension only. Callbacks will fill in data into this Queue. The callback will be called only once and the server will expect the return_aioQ to be filled in with the whole set of children.
val_value_t return_val |
if just 1 instance is returned, then the return_val will be used; if the btyp is set to something other than NCX_BT_NONE, then the server will use this value; otherwise 1 or more malloced val_value_t structs are expected in the return_valQ
THIS STRUCT MUST NOT BE USED IN GETBULK MODE
dlq_hdr_t selectQ |
Q of malloced getcb_get2_select_t; 1 entry for each child select node of the object in this get2cb these select nodes only apply to the current object if the 'select_only' flag is set then this queue is used.
An empty selectQ means only keys should be returned (for a list) For a choice the active case must be set. For a P-container, the callback has to return NO_ERR instead of ERR_NCX_NO_INSTANCE
The get2 callback can ignore the select_only flag and selectQ The extra returned values will be ignored by the caller. Q of getcb_get2_select_t
uint32 user_data_index |
User Data Index Can be used by GET2 callbacks to store and reference an index during the GET2 callback walk through lists and data structures.
void* user_data_ref |
User Data Reference Can be used by GET2 callbacks to store and reference a pointer during the GET2 callback walk through lists and data structures.
boolean wrote_some_lists |
If TRUE then Last list failed BUT some of the entries were written successfully.
So need to write comma after this list object.