u_cevn.c
来自「ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包」· C语言 代码 · 共 1,132 行 · 第 1/3 页
C
1,132 行
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 ALTER EVENT ENROLLMENT *//************************************************************************/#if MMS_ALTEE_EN & REQ_ENST_VOID u_mp_altee_conf (MMSREQ_PEND *req_ptr) {ALTEE_RESP_INFO *rsp_ptr; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Alter Event Enrollment "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (ALTEE_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n Current State : "); if (rsp_ptr->cur_state_tag == 0) { switch (rsp_ptr->state) { case 0 : printf ("%d, disabled", rsp_ptr->state); break; case 1 : printf ("%d, idle", rsp_ptr->state); break; case 2 : printf ("%d, active", rsp_ptr->state); break; case 3 : printf ("%d, active no ack a", rsp_ptr->state); break; case 4 : printf ("%d, idle no ack i", rsp_ptr->state); break; case 5 : printf ("%d, idle no ack a", rsp_ptr->state); break; case 6 : printf ("%d, idle-acked", rsp_ptr->state); break; case 7 : printf ("%d, active-acked", rsp_ptr->state); break; default : printf ("invalid state code"); break; } } else if (rsp_ptr->cur_state_tag == 1) printf ("Undefined"); else printf ("invalid current state tag"); printf ("\n Transition Time : "); print_evtime (&rsp_ptr->trans_time); } 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 EVENT NOTIFICATION - Unconfirmed *//************************************************************************//************************************************************************//* MP ACKNOWLEDGE EVENT NOTIFICATION *//************************************************************************/#if MMS_ACKEVNOT_EN & REQ_ENST_VOID u_mp_ackevnot_conf (MMSREQ_PEND *req_ptr) { if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Acknowledge Event Notification "); 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 GET ALARM SUMMARY *//************************************************************************/#if MMS_GETAS_EN & REQ_ENST_VOID u_mp_getas_conf (MMSREQ_PEND *req_ptr) {GETAS_RESP_INFO *rsp_ptr;ALARM_SUMMARY *as_ptr;ST_INT i, ch; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Alarm Summary "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (GETAS_RESP_INFO *) req_ptr->resp_info_ptr; as_ptr = (ALARM_SUMMARY *) (rsp_ptr + 1); if (rsp_ptr->num_of_alarm_sum > 0) { printf ("\n\n Press return to continue"); ch = get_a_char (); CLEARSCR; } printf ("\n Number of Alarm Summaries : %d", rsp_ptr->num_of_alarm_sum); printf ("\n More Follows : "); if (rsp_ptr->more_follows) printf ("YES"); else printf ("NO"); for (i = 0; i < rsp_ptr->num_of_alarm_sum; i++, as_ptr++) { printf ("\n Alarm Summary : %d ", i+1); printf ("\n Event Condition Name : "); print_objname (&as_ptr->evcon_name); printf ("\n Severity : %02X ", as_ptr->severity); printf ("\n Current State : %d, ", as_ptr->cur_state); switch (as_ptr->cur_state) { case 0 : printf ("disabled"); break; case 1 : printf ("idle"); break; case 2 : printf ("active"); break; default : printf ("invalid"); break; } printf ("\n Unacknowledged State : %d, ", as_ptr->unack_state); switch (as_ptr->unack_state) { case 0 : printf ("none"); break; case 1 : printf ("active"); break; case 2 : printf ("idle"); break; case 3 : printf ("both"); break; default : printf ("invalid"); break; } printf ("\n Additional Detail : "); if (as_ptr->addl_detail_pres) list_bytes (as_ptr->addl_detail, as_ptr->addl_detail_len); else printf ("Not Present "); printf ("\n Transition to Active : "); if (as_ptr->tta_time_pres) print_evtime (&as_ptr->tta_time); else printf ("Not Present"); printf ("\n Transition to Idle : "); if (as_ptr->tti_time_pres) print_evtime (&as_ptr->tti_time); else printf ("Not Present"); if ((i + 1) < rsp_ptr->num_of_alarm_sum) { printf ("\n\n Press return to continue, x to exit"); ch = get_a_char (); if (ch == 'x' || ch == 'X') i = rsp_ptr->num_of_alarm_sum; /* exit selected */ } } } 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 GET ALARM ENROLLMENT SUMMARY *//************************************************************************/#if MMS_GETAES_EN & REQ_ENST_VOID u_mp_getaes_conf (MMSREQ_PEND *req_ptr) {GETAES_RESP_INFO *rsp_ptr;ALARM_ENROLL_SUMMARY *aes_ptr;ST_INT i, ch; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Alarm Enrollment Summary "); if (req_ptr->resp_err) list_err_info (req_ptr); else { rsp_ptr = (GETAES_RESP_INFO *) req_ptr->resp_info_ptr; aes_ptr = (ALARM_ENROLL_SUMMARY *) (rsp_ptr + 1); if (rsp_ptr->num_of_alarm_esum > 0) { printf ("\n\n Press return to continue"); ch = get_a_char (); CLEARSCR; } else printf ("\n"); printf (" Alarm Enroll Summaries : %d",rsp_ptr->num_of_alarm_esum); printf ("\n More Follows : "); if (rsp_ptr->more_follows) printf ("YES"); else printf ("NO"); for (i = 0; i < rsp_ptr->num_of_alarm_esum; i++, aes_ptr++) { printf ("\n%d) Event Enrollment Name : ", i+1); print_objname (&aes_ptr->evenroll_name); printf ("\n Client Application : "); if (aes_ptr->client_app_pres) print_asn1_app_ref (aes_ptr->client_app, aes_ptr->client_app_len); else printf ("Not Present"); printf ("\n Severity : %02X ", aes_ptr->severity); printf ("\n Current State : %d, ", aes_ptr->cur_state); switch (aes_ptr->cur_state) { case 0 : printf ("disabled"); break; case 1 : printf ("idle"); break; case 2 : printf ("active"); break; default : printf ("invalid"); break; } printf ("\n Additional Detail : "); if (aes_ptr->addl_detail_pres) list_bytes (aes_ptr->addl_detail, aes_ptr->addl_detail_len); else printf ("Not Present"); printf ("\n Notification Lost : "); if (aes_ptr->not_lost) printf ("YES"); else printf ("NO"); printf ("\n Alarm Ack Rule : %d, ", aes_ptr->alarm_ack_rule); switch (aes_ptr->alarm_ack_rule) { case 0 : printf ("none"); break; case 1 : printf ("simple"); break; case 2 : printf ("ack active"); break; case 3 : printf ("ack all"); break; default: printf ("invalid ack rule"); break; } printf ("\n Enrollment State : "); if (aes_ptr->ee_state_pres) { printf ("%d, ", aes_ptr->ee_state); switch (aes_ptr->ee_state) { case 0 : printf ("disabled"); break; case 1 : printf ("idle"); break; case 2 : printf ("active"); break; case 3 : printf ("active no ack a"); break; case 4 : printf ("idle no ack i"); break; case 5 : printf ("idle no ack a"); break; case 6 : printf ("idle-acked"); break; case 7 : printf ("active-acked"); break; default : printf ("invalid state code"); break; } } else printf ("Not Present"); printf ("\n Trans to Active Time : "); if (aes_ptr->tta_time_pres) print_evtime (&aes_ptr->tta_time); else printf ("Not Present"); printf (" Active Acked Time : "); if (aes_ptr->aack_time_pres) print_evtime (&aes_ptr->aack_time); else printf ("Not Present"); printf (" Trans to Idle Time : "); if (aes_ptr->tti_time_pres) print_evtime (&aes_ptr->tti_time); else printf ("Not Present"); printf (" Idle Acked Time : "); if (aes_ptr->iack_time_pres) print_evtime (&aes_ptr->iack_time); else printf ("Not Present"); if ((i + 1) < rsp_ptr->num_of_alarm_esum) { printf ("\n\n Press return to continue, x to exit"); ch = get_a_char (); if (ch == 'x' || ch == 'X') i = rsp_ptr->num_of_alarm_esum; /* exit selected */ } } } 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 + =
减小字号Ctrl + -
显示快捷键?