[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

1529.0. "Help on event-report arg to MCC_EVENT_PUT" by STKHLM::BERGGREN (Nils Berggren EIS/Project dpmt, Sweden DTN 876-8287) Thu Sep 19 1991 18:01

Hi

Could someone provide me with an axmaple on how to put together an 
event_report that goes into MCC_EVENT_PUT.  The manual isn't to helpful
on this.  SRM section 7.5.1.2 says under the description of 'TEXT' 
"Chapter 8 describes the processing of event in more detail" but when 
reading chapter 8, I don't manage to even find the word event...

I don't manage to get the argument written out (from FCL, I know it
doesn't work from IMPM).  I have an MSL for the getevent-directive and
event partition like this:

	DIRECTIVE GetEvent = 65 :
	    DIRECTIVE-TYPE = EVENT,
	    DISPLAY = TRUE,
	    SYMBOL = GETEVENT_DIRECTIVE,
	    CATEGORIES = ( ALL ),

	    REQUEST
	        ARGUMENT Which Event = 780 : EventIdList
		    ECHO = TRUE,
		    DISPLAY = TRUE,
		    REQUIRED = TRUE,
		    SYMBOL = Sebam_Which_Event
		END ARGUMENT Which Event;
	    END REQUEST;
	
	    RESPONSE Event Received = 781 :
	        SYMBOL = SEBAM_EVENT_RECEIVED
	        TEXT = "SEBAM-event received: !<sebam_event_report>",
		ARGUMENT sebam_event_report = 782 : EVENT_REPORT
		    DISPLAY =TRUE,
		    SYMBOL = SEBAM_EVENT_REPORT
	        END ARGUMENT sebam_event_report;
	    END RESPONSE Event Received;

            RESPONSE ...
	       :
	       :
	    
	    EXCEPTION ...
	       :
	       :

	END DIRECTIVE GetEvent;

       EVENT PARTITION  CONFIGURATION EVENTS = 15:

           EVENT testevent = 785:
	       DISPLAY = TRUE,
	       SYMBOL = SEBAM_TESTEVENT_SYMBOL,
	       TEXT = "This is a TESTEVENT !<event_argument>",
	        ARGUMENT event_argument = 786 : Latin1String
                    DISPLAY =TRUE,
                    SYMBOL = EVENT_ARGUMENT
                END ARGUMENT event_argument;
	   END EVENT;

           EVENT ...
	      :
	      :

	END EVENT PARTITION  CONFIGURATION EVENTS;

*********************************************************************
This is how I build the event-report in the PUTEVENT-application (event-sinker):

/*
** create event report
*/
if(status == MCC_S_NORMAL)
    status = mcc_desframe_create_descriptor( &alloc_mem_list,
					     &event_report,
					     &eventlength,   /* 1024 */
					     &MCC_K_DT_ILV,
					     0,
					     &MCC_K_SEBAM_EVENT_RECEIVED,
					     0);

if(status == MCC_S_NORMAL)
    status = mcc_ilv_put_param_begin( &ctx, event_report);
	
if(status == MCC_S_NORMAL)
    status = mcc_ilv_put_cons_begin( &ctx,
    				     &MCC_K_SEBAM_EVENT_REPORT,
				     MCC_K_NULL_PTR,
				     MCC_K_NULL_PTR,
				     &mode);   /* MCC_K_ILV_NATIVE_VALUE  */

if(status == MCC_S_NORMAL)
    status = mcc_ilv_put_cons_begin( &ctx,
    				     &event_code,
				     MCC_K_NULL_PTR,
				     MCC_K_NULL_PTR,
				     &mode);   /* MCC_K_ILV_NATIVE_VALUE  */
/*
** create descriptor for event_data and insert it into event_report
*/
length = strlen(event_data);
arg_id = MCC_K_EVENT_ARGUMENT;   
if(status == MCC_S_NORMAL)
    status = mcc_desframe_create_descriptor(
				&alloc_mem_list,
				&arg_desc, 	
				&length,	
				&MCC_K_DT_LATIN1STRING,	
				&event_data,
				&arg_id,
				&DSC_K_DTYPE_T);

if(status == MCC_S_NORMAL)
    status = mcc_ilv_put( &ctx, arg_desc, MCC_K_NULL_PTR );

if(status == MCC_S_NORMAL) 
    status = mcc_ilv_put_cons_end( &ctx ); 
 
if(status == MCC_S_NORMAL)
    status = mcc_ilv_put_cons_end( &ctx );

if(status == MCC_S_NORMAL)
    status = mcc_ilv_put_param_end(&ctx, event_report );

if(status == MCC_S_NORMAL)
status = mcc_event_put(event_entity,
		       &event_partition,
		       &event_code,
                       event_report,
		       time_stamp);



The ILV-DUMP before EVENT_PUT looks like:

[  781 ] (
    [  782 ] (
        [  785 ] (
            [  786 ]             4a 55 53 54 20 41 4e 20 45 56 45 4e 54 2d 52 45
 50 4f 52 54  -- JUST AN EVENT-REPORT
            )
        )
    ) 

which looks OK to me, but I get the following output:

	MCC> GETEVENT .SEBAM:SEB075 ANY EVENTS
	
	SEBAM VTR:.SEBAM.SEB075
	AT 19-SEP-1991 20:10:13 Any Event
	
	SEBAM-event received: !<sebam_event_report>
	%MCC-E-DATATYPE_NOT_SU, data type is not supported

Which datatype is not supported?  The Latin1String in the argument?  Why?
How do I do to get the text from the event-definition on the screen?

     thanks in advance,
      /Nils

T.RTitleUserPersonal
Name
DateLines
1529.12 problemsTOOK::CALLANDERJill Callander DTN 226-5316Thu Sep 19 1991 18:2110
(worked off line on the phone)

1) sebam_event_report is not unique and the fcl for some reason things that
	it is an enumeration

2) you can not use the event_report datatype in symbol substition 

To do what you are looking for put the text inside of the event definition
not the getevent argument. Then you can specify the latin1string argument
that you truely want substitued.
1529.2getevent.msTOOK::CALLANDERJill Callander DTN 226-5316Thu Sep 19 1991 18:26192
The following is the example MS that has been proposed to go along with the
srm definition of the getevent directive. If you want to work with the
V1.2 notification services please use this .MS file. I will post updates
when this has completed the MRG (MCC review group) reivew process for
approving ECO's to the SRM.

jill



(******************************************************************************)
(*                                                                            *)
(*             Management Specification for GETEVENT directive                *)
(*                                                                            *)
(******************************************************************************)


(*   **************************************************************
     * ********************************************************** *
     * *                                                        * *
     * *  Copyright (c) Digital Equipment Corporation, 1990     * *
     * *  All Rights Reserved.  Unpublished rights reserved     * *
     * *  under the copyright laws of the United States.        * *
     * *                                                        * *
     * *  The software contained on this media is proprietary   * *
     * *  to and embodies the confidential technology of        * *
     * *  Digital Equipment Corporation.  Possession, use,      * *
     * *  duplication or dissemination of the software and      * *
     * *  media is authorized only pursuant to a valid written  * *
     * *  license from Digital Equipment Corporation.           * *
     * *                                                        * *
     * *  RESTRICTED RIGHTS LEGEND   Use, duplication, or       * *
     * *  disclosure by the U.S. Government is subject to       * *
     * *  restrictions as set forth in Subparagraph (c)(1)(ii)  * *
     * *  of DFARS 252.227-7013, or in FAR 52.227-19, as        * *
     * *  applicable.                                           * *
     * *                                                        * *
     * ********************************************************** *
     **************************************************************   *)

   TYPE
        OSI_Severity        = 1
        (
           indeterminate    = 0,
           critical         = 1,
           major            = 2,
           minor            = 3,
           warning          = 4,
           clear            = 5
        );

    TYPE
        OSI_Mode            = 2
        (
            confirmed       = 0,
            non-confirmed   = 1
        );

(* 
 *
 * DESCRIPTION  This service is used to request any events designated by the
 * P-component of the <V,E,P>-tuple and the Events Wanted argument. The
 * partition specifies which set of events are requested, with the Events
 * Wanted argument being used to qualify specific events in the partition.
 * All events are returned using the GETEVENT SUCCESS response.
 * 
 * When returning an OSI compliant event, the Mode argument must be
 * returned. The Managed Object field is optionally returned. The data in
 * the Event Data argument makes up the remainder of the event information.
 * The event identifier returned in the event report should be used to look
 * up the CMIP object identifier in the dictionary, for the event type. The data
 * in the event report should include the event data fields specific to the
 * event type, as specified in the ISO OSI specifications.
 * 
 * The target arguments, target entity and target severity, allow the event
 * source to provide added value. These fields supply the means in which an
 * event source can specify a target entity different from the managed
 * object, or to modify the event or severity information (See ISO/IEC DP
 * 10164-4 chapter 7 for information on the different views of severity at
 * different layers in the management hierarchy). If the target severity is
 * specified on an OSI compliant event, then the value in the target
 * severity argument should be used instead of the severity returned in the
 * event report.
 * 
 * When returning OSI clear events, the clear can only be determined if an 
 * existing event report has already been received with the same data values
 * for the Managed Object, alarm type, problem type and problem ID (event
 * type, specific problem, and probable cause -- OSI terms).
 * 
 * If the duration of interest for the GETEVENT expires, then the
 * Getevent_Nomore response is returned to signal the completion of the
 * request.
 * 
 * The specialized exception of Getevent_Lost is used to inform the user
 * when events have been lost by the Event Manager. This is not a fatal or
 * failure condition. This exception should be used in conjunction with a
 * handle state of MCC_K_HANDLE_MORE, as long as the duration has not
 * expired, allowing the service requester to continue with the next
 * available event.
 * 
 *)

(*
 * Directive == GETEVENT
 *)

    DIRECTIVE GetEvent  = 65 :
        DIRECTIVE-TYPE  = EVENT,
        DISPLAY         = TRUE,
        SYMBOL          = VERB_GETEVENT,
        CATEGORIES      = (ALL),

       (*
        * Request Arguments
        *)
      
        REQUEST 

    	    ARGUMENT Events Wanted  = 01        : EventIdList  
        		ECHO                = TRUE,
        		DISPLAY             = TRUE,
        		REQUIRED            = TRUE,
        		DEFAULT             = NO DEFAULT,
        		SYMBOL              = EVT_IDS
    	    END ARGUMENT Events Wanted;

    	END REQUEST;
  
       (*
        * Response == GETEVENT_SUCCESS
        *)
    	RESPONSE GetEvent Success       = 01 : 
    	    SYMBOL      = GETEVENT_SUCCESS,

    	    ARGUMENT Event Data         = 01 : Event_report
        		DISPLAY     = TRUE,
        		SYMBOL      = ARG_EVENT_DATA
    	    END ARGUMENT;

    	    ARGUMENT Mode               = 02 : OSI_Mode
        		DISPLAY     = FALSE,
        		SYMBOL      = ARG_MODE
    	    END ARGUMENT;

    	    ARGUMENT Managed Object     = 03 : FullEntityName
        		DISPLAY     = TRUE, 
        		SYMBOL      = ARG_MANAGED_OBJECT
    	    END ARGUMENT;

    	    ARGUMENT Target Entity      = 04 : FullEntityName
        		DISPLAY     = TRUE,
        		SYMBOL      = ARG_TARGET_ENTITY
    	    END ARGUMENT;

    	    ARGUMENT Target Severity    = 05 : OSI_Severity
        		DISPLAY     = TRUE, 
        		SYMBOL      = ARG_TARGET_SEVERITY
    	    END ARGUMENT;

    	END RESPONSE GetEvent Success;


       (*
        * Response == GETEVENT_NOMORE
        *)
    	RESPONSE GetEvent NoMore        = 02 : 
    	    SYMBOL      = GETEVENT_NOMORE,
    	    TEXT        = "Time Scope of Interest Expired, No More Events",

            (* No Arguments *)

    	END RESPONSE GetEvent NoMore;


       (*
        * Exception == GETEVENT_LOST
        *)
    	EXCEPTION GetEvent Lost = 01 : 
    	    SYMBOL = GETEVENT_LOST,
    	    TEXT = "An Event was reported lost !<Arg Event Lost Count> times by the Event Manager",

    	    ARGUMENT Arg Event Lost Count = 1: Unsigned32
        		SYMBOL = ARG_EVENT_LOST_COUNT,
        		DISPLAY = FALSE
    	    END ARGUMENT Arg Event Lost Count;

    	END EXCEPTION GetEvent Lost;

  
    END DIRECTIVE GetEvent;