📄 u_cvar.c
字号:
/************************************************************************//* MP WRITE *//************************************************************************/#if MMS_WRITE_EN & REQ_ENST_VOID u_mp_write_conf (MMSREQ_PEND *req_ptr) {WRITE_RESP_INFO *rsp_ptr;WRITE_RESULT *temp; /* index into array of structs */ST_INT i; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Variable Write"); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (WRITE_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n Number of Results = %d", rsp_ptr->num_of_result); temp = (WRITE_RESULT *) (rsp_ptr + 1); for (i = 0; i < rsp_ptr->num_of_result; i++) { printf ("\n Response %3d: ", i + 1); if (temp->resp_tag == WR_RSLT_FAILURE) printf ("Failure, code = %d", temp->failure); else printf ("Success "); temp++; } } conf_info_wait (); } (*sfun)(req_ptr); /* call to internal tracking fun */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP GETVAR *//************************************************************************/#if MMS_GETVAR_EN & REQ_ENST_VOID u_mp_getvar_conf (MMSREQ_PEND *req_ptr) {GETVAR_RESP_INFO *rsp_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Variable Access Attributes"); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (GETVAR_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n MMS Deletable : "); if (rsp_ptr->mms_deletable) printf ("YES"); else printf ("NO"); if (rsp_ptr->address_pres) print_address (&rsp_ptr->address); else printf ("\n Address : Not Present "); printf ("\n Type Specification :"); list_bytes (rsp_ptr->type_spec.data,rsp_ptr->type_spec.len); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP DEFVAR *//************************************************************************/#if MMS_DEFVAR_EN & REQ_ENST_VOID u_mp_defvar_conf (MMSREQ_PEND *req_ptr) { if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Define Named Variable "); if (req_ptr->resp_err) list_err_info (req_ptr); conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP DELVAR *//************************************************************************/#if MMS_DELVAR_EN & REQ_ENST_VOID u_mp_delvar_conf (MMSREQ_PEND *req_ptr) {DELVAR_RESP_INFO *rsp_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Delete Variable Access "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (DELVAR_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n Number Matched : %ld",rsp_ptr->num_matched); printf ("\n Number Deleted : %ld",rsp_ptr->num_deleted); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP DEFSCAT *//************************************************************************/#if MMS_DEFSCAT_EN & REQ_ENST_VOID u_mp_defscat_conf (MMSREQ_PEND *req_ptr) { if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Define Scattered Access "); if (req_ptr->resp_err) list_err_info (req_ptr); conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP GETSCAT *//************************************************************************/#if MMS_GETSCAT_EN & REQ_ENST_VOID u_mp_getscat_conf (MMSREQ_PEND *req_ptr) {GETSCAT_RESP_INFO *rsp_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Scattered Access Attributes "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (GETSCAT_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n MMS Deletable : "); if (rsp_ptr->mms_deletable) printf ("YES"); else printf ("NO"); printf ("\n Scattered Access :"); list_bytes (rsp_ptr->sa_descr.data,rsp_ptr->sa_descr.len); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP DEFVLIST *//************************************************************************/#if MMS_DEFVLIST_EN & REQ_ENST_VOID u_mp_defvlist_conf (MMSREQ_PEND *req_ptr) { if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Define Named Variable List "); if (req_ptr->resp_err) list_err_info (req_ptr); conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP GETVLIST *//************************************************************************/#if MMS_GETVLIST_EN & REQ_ENST_VOID u_mp_getvlist_conf (MMSREQ_PEND *req_ptr) {GETVLIST_RESP_INFO *rsp_ptr;VARIABLE_LIST *vl_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Named Variable List Attributes "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (GETVLIST_RESP_INFO *) req_ptr->resp_info_ptr; vl_ptr = (VARIABLE_LIST *) (rsp_ptr + 1); printf ("\n MMS Deletable : "); if (rsp_ptr->mms_deletable) printf ("YES"); else printf ("NO"); print_var_list (vl_ptr, rsp_ptr->num_of_variables); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP DELVLIST *//************************************************************************/#if MMS_DELVLIST_EN & REQ_ENST_VOID u_mp_delvlist_conf (MMSREQ_PEND *req_ptr) {DELVLIST_RESP_INFO *rsp_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Delete Named Variable List "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (DELVLIST_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n Number Matched : %ld",rsp_ptr->num_matched); printf ("\n Number Deleted : %ld",rsp_ptr->num_deleted); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP GETTYPE *//************************************************************************/#if MMS_GETTYPE_EN & REQ_ENST_VOID u_mp_gettype_conf (MMSREQ_PEND *req_ptr) {GETTYPE_RESP_INFO *rsp_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Named Type Attributes "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (GETTYPE_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n MMS Deletable : "); if (rsp_ptr->mms_deletable) printf ("YES"); else printf ("NO"); printf ("\n Type Specification :"); list_bytes (rsp_ptr->type_spec.data,rsp_ptr->type_spec.len); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MV DEFTYPE *//************************************************************************/#if MMS_DEFTYPE_EN & REQ_ENST_VOID u_mv_deftype_conf (MMSREQ_PEND *req_ptr) { if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Define Named Type "); if (req_ptr->resp_err) list_err_info (req_ptr); conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ ms_clr_mvreq (req_ptr); }#endif/************************************************************************//* MP DEFTYPE *//************************************************************************/#if MMS_DEFTYPE_EN & REQ_ENST_VOID u_mp_deftype_conf (MMSREQ_PEND *req_ptr) { if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Define Type Name "); if (req_ptr->resp_err) list_err_info (req_ptr); conf_info_wait (); } resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP DELTYPE *//************************************************************************/#if MMS_DELTYPE_EN & REQ_ENST_VOID u_mp_deltype_conf (MMSREQ_PEND *req_ptr) {DELTYPE_RESP_INFO *rsp_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Delete Named Type "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (DELTYPE_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n Number Matched : %ld",rsp_ptr->num_matched); printf ("\n Number Deleted : %ld",rsp_ptr->num_deleted); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -