yumapro  20.10-13
YumaPro SDK
Collaboration diagram for YANG Push:

Macros

#define AGT_PUSH_FL_CREATE   bit0
 These bits match the change-type definition in RFC 8641 They represent the inverse of the excluded-change. More...
 
#define AGT_PUSH_FL_DELETE   bit1
 PUSH delete operation.
 
#define AGT_PUSH_FL_INSERT   bit2
 PUSH insert operation.
 
#define AGT_PUSH_FL_MOVE   bit3
 PUSH move operation.
 
#define AGT_PUSH_FL_REPLACE   bit4
 PUSH replace operation.
 
#define AGT_PUSH_DEF_INCLUDED_CHANGES   0x1f
 the excluded-changeds leaf-list set is stored as an inverted uint8 bitset
 
#define AGT_PUSH_SET_CREATE_FLAG(F)   (F) |= AGT_PUSH_FL_CREATE
 Set the PUSH Create flag.
 
#define AGT_PUSH_GET_CREATE_FLAG(F)   ((F) & AGT_PUSH_FL_CREATE)
 Get the PUSH Create flag.
 
#define AGT_PUSH_SET_DELETE_FLAG(F)   (F) |= AGT_PUSH_FL_DELETE
 Set the PUSH Delete flag.
 
#define AGT_PUSH_GET_DELETE_FLAG(F)   ((F) & AGT_PUSH_FL_DELETE)
 Get the PUSH Delete flag.
 
#define AGT_PUSH_SET_INSERT_FLAG(F)   (F) |= AGT_PUSH_FL_INSERT
 Set the PUSH Delete flag.
 
#define AGT_PUSH_GET_INSERT_FLAG(F)   ((F) & AGT_PUSH_FL_INSERT)
 Get the PUSH Insert flag.
 
#define AGT_PUSH_SET_MOVE_FLAG(F)   (F) |= AGT_PUSH_FL_MOVE
 Set the PUSH Move flag.
 
#define AGT_PUSH_GET_MOVE_FLAG(F)   ((F) & AGT_PUSH_FL_MOVE)
 Get the PUSH Move flag.
 
#define AGT_PUSH_SET_REPLACE_FLAG(F)   (F) |= AGT_PUSH_FL_REPLACE
 Set the PUSH Replace flag.
 
#define AGT_PUSH_GET_REPLACE_FLAG(F)   ((F) & AGT_PUSH_FL_REPLACE)
 Get the PUSH Replace flag.
 

Enumerations

enum  agt_push_dserr_t_ {
  AGT_PUSH_DSERR_NONE,
  AGT_PUSH_DSERR_DATASTORE,
  AGT_PUSH_DSERR_FILTER_REF,
  AGT_PUSH_DSERR_SUBTREE_FILTER,
  AGT_PUSH_DSERR_XPATH_FILTER,
  AGT_PUSH_DSERR_STOP_TIME,
  AGT_PUSH_DSERR_ENCODING,
  AGT_PUSH_DSERR_PERIODIC,
  AGT_PUSH_DSERR_PERIOD,
  AGT_PUSH_DSERR_ANCHOR_TIME,
  AGT_PUSH_DSERR_ON_CHANGE,
  AGT_PUSH_DSERR_DAMPENING_PERIOD,
  AGT_PUSH_DSERR_SYNC_ON_START,
  AGT_PUSH_DSERR_EXCLUDED_CHANGE,
  AGT_PUSH_DSERR_ID
}
 datastore error parameter numbers Used internally to identify error objects for <rpc-error> More...
 

Functions

status_t agt_push_init (obj_template_t *update_obj, obj_template_t *change_obj)
 Initialize the PUSH modules. More...
 
status_t agt_push_init2 (void)
 PUSH init phase 2. More...
 
void agt_push_cleanup (void)
 Cleanup the PUSH Module. More...
 
status_t agt_push_establish_subscription (ses_cb_t *scb, ncx_nmda_ds_t datastore_id, const xmlChar *selection_filter_ref, const val_value_t *datastore_subtree_filter, const val_value_t *datastore_xpath_filter, const xmlChar *stop_time, val_value_t *encoding, boolean periodic, uint32 period, const xmlChar *anchor_time, boolean on_change, uint32 dampening_period, boolean sync_on_start, uint32 included_changes, agt_not_subid_t *subid, agt_push_dserr_t *errnum)
 Set the YANG-Push datastore parameters and start a YANG push subscription. More...
 
status_t agt_push_modify_subscription (ses_cb_t *scb, agt_not_subid_t cur_subid, ncx_nmda_ds_t datastore_id, const xmlChar *selection_filter_ref, const val_value_t *datastore_subtree_filter, const val_value_t *datastore_xpath_filter, const xmlChar *stop_time, boolean periodic, uint32 period, const xmlChar *anchor_time, boolean on_change, boolean dampening_set, uint32 dampening_period, agt_push_dserr_t *errnum)
 Set the YANG-Push datastore parameters and start a YANG push subscription. More...
 
status_t agt_push_sync_subscription (agt_not_subid_t subid)
 Request a sync for the YANG-Push datastore subscription. More...
 
void agt_push_config_update (rpc_msg_t *msg, agt_cfg_transaction_t *txcb)
 Do a config update for YANG Push subscriptions if needed. More...
 

Detailed Description

YANG Push dynamic subscriptions are supported. This module uses the agt_not.h APIs. The PUSH module parameters and logic are processed in this module, using subscriptions managed in agt_not.c

Macro Definition Documentation

◆ AGT_PUSH_FL_CREATE

#define AGT_PUSH_FL_CREATE   bit0

These bits match the change-type definition in RFC 8641 They represent the inverse of the excluded-change.

They represent the included changes. A zero byte means YANG Push is not collecting on this object for the datastore

bit0 is create

Enumeration Type Documentation

◆ agt_push_dserr_t_

datastore error parameter numbers Used internally to identify error objects for <rpc-error>

Enumerator
AGT_PUSH_DSERR_NONE 

not set

AGT_PUSH_DSERR_DATASTORE 

datastore parameter

AGT_PUSH_DSERR_FILTER_REF 

filter ref parameter

AGT_PUSH_DSERR_SUBTREE_FILTER 

subtree filter parameter

AGT_PUSH_DSERR_XPATH_FILTER 

xpath filter parameter

AGT_PUSH_DSERR_STOP_TIME 

stop-time parameter

AGT_PUSH_DSERR_ENCODING 

encoding parameter

AGT_PUSH_DSERR_PERIODIC 

periodic parameter

AGT_PUSH_DSERR_PERIOD 

period parameter

AGT_PUSH_DSERR_ANCHOR_TIME 

anchor-time parameter

AGT_PUSH_DSERR_ON_CHANGE 

on-change parameter

AGT_PUSH_DSERR_DAMPENING_PERIOD 

dampening-period parameter

AGT_PUSH_DSERR_SYNC_ON_START 

sync-on-start parameter

AGT_PUSH_DSERR_EXCLUDED_CHANGE 

excluded-change parameter

AGT_PUSH_DSERR_ID 

subscription ID parameter

Function Documentation

◆ agt_push_cleanup()

void agt_push_cleanup ( void  )

Cleanup the PUSH Module.

CALLED FROM u_ietf-yang-push.c ONLY NOT CALLED FROM agt.c

Here is the call graph for this function:

◆ agt_push_config_update()

void agt_push_config_update ( rpc_msg_t *  msg,
agt_cfg_transaction_t *  txcb 
)

Do a config update for YANG Push subscriptions if needed.

Parameters
msgRPC msg in progress
txcbtransaction control block

◆ agt_push_establish_subscription()

status_t agt_push_establish_subscription ( ses_cb_t *  scb,
ncx_nmda_ds_t  datastore_id,
const xmlChar *  selection_filter_ref,
const val_value_t *  datastore_subtree_filter,
const val_value_t *  datastore_xpath_filter,
const xmlChar *  stop_time,
val_value_t *  encoding,
boolean  periodic,
uint32  period,
const xmlChar *  anchor_time,
boolean  on_change,
uint32  dampening_period,
boolean  sync_on_start,
uint32  included_changes,
agt_not_subid_t subid,
agt_push_dserr_t *  errnum 
)

Set the YANG-Push datastore parameters and start a YANG push subscription.

Parameters
scbsession control block starting the subscription
datastore_idID of datastore to use for push
selection_filter_reffilter by reference: option 1 of 3 for subscription filter
datastore_subtree_filterinline subtree filter: option 2 of 3 for subscription filter
datastore_xpath_filterinline XPath filter: option 3 of 3 for subscription filter
stop_timestop time is a common parm if replay supported for stream
encodingencoding is a common parm. Only XML is supported.
periodicTRUE for periodic subscription, FALSE on-change
periodinternval to use if periodic
anchor_timeanchor the periodic intervals if periodic
on_changeTRUE if on-change; FALSE if periodic
dampening_perioddampening interval if on-change
sync_on_startsend a full update for the first one
included_changesinverted flags of excluded_change
subidaddress of return subscription ID assigned
errnumaddress of return parm number of error
Return values
*subidsubscription ID assigned (if NO_ERR)
*errnumparm number of error if returning error (if some error)
Returns
status

◆ agt_push_init()

status_t agt_push_init ( obj_template_t *  update_obj,
obj_template_t *  change_obj 
)

Initialize the PUSH modules.

Called after the CLI parameters are set and before any load-config CALLED FROM u_ietf-yang-push.c ONLY NOT CALLED FROM agt.c

Parameters
update_objpush-update notification
change_objpush-change-update notification
Returns
status
Here is the call graph for this function:

◆ agt_push_init2()

status_t agt_push_init2 ( void  )

PUSH init phase 2.

CALLED FROM u_ietf-yang-push.c ONLY NOT CALLED FROM agt.c

Returns
status
Here is the call graph for this function:

◆ agt_push_modify_subscription()

status_t agt_push_modify_subscription ( ses_cb_t *  scb,
agt_not_subid_t  cur_subid,
ncx_nmda_ds_t  datastore_id,
const xmlChar *  selection_filter_ref,
const val_value_t *  datastore_subtree_filter,
const val_value_t *  datastore_xpath_filter,
const xmlChar *  stop_time,
boolean  periodic,
uint32  period,
const xmlChar *  anchor_time,
boolean  on_change,
boolean  dampening_set,
uint32  dampening_period,
agt_push_dserr_t *  errnum 
)

Set the YANG-Push datastore parameters and start a YANG push subscription.

Parameters
scbsession control block starting the subscription
cur_subidcurrent subscription ID
datastore_idID of datastore to use for push
selection_filter_reffilter by reference: option 1 of 3 for subscription filter
datastore_subtree_filterinline subtree filter: option 2 of 3 for subscription filter
datastore_xpath_filterinline XPath filter: option 3 of 3 for subscription filter
stop_timestop time is a common parm if replay supported for stream
periodicTRUE for periodic subscription, FALSE on-change
periodinternval to use if periodic
anchor_timeanchor the periodic intervals if periodic
on_changeTRUE if on-change; FALSE if periodic
dampening_setdampening interval is set
dampening_perioddampening interval if on-change
errnumaddress of return parm number of error
Return values
*errnumparm number of error if returning error (if some error)
Returns
status

◆ agt_push_sync_subscription()

status_t agt_push_sync_subscription ( agt_not_subid_t  subid)

Request a sync for the YANG-Push datastore subscription.

Parameters
subidsubscription ID
Returns
status