[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

1046.0. "problem with MCC_EVENT_GET/PUT" by STKHLM::BERGGREN (Nils Berggren EIS/Project dpmt, Sweden DTN 876-8287) Thu May 23 1991 07:41

Hi, 

I'm trying to develop an AM where among other things event management 
is important.
I've implemented a prototype (or rather extended the YOURMM am provided in the
toolkit) just to test out the MCC_EVENT_GET/PUT-routines. I have added an 
entrypoint  for the GETEVENT directive. 
For the reporting of an event I have a separate program which calls
the MCC_EVENT_PUT-routine (the program uses the callable MCC; linked according 
to the MM Programming Guide v.1.1  ch. 3.8 page 3-9).

Now, when I issue the command "GETEVENT mymm * ANY EVENTS" 
I get into the routine I've written which calls the MCC_EVENT_GET-routine.
The MCC_EVENT_GET routine gets in the wait state....
In another process I run the PUTEVENT.EXE pgm. The MCC_EVENT_GET routine 
wakes up and returns with a statusvalue of MCC_S_INV_DESC.  
Everything looks fine except that event-data doesn't contain anything.

1.  Why do I get this status.  I guess that the invalid string-descriptor has
to do with the last argument, event_data, right?

2. When I create this event_data string descriptor, what descriptor-type,
MCC_B_DTYPE, shall I use?


I defined the MCC_EVENT_LOG and MCC_EVENT_TRACE logicals to FFF  (alot of
bits set...) and when I do the same thing as above I get an ACCVIO in the 
routine ERB__ADD_ERB.

3. Are there any bits in the logicals which I should/should not set or is this 
a bug?

      /Nils Berggren

Below is a log from DEBUG.

DBG> go
!%DEBUG-I-DYNMODSET, setting module MCC_MYMM__GETEVENT
DBG> set bre/exception
DBG> go
!%DEBUG-I-DYNIMGSET, setting image MCC_KERNEL_SHR
!%DEBUG-I-DYNMODSET, setting module MCC_EVENT_ERB
!%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=00000000, PC=0010982F, PSL=03C00004
!break on exception at MCC_EVENT_ERB\ERB__ADD_ERB\%LINE 2240
DBG> sho calls
! module name     routine name                     line       rel PC    abs PC
!*MCC_EVENT_ERB   ERB__ADD_ERB                     2240      000002F3  0010982F
!*MCC_EVENT_ERB   ERB_ADD_ERB_LIST                 2289      0000007B  001098DF
! MCC_EVENT_PRB                                              00000000  00108D81
! MCC_EVENT_CIT                                              00000000  00105869
! MCC_EVENT_GET                                              00000000  000C86CB
! MCC_EVENT_GET                                              00000000  000C7548
! SHARE$MCC_MYMM_AM                                           
!                                                            00000000  0036798B
! SHARE$MCC_MYMM_AM                                           
!                                                            00000000  0036739C
! MCC_DISPATCH                                               00000000  0010492F
! MCC_IM                                                     00000000  000B372B
! MCC_IM                                                     00000000  000B32FF
! MCC_IM                                                     00000000  000B3255
! MCC_IM                                                     00000000  000B2CDB
! MCC_IM                                                     00000000  000B2789
! MCC_IM                                                     00000000  000B243A
! SHARE$MCC_CONTROL_FM                                           
!                                                            00000000  00361953
! MCC_DISPATCH                                               00000000  0010492F
! MCC_IM                                                     00000000  000B372B
! MCC_IM                                                     00000000  000B32FF
! MCC_IM                                                     00000000  000B3255
! MCC_IM                                                     00000000  000B2CDB
! MCC_IM                                                     00000000  000B2789
! MCC_IM                                                     00000000  000B2696
! SHARE$MCC_FCL_PM                                           
!                                                            00000000  0026A5B0
! SHARE$MCC_FCL_PM                                           
!                                                            00000000  0026B283
! SHARE$MCC_FCL_PM                                           
!                                                            00000000  00269DE8
! SHARE$MCC_FCL_PM                                           
!                                                            00000000  0026CC3E
! SHARE$MCC_FCL_PM                                           
!                                                            00000000  0026C166
! SHARE$MCC_FCL_PM                                           
!                                                            00000000  0026939C
! SHARE$MCC_FCL_PM                                           
!                                                            00000000  00267CD4
! MCC_KERNEL_PRESENTATION                                           
!                                                            00000000  000CCF74
! SHARE$MCC_MAIN                                             00000000  00001F30
! SHARE$MCC_MAIN                                             00000000  000057EB
! SHARE$MCC_MAIN                                             00000000  00005836
! SHARE$MCC_MAIN                                             00000000  000057C6
DBG> exi
T.RTitleUserPersonal
Name
DateLines
1046.1TOOK::GUERTINI do this for a living -- reallyThu May 23 1991 10:3315
    RE:.0
    
    First of all, some of the trace bits do not work, so you should not set
    all of them.  Setting the MCC_EVENT_TRACE logical to 180 will trace both
    Get and Put sides.  This should be all you need.  The others bits are for
    lower level Event Manager routines, and would not make a lot of sense to
    you anyway.  Please post the trace logs for the Get side (and the Put side
    if it isn't too much trouble).  If you are getting a CVR of Invalid
    Descriptor, it could be that the timestamp argument you are passing in
    is not a valid "time" descriptor.  Did you call mcc_time_create() to
    create it?  And please make sure that all descriptors passed in are by
    reference (pointer to the descriptor).
    
    Thanks,
    -Matt.
1046.2what about MCC_EVENT_LOG?STKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Thu May 23 1991 12:355
    RE: .1
    
    How about the MCC_EVENT_LOG logical?
    
       /N
1046.3PHONE::ALLAINThu May 23 1991 14:208
Re questions 2.

The event_data descriptor shoud be of type MMC_K_DT_ILV. Then you need to 
build the event data following the instruction for ILV encoding an event report.
That way there is nothing to do after the mcc_event_get for building the event
report as it's already done...

  
1046.4PHONE::ALLAINThu May 23 1991 14:3052
Sorry for the previous reply, this is a bit short, here is some examples...

The event_report is to be given to the mcc_event_put routine as the event_data.

I hope that helps. If you want more, just ask...


Francois


   /* create a descriptor for the Event Data */
   status = mcc_desframe_create_descriptor(
                 &(*p_context)->alloc_mem_list, /*  Memory Allocation List  */
                 &(*p_context)->event_report,    /*  Descriptor Pointer      */
                 &length,                       /*  Length                  */
                 &MCC_K_DT_ILV,                 /*  Datatype                */
                 0,                             /*  Initial Value           */
                 &MCC_K_EVENT_RECEIVED,        /*  Id                      */
                 0);                            /*  VMS datatype            */
          
      /* Begin building Rpt for Event Mgr */
      if(status == MCC_S_NORMAL)
        status = mcc_ilv_put_param_begin(&ctx, (*p_context)->event_report); 

      /* Begin Constructor, Id = Reply-Argument Id Value */
      if(status == MCC_S_NORMAL)
        status = mcc_ilv_put_cons_begin(&ctx,   &MCC_K_ARG_EVENT_REPORT,
                    MCC_K_NULL_PTR, MCC_K_NULL_PTR, &mode);

       if(status == MCC_S_NORMAL) 
         status = mcc_ilv_put_cons_begin(&ctx, &event_code,
	    MCC_K_NULL_PTR, MCC_K_NULL_PTR, &mode);



/*************************************
Insert your data here, if you want...
*************************************/



       if(status == MCC_S_NORMAL)
          status = mcc_ilv_put_cons_end(&ctx); 
 
      /* End Constructor */
      if(status == MCC_S_NORMAL)
         status = mcc_ilv_put_cons_end(&ctx);

      /* End building attr Output */
      if(status == MCC_S_NORMAL)
        status = mcc_ilv_put_param_end(&ctx, (*p_context)->event_report);

1046.5RE:.2... $ DEFINE MCC_EVENT_LOG 1TOOK::GUERTINI do this for a living -- reallyThu May 23 1991 15:181
    
1046.6still probl with MCC_K_DT_ILVSTKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Thu May 23 1991 15:535
    repl .3
    
    I've created a descriptor of type MCC_K_DT_ILV for the event-data
    argument in the call to MCC_EVENT_GET but I still get the
    INVALID-STRING-DESCRIPTOR status returned.
1046.7log from MCC_EVENT_GETSTKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Thu May 23 1991 16:0061
repl .1
    
    
Below you'll find the log from the GETEVENT-side.  Next reply is from
the PUTEVENT-side.

I've defined MCC_EVENT_LOG to 1 and MCC_EVENT_TRACE to 180
It seems to me that the descriptor for the eventdata is invalid?
If so, how should  I create it?  Should I really create it if using
    the out_p argument from the argumentlist to the getevent-
    entrypointroutine? 

     /Nils
======================================================================
DECmcc (V1.1.0)
MCC> getevent mymm * any events


Tracing error paths in Event Manager
Tracing Event code path in GET
Tracing Event code path in PUT
Event_Get starting
Event_Get processing Partition argument
Event_Get Input Arguments ...
  in_entity = 
        entity [0] wild = INSTANCE_FULL class = 700
  Partition = 15
  Filter = MCC_K_NULL_PTR
  time_spec = MCC_K_NULL_PTR
        Handle context not set up yet
Event_Get handle state = MCC_K_HANDLE_FIRST
Event_Get building a PRMB for this request
Event_Get creating a Heartbeat thread for this request
Event_Get setting the Heartbeat thread-id 1000A
Event_Get creating TimeStamps
Event_Get requesting NEXT event
Going to wait for the event now...
Event_Get was Signalled
Copying Event Data to user supplied buffers
Failed to copy Event Data Storage:
%MCC-E-INV_DESC, invalid string descriptor encountered
THUMP!
Failed to dequeue event:
%MCC-E-NOMOREVT, no more events in event queue
Get Event failed to copy event data:
%MCC-E-INV_DESC, invalid string descriptor encountered


==> After MCC_EVENT_GET call:                      <--- output from my AM
==> error: status = 52874802
==> call to MCC_ILV_DUMP  on event_data:   --

 NULL 
==> Call to MCC_AES_DUMP on out_entity
                                                   <--- this is the entity
						        sent into MCC_EVENT_PUT
        entity [0] wild = NOT_WILD class = 700 id = 1717 type = 3
        instance = ABCD
%MCC-E-INV_DESC, invalid string descriptor encountered


1046.8log from MCC_EVENT_PUTSTKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Thu May 23 1991 16:02128
    repl .1
    
    
Below you'll find the log from the PUTEVENT-side.  The funny thing about the
MCC_EVENT_PUT is that it produces different results depending on if there's 
any outstanding event-requests or not.

I've defined MCC_EVENT_LOG to 1 and MCC_EVENT_TRACE to 180

First a log when there's NO request for an event and after when there 
is an outstanding request  (some 60 lines below...)

$ run putevent

Tracing error paths in Event Manager
Tracing Event code path in GET
Tracing Event code path in PUT
Event_Put starting
Event_Put processing Partition argument
Event_Put Input Arguments ...
        entity [0] wild = NOT_WILD class = 700 id = 1717 type = 3
        instance = ABCD
  Partition = 15
  Event Code = 771
  Event Data =

Dump of MCC Descriptor reveals:
    mcc_w_maxstrlen = 54460
    mcc_w_curlen    = 15
    mcc_b_flags     = 0
    mcc_b_ver       = 0
    mcc_l_id        = 2151508
    mcc_a_pointer   = ...............
    %X000000000000000000000000000000
    mcc_a_link      =

    mcc_w_maxstrlen = 16
    mcc_b_dtype     = DSC_K_DTYPE_T
    mcc_b_class     = DSC_K_CLASS_D
    mcc_w_curlen    = 16
    mcc_b_flags     = 0
    mcc_b_ver       = 1
    mcc_l_id        = 0
    mcc_l_dt        = MCC_K_DT_BIN_ABS_TIM
    mcc_a_pointer   = �.�.!.�.......<.
    %XC091EA032119CA01FFFFFFFFFFFF3C10
    mcc_a_link      = MCC_K_NULL_PTR
  Timestamp =  23-MAY-1991 19:41:32.38
Event_Put getting current time
Event_Put converting user supplied time into BAT
Event_Put building an EDS structure to store Event Data
Event_Put creating an AHS
Event_Put Locking Subscriber structures
Event_Put Subscriber searching for first(/next) matching request
Event_Put Subscriber Handle state = MCC_K_HANDLE_MORE
Event_Put Subscriber Locking RMBs
Event_Put Subscriber found Request marked for Delete
Event_Put Subscriber Unlocking RMBs
Event_Put Subscriber searching for first(/next) matching request
Event_Put Subscriber Handle state = MCC_K_HANDLE_FIRST
Event_Put Subscriber finished matching requests
Event_Put Unlocking Subscriber structures
Event_Put cleaning up
Failed to free descriptor in EDS:
%MCC-E-INV_DESC, invalid string descriptor encountered
Error Deleting Event Data in Event Put:
%MCC-E-INV_DESC, invalid string descriptor encountered



=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
and now when there's an outstanding event-request

$ run putevent

Tracing error paths in Event Manager
Tracing Event code path in GET
Tracing Event code path in PUT
Event_Put starting
Event_Put processing Partition argument
Event_Put Input Arguments ...
        entity [0] wild = NOT_WILD class = 700 id = 1717 type = 3
        instance = ABCD
  Partition = 15
  Event Code = 771
  Event Data =

Dump of MCC Descriptor reveals:
    mcc_w_maxstrlen = 54460
    mcc_w_curlen    = 15
    mcc_b_flags     = 0
    mcc_b_ver       = 0
    mcc_l_id        = 2151508
    mcc_a_pointer   = ...............
    %X000000000000000000000000000000
    mcc_a_link      =

    mcc_w_maxstrlen = 16
    mcc_b_dtype     = DSC_K_DTYPE_T
    mcc_b_class     = DSC_K_CLASS_D
    mcc_w_curlen    = 16
    mcc_b_flags     = 0
    mcc_b_ver       = 1
    mcc_l_id        = 0
    mcc_l_dt        = MCC_K_DT_BIN_ABS_TIM
    mcc_a_pointer   = .s.!.�.......<.
    %X00BE73902119CA01FFFFFFFFFFFF3C10
    mcc_a_link      = MCC_K_NULL_PTR
  Timestamp =  23-MAY-1991 19:45:28.16
Event_Put getting current time
Event_Put converting user supplied time into BAT
Event_Put building an EDS structure to store Event Data
Event_Put creating an AHS
Event_Put Locking Subscriber structures
Event_Put Subscriber searching for first(/next) matching request
Event_Put Subscriber Handle state = MCC_K_HANDLE_MORE
Event_Put Subscriber Locking RMBs
Event_Put Subscriber found Request for NEXT Event
Event_Put Subscriber referencing Event Data
Event_Put Subscriber building a Event Data Queue Element
Event_Put Subscriber sending an Event to a Requestor
Event_Put Subscriber Unlocking RMBs
Event_Put Subscriber searching for first(/next) matching request
Event_Put Subscriber Handle state = MCC_K_HANDLE_FIRST
Event_Put Subscriber finished matching requests
Event_Put Unlocking Subscriber structures
Event_Put cleaning up
    
1046.9Wrong side...PHONE::ALLAINThu May 23 1991 16:278
reply .6

What I was describing in the notes .3 and .4 is the putevent side. You
build the right event_data on the putevent side and then on the getevent side,
you just need to call mcc_event_get with  p_callargs->p_out_p as the event_data 
argument, and every thing shoud be OK.

Francois
1046.10Try setting the mcc_b_ver field to 1TOOK::GUERTINI do this for a living -- reallyThu May 23 1991 16:463
    MCC descriptor have a version number of 1.
    
    -Matt.
1046.11a_link is null?TOOK::CALLANDERThu May 23 1991 16:520
1046.12Another bad field in the descriptorTOOK::GUERTINI do this for a living -- reallyThu May 23 1991 16:562
    Good point Jill.  The mcc_a_link field should be set to MCC_K_NULL_PTR.
    -Matt.
1046.13How I do itSTKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Fri May 24 1991 05:32126
repl .4

   That's how I've done it (I think...) and I still don't get it to work.
I must be missing something obvious.  I'm attaching the PUTEVENT-program
hoping for some clarification.

   /Nils

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
#include ...      /* necessary includefiles  */

main ()
{
    unsigned long int  status	       = MCC_S_NORMAL		;
    unsigned long int  *alloc_mem_list = MCC_K_NULL_PTR		;
    unsigned long      mode	       = MCC_K_ILV_NATIVE_VALUE ;
    unsigned long int  systime[2];
    MCC_T_Descriptor   *time_stamp     = MCC_K_NULL_PTR		;
    MCC_T_Descriptor   *instance       = MCC_K_NULL_PTR		; 
    MCC_T_Descriptor   *event_report   = MCC_K_NULL_PTR		;
    MCC_T_Descriptor   *arg_desc       = MCC_K_NULL_PTR		;
    MCC_A_AES          entity          = MCC_K_NULL_PTR		;
    MCC_T_UNSLONG      event_partition = MCC_K_PRT_CONFIGURATION_EVENTS;
    MCC_T_UNSLONG      event_code      = MCC_K_MYMM_TESTEVENT_SYMBOL   ;
    char	       entity_name[]   = "ABCD" 		; 
    char	       event_data[]    = "JUST AN EVENT-REPORT" ;
    unsigned short int length	        			;
    unsigned short int eventlength     = 128			;
    struct MCC_R_ILV_CONTEXT  ctx				;

    /*    init mem mgmt service    */
    status = mcc_desframe_init_alloc_list( &alloc_mem_list );

    /* create fake entity      */
    length = strlen(entity_name);
    if(status == MCC_S_NORMAL)
        status = mcc_desframe_create_descriptor( 
			&alloc_mem_list,  &instance,  &length,
			&MCC_K_DT_LATIN1STRING,  &entity_name,
			&1717,  MCC_K_NULL_PTR);

    if(status == MCC_S_NORMAL)
	status = mcc_aes_create( &entity,   &MCC_K_CLASS_MYMM,
				 instance,  &MCC_K_AES_NOT_WILD);
    /* create event report  */
    if(status == MCC_S_NORMAL)
        status = mcc_desframe_create_descriptor(
			 &alloc_mem_list,  &event_report,
			 &eventlength,  &MCC_K_DT_ILV,
			 0,  &MCC_K_MYMM_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_MYMM_EVENT_REPORT,
					 MCC_K_NULL_PTR,  MCC_K_NULL_PTR,
					 &mode);

    if(status == MCC_S_NORMAL)
         status = mcc_ilv_put_cons_begin( &ctx,  &event_code, 
	 				  MCC_K_NULL_PTR,  MCC_K_NULL_PTR,
					  &mode);

    /*
    ** create descriptor for event_data
    ** and insert it into event_report
    */
    length = strlen(event_data);
    if(status == MCC_S_NORMAL)
        status = mcc_desframe_create_descriptor(
				&alloc_mem_list,  /*  Memory Allocation List */
				&arg_desc, 	  /*  Descriptor Pointer     */
				&length,	  /*  Length                 */
				&MCC_K_DT_LATIN1STRING,	/*  Datatype	     */
				&event_data,		/*  Initial Value    */
				&1,		  /*  Id                     */
				&DSC_K_DTYPE_T);  /*  VMS datatype           */

    
    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 );

    /*
    ** create timestamp with current time
    */
    status = sys$gettim(systime);
    status = mcc_time_create(&time_stamp, &MCC_K_DT_UNSIGNED64, 0, systime);

    /*
    ** dump event-data
    */
    if(status == MCC_S_NORMAL)
        mcc_ilv_dump( event_report );

    /*
    ** deliver event...
    */
    if(status == MCC_S_NORMAL)
        status = mcc_event_put( entity,
				&event_partition,
				&event_code,
				&event_report,
				time_stamp);


    if (status == MCC_S_NORMAL)
        printf ("   ===> PUTEVENT; Successful completion!\n");
    else if (status == MCC_S_NOEVENTREQ)
        printf ("   ===> PUTEVENT; no event request outstanding!\n");
    else  
        printf ("   ===> PUTEVENT; error!  status = %d\n", status);

    sys$exit( status );

} /* main */

1046.14what a difference a '&' can make!STKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Fri May 24 1991 06:1911
    Why do it right when it can be done the wrong way.....?
    
    I've declared event_report as a POINTER to MCC_T_Descriptor and
    as that it should be passed to MCC_EVENT_PUT; not as an ADDRESS to a
    pointer to a MCC_T_Descriptor.  So now I got that part to work.
    
    Thanks everyone for the help.  Now I've only the rest to do....
    
         /Nils
    
    
1046.15Please do not use VMS routines, such as sys$getimNANOVX::ROBERTSKeith Roberts - DECmcc Toolkit TeamFri May 24 1991 09:5335
RE: .13

In your coding example I *strongly* suggest that you do not use any VMS
system calls - ie:

    status = sys$gettim(systime);
    status = mcc_time_create(&time_stamp, &MCC_K_DT_UNSIGNED64, 0, systime);

Instead, you should use 'mcc_time_get_current' ...

----------------------------------------------------------------------------

    MCC_T_CVR               status;
    MCC_T_UNSLONG           binary_abs_time = MCC_K_DT_BIN_ABS_TIM;
    MCC_T_Descriptor       *p_time_stamp;

    status = mcc_time_create(
      &p_time_stamp,                 /*  Pointer to Time Stamp Descriptor */
      &binary_abs_time,              /*  Binary Absolute Time Datatype    */
      MCC_K_NULL_PTR,                /*  Initial Time Length:  n/a        */
      MCC_K_NULL_PTR );              /*  Initial Time Value:   n/a        */

    status = mcc_time_get_current(
      p_time_stamp );                /*  Address of Time Stamp Descriptor */

----------------------------------------------------------------------------

!!! and don't forget to delete the descriptor when your done with it:

    status = mcc_time_delete(
      &p_time_stamp );


Keith Roberts
DECmcc Toolkit
1046.16more problems...STKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Fri May 24 1991 11:5632
    RE: .15
    
    I'll change the codepart with sys$gettim.   /Thanks
    
    
    Now to another thing:
    
    When I do a "GETEVENT myMYMM ANY EVENTS"  and at the putevent-side I
    create an entity  instance = ABCD, class=MYMM, id=1, type=4
    everything works fine at the EVENT_GET-side but if I do a
    "GETEVENT MYMM ABCD ANY EVENTS" and the same thing on the putevent-side
    I don't get any event, and the MCC_EVENT_PUT returns with a "no
    outstanding requests".
    When I do a call to MCC_AES_DUMP of in_entity at the getevent-side I
    get the following output:
    
         entity [0]  wild = NOT_WILD  class = 700  id = 1  type = 4     
         instance = ..ABCD  
         %X010441424344
    
    and on the putevent-side the same except for:
    
         instance = ABCD
    
    I.E.  not the two periods and no hex-number
    
    Is this correct and can anyone explain why the event doesn't get passed
    in the latter case?.
    
    Thanks,
    
       Nils
1046.17One's a simple name, the other isn'tTOOK::GUERTINI do this for a living -- reallyFri May 24 1991 12:459
    The Event Manager does not consider the Entities to a match unless they
    *exactly* match.  In your case, the two bytes in front of the value
    indicate that the value is a simple name.  Simple names are not that
    simple.  They have a simple name type as the first byte and a simple
    name length as the second byte.  The Putter is not building the simple
    name identifier correctly.  Look in the MCC_INTERFACE_DEF.H file for
    the simplename structure and possible field values (defined as constants).
    
    -Matt.
1046.18I must be stupid, don't understand!!STKHLM::BERGGRENNils Berggren EIS/Project dpmt, Sweden DTN 876-8287Fri May 24 1991 15:0115
    repl .17
    
    don't understand.  What I do is :
    first create a descriptor of type MCC_K_DT_SIMPLE_NAME and 
    initialvalue of "ABCD". And than I use that descriptor when 
    calling MCC_AES_CREATE.  As I understand, that's the
    way to do it, but I guess I've missed something, again....
    The code provided for PUTEVENT in an earlier reply is not 
    what I describe here, but this is the way it is done now.
    
    Can You provide me with an example on how to do it?
    
       Thanks alot,
    
     Nils
1046.19string vs. simple nameTOOK::CALLANDERFri May 24 1991 16:314
"abcd" is a string of characters, a simple name is more than that. There
is a routine mcc_dns_opaque_simplename that will convert the string
"abcd" into the internal format (that .17 was describing) that you want
to use when creating your AES spec.
1046.20What about ...TOOK::GUERTINI do this for a living -- reallyFri May 24 1991 16:3922
    RE:.18
    
    How about
    
    char entity_name[] = "  ABCD";
    
    entity_name[0] = MCC_K_SN_NORMAL;
    entity_name[1] = sizeof entity_name - 2;
    
    Even better would be:
    
    MCC_T_SimpleName entity_name;
    
    entity_name.sn_b_type = MCC_K_SN_NORMAL;
    entity_name.sn_b_count = sizeof "ABCD";
    strncpy( &entity_name.sn_b_sting[0], "ABCD", sizeof "ABCD" );
    
    but note that the size of the value that the descriptor points to
    is 6 bytes, i.e., 4 bytes plus 2 of overhead (mcc_w_curlen should = 6).
    
    -Matt.