⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 u_cjou.c

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 C
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//*   (c) Copyright Systems Integration Specialists Company, Inc.,	*//*      	  1986 - 1997, All Rights Reserved.		        *//*									*//* MODULE NAME : u_cjou.c						*//* PRODUCT(S)  : MMSEASE						*//*									*//* MODULE DESCRIPTION : 						*//*	This module contains user confirm functions. These functions	*//*	are invoked from 'mms_req_serve' when the response to an        *//*	outstanding request is received. These functions should check	*//*	the resp_err member of the request control structure before	*//*	assuming returned data. 					*//*									*//* NOTES ON REQUEST INFORMATION :					*//*	In the user application, request information structures may be	*//*	committed when the request is made (e.g. for error recovery).	*//*	If so, these information buffers could be freed in the confirm	*//*	functions.  In the sample application, all request information	*//*	structures are automatic or handled when the request is issued. *//*									*//* GLOBAL FUNCTIONS DEFINED IN THIS MODULE :				*//*									*//* MODIFICATION LOG :							*//*  Date     Who   Rev			Comments			*//* --------  ---  ------   -------------------------------------------	*//* 09/01/98  NAV      1    Get rid of escape sequences in printf	*//* 04/15/97  DSF   7.00    MMSEASE 7.0 release. See MODL70.DOC for	*//*			   history.					*//************************************************************************/#include "glbtypes.h"#include "sysincs.h"#include "mms_usr.h"#include "mms_pjou.h"#include "userdefs.h"#include "mmsop_en.h"#include "gvaldefs.h"#include "scrndefs.h"#include "fkeydefs.h"/************************************************************************//* For debug version, use a static pointer to avoid duplication of 	*//* __FILE__ strings.							*//************************************************************************/#ifdef DEBUG_SISCOstatic ST_CHAR *thisFileName = __FILE__;#endif/************************************************************************//************************************************************************//*			JOURNAL MANAGEMENT				*//************************************************************************//************************************************************************//* MP READ JOURNAL							*//************************************************************************/#if MMS_JREAD_EN & REQ_ENST_VOID u_mp_jread_conf (MMSREQ_PEND *req_ptr)  {JREAD_RESP_INFO *rsp_ptr;JOURNAL_ENTRY   *je_ptr;ENTRY_CONTENT   *ec_ptr;VAR_INFO        *vi_ptr;ST_INT  ch, i, j, line;  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Read Journal ");    if (req_ptr->resp_err)      list_err_info (req_ptr);    else      {      rsp_ptr = (JREAD_RESP_INFO *) req_ptr->resp_info_ptr;      je_ptr  = (JOURNAL_ENTRY *) (rsp_ptr + 1);      if (rsp_ptr->num_of_jou_entry > 0)        {        printf ("\n\n Press return to continue");        ch = get_a_char ();        CLEARSCR;        }      printf ("\n Number of Journal Entry : %d",  rsp_ptr->num_of_jou_entry);      printf ("\n More Follows            : ");      if (rsp_ptr->more_follows)	printf ("YES");      else	printf ("NO");      for (i = 0; i < rsp_ptr->num_of_jou_entry; i++) 	{	printf ("\n\n***Journal Entry %d) ", i+1);	printf ("\n  Entry Identifier    : ");	list_bytes (je_ptr->entry_id,je_ptr->entry_id_len);	printf ("\n  Originating App     : ");        print_asn1_app_ref (je_ptr->orig_ae, je_ptr->orig_ae_len);	ec_ptr = &(je_ptr->ent_content);	printf ("\n  Entry Content       : ");	printf ("\n  Occurrence Time    : ");	print_evt_tod (&ec_ptr->occur_time);	printf ("\n  Additional Detail  : ");	if (ec_ptr->addl_detail_pres)	  list_bytes (ec_ptr->addl_detail,ec_ptr->addl_detail_len);	else	  printf ("Not Present");	printf ("\n  Entry form         : %d, ", ec_ptr->entry_form_tag);	switch (ec_ptr->entry_form_tag)	  {	  case	2 :	    printf ("data");	    break;	  case	3 :	    printf ("annotation");	    break;	  default :	    printf ("invalid");	    break;	  }        if (ec_ptr->entry_form_tag == 3)	/* ANNOTATION		*/          {	  printf ("\n  Annotation        : %s", ec_ptr->ef.annotation);          }        else					/* DATA			*/          {	  if (ec_ptr->ef.data.event_pres)	    {	    printf ("\n  Event Condition Name : ");	    print_objname (&(ec_ptr->ef.data.evcon_name));	    printf ("\n  Current State        : %d, ",		    ec_ptr->ef.data.cur_state);	    switch (ec_ptr->ef.data.cur_state)	      {	      case  0 :		printf ("disabled");		break;	      case  1 :		printf ("idle");		break;	      case  2 :		printf ("active");		break;	      }	    }	  else	    printf ("\n  Event                : Not Present");	  if (ec_ptr->ef.data.list_of_var_pres)	    {	    vi_ptr = (VAR_INFO *) (ec_ptr + 1);	    printf ("\n  Number of Variables  : %d",		    ec_ptr->ef.data.num_of_var);	    for (j=0; j < ec_ptr->ef.data.num_of_var ; j++)	      {	      printf ("\n  %d) Variable Tag        : %s",		      j+1,vi_ptr->var_tag);	      printf ("\n     Value Specification : ");	      list_bytes (vi_ptr->value_spec.data,vi_ptr->value_spec.len);	      if ((j + 1) < ec_ptr->ef.data.num_of_var)		{		printf ("\n\nPress return for next variable, q to quit");		ch = get_a_char ();		if (ch == 'q' || ch == 'Q')		  j = ec_ptr->ef.data.num_of_var; /* quit selected	*/		else		  vi_ptr++;		}	      }	    }	  else	    printf ("\n  List of Variables    : Not Present", line++);	  }	if ((i+1) < rsp_ptr->num_of_jou_entry)	  printf ("\n\nPress return for next journal entry, x to exit");	else	  printf ("\n\nPress return to continue                      ");	ch = get_a_char ();	if (ch == 'x' || ch == 'X')	  i = rsp_ptr->num_of_jou_entry;	/* exit selected	*/	else	  {	  vi_ptr  = (VAR_INFO *) (je_ptr + 1);	  vi_ptr += je_ptr->ent_content.ef.data.num_of_var;	  je_ptr  = (JOURNAL_ENTRY *) vi_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 WRITE JOURNAL							*//************************************************************************/#if MMS_JWRITE_EN & REQ_ENST_VOID u_mp_jwrite_conf (MMSREQ_PEND *req_ptr)  {  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Write Journal ");    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 INITIALIZE JOURNAL						*//************************************************************************/#if MMS_JINIT_EN & REQ_ENST_VOID u_mp_jinit_conf (MMSREQ_PEND *req_ptr)  {JINIT_RESP_INFO *rsp_ptr;  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Initialize Journal ");    if (req_ptr->resp_err)      list_err_info (req_ptr);    else      {      rsp_ptr = (JINIT_RESP_INFO *) req_ptr->resp_info_ptr;      printf ("\n Deleted Entries   : %lu", rsp_ptr->del_entries);      }    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 REPORT JOURNAL STATUS						*//************************************************************************/#if MMS_JSTAT_EN & REQ_ENST_VOID u_mp_jstat_conf (MMSREQ_PEND *req_ptr)  {JSTAT_RESP_INFO *rsp_ptr;  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Report Journal Status ");    if (req_ptr->resp_err)      list_err_info (req_ptr);    else      {      rsp_ptr = (JSTAT_RESP_INFO *) req_ptr->resp_info_ptr;      printf ("\n Current Entries   : %lu", rsp_ptr->cur_entries);      printf ("\n MMS Deletable     : ");      if (rsp_ptr->mms_deletable)	printf ("YES");      else	printf ("NO");      }    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 CREATE JOURNAL							*//************************************************************************/#if MMS_JCREATE_EN & REQ_ENST_VOID u_mp_jcreate_conf (MMSREQ_PEND *req_ptr)  {  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Create Journal ");    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 DELETE JOURNAL							*//************************************************************************/#if MMS_JDELETE_EN & REQ_ENST_VOID u_mp_jdelete_conf (MMSREQ_PEND *req_ptr)  {  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Delete Journal ");    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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -