[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

1073.0. "MCC-E-NOENTITY when building an event report..." by PHONE::ALLAIN () Thu May 30 1991 14:53

Hi,

I'm triyng to build an event like this:

                EVENT addValue Event = 01 :
                        DISPLAY = TRUE,
                        SYMBOL = ADDVALUE_EVENT,
                        TEXT = " addVAlue Event Text.",
                        ARGUMENT Ent Inst Name = 01 : Latin1String
                                DISPLAY = TRUE,
                                SYMBOL = EV_1_ENT_INST_NAME
                        END ARGUMENT Ent Inst Name;
                END EVENT addValue Event;


This is what I get from the Ilv dump call just after building the event data
in the put event stuff:


[  1 ] (
    [  1 ] (
            [  143 ]             66 69 6c 73  -- fils
            )
        )
    )

This is the response of my get event stuff:

CMEAGT NMF_NS:.papa TESTOBJ "fils"
AT 30-MAY-1991 12:56:24 Any Event

Getevent Successful

%MCC-E-NOENTITY,  no corresponding entity instance exists
MCC>


>>>>>>>>>>>>>>
                  
 
1- I don't understand what this 143 code is.

2- Does someone know why I get this response from the getevent part? (It
already worked fine for an attribute of data type Enumeration, and I
didn't change it all...)

3- I think that what I'm trying to do is pretty close to what the commnon
exception Unknown Entity does. Are the source code for this common exception
available as examples?

>>>>>>>>>>>>>>>


Thanks for your help.
Francois.

######       This is my put_event stuff for building the event_data:

status = mcc_ilv_put_param_begin (
                        &put_ctx,
                        (*p_context)->Ev_report_desc);

status = mcc_ilv_put_cons_begin(
                        &put_ctx,
                        &MCC_K_ARG_EVENT_REPORT,
                        MCC_K_NULL_PTR,
                        MCC_K_NULL_PTR,
                        &MCC_K_ILV_NATIVE_VALUE);

status = mcc_ilv_put_cons_begin(
                        &put_ctx,
                        &(*p_context)->event_code,
                        MCC_K_NULL_PTR,
                        MCC_K_NULL_PTR,
                        &MCC_K_ILV_NATIVE_VALUE);


status = mcc_desframe_create_descriptor(
          &(*p_context)->alloc_mem_list,    /*  Memory Allocation List  */
          &attr_desc,                      /*  Descriptor Pointer      */
          &1024,
          0,
          0,
          &1,
          &DSC_K_DTYPE_Z);

status = mcc_aes_get (&p_callargs->p_in_entity, &1,
                             &class_code, attr_desc, MCC_K_NULL_PTR);

status = mcc_ilv_put (&put_ctx, attr_desc, 0);

status = mcc_ilv_put_cons_end(&put_ctx);

status = mcc_ilv_put_cons_end(&put_ctx);

status = mcc_ilv_put_param_end (
                        &put_ctx,
                        (*p_context)->Ev_report_desc);

mcc_ilv_dump ((*p_context)->Ev_report_desc);
    
T.RTitleUserPersonal
Name
DateLines
1073.1ilv construct seems wrongTOOK::CALLANDERJill Callander DTN 226-5316Thu May 30 1991 15:5316
your construct:



[  1 ] (
    [  1 ] (
            [  143 ]             66 69 6c 73  -- fils
            )
        )
    )

shows the put param, and the first put cons. But the second put cons
seems to have entered garbage, event  the (())) dont line up correctly.

I would check the contents of your p_context to see what is in there.

1073.2PHONE::ALLAINThu May 30 1991 15:5512
Sorry, this is a mistake using cut and paste...

Here is my ilv_dump


[  1 ] (
    [  1 ] (
        [  1 ] (
            [  143 ]             66 69 6c 73  -- fils
            )
        )
    )
1073.31 1 1 looks okayTOOK::CALLANDERJill Callander DTN 226-5316Thu May 30 1991 17:4210
alright, with the new ILV things do look better. This brings us to the
statement:



	status = mcc_ilv_put (&put_ctx, attr_desc, 0);

This is where the 143 is coming from. You w will have to check out
the argument values you are using here.

1073.4Am I right?PHONE::ALLAINFri May 31 1991 11:0929
status = mcc_desframe_create_descriptor(
          &(*p_context)->alloc_mem_list,    /*  Memory Allocation List  */
          &attr_desc,                      /*  Descriptor Pointer      */
          &1024,
          0,
          0,
          &1,
          &DSC_K_DTYPE_Z);

[  1 ] (
    [  1 ] (
        [  1 ] (
            [  143 ]             66 69 6c 73  -- fils
            )
        )
    )

I thought this &1 (the 6th argument) was the code which should appear instead
of this 143, I don't understand. 
My put_ctx already worked with another argument... 
I think that datatype and value fields are filled by the mcc_aes_get routine. 
When I check the type of my attr_desc I get code 3 which is MCC_K_DT_LATIN1STRING
And 'fils' is the instance I'm desesperatly trying to get...

This 143 is a mystery for me.


Francois.
1073.5I got this problem when I try to use Latin1string...,PHONE::ALLAINFri May 31 1991 12:0111
I think that I got this problem when I use Latin1String, because, I've done the
same thing with Integer32 and it works!

I'm wondering if mcc_desframe_create_descriptor works the way I think it works:

Is really the id code (the 6th argument) the one which should correspond to
the code of the event parameter in the MSL?

thanks

Francois
1073.6The DesFrame Create Descriptor routineNANOVX::ROBERTSKeith Roberts - DECmcc Toolkit TeamFri May 31 1991 16:5153
Hi Francois,

I just check the code for the Design Framework, and you have the
arguments positioned correctly; that is:

mcc_desframe_create_descriptor(
  **memory_list,
  **descriptor,
   *length,
   *mcc_datatype,
   *value,
   *id,
   *vms_datatype );

The descriptor created for you should contain:

  o  a buffer of 1024 bytes
  o  a '0' for the MCC datatype
  o  no initial value
  o  a '1' for the Id
  o  'dtype_z' value for the vms datatype

I'm sure if you exam the descriptor after calling create_descriptor
this is what you'll see.

After the call to 'mcc_aes_get' the descriptor will contain the values
from the Entity Specification.  The fields updated by aes_get are:

  o  mcc_w_curlen
  o  mcc_l_id
  o  mcc_l_dt
  o  mcc_a_pointer (that is,the buffer pointed to by this field)

The only thing I can think of is the 'id' field in the Entity
Specifiation is '143'

In-Entity is built by the FCL from information from the 
Dictionary ... what is the Identifier Attribute code for the Entity?

Remember too, the 'mcc_aes_get' level argument begins at 0.  0 is the
global entity class, 1 is the first child entity class, ...

Unless you only need/want a latin1string in your event, you can use
the full entity (ie, in-entity) as an event argument (so long as you
define this in the MSL)

Also, in 1073.0 - you show some coding examples .. but are you checking
the status from each call?  Could you have got an error from aes_get?

Hope this helps,

Keith Roberts
DECmcc Toolkit Team
1073.7mcc_l_idPHONE::ALLAINFri May 31 1991 17:4436
Thanks Keith for the explanation.

You're right for the '143': Here is my Specification:
       

	IDENTIFIER ATTRIBUTES
             ATTRIBUTE toID = 143 : Latin1String
                ACCESS = NONSETABLE,
                DISPLAY = TRUE,
                SYMBOL = ATTR_TOID,
                DEFAULT = "0",
                CATEGORIES = ( CONFIGURATION )
             END ATTRIBUTE toID;

             ATTRIBUTE objectClass = 101 : Latin1String
                ACCESS = NONSETABLE,
                DISPLAY = TRUE,
                SYMBOL = ATTR_OBJECTCLASS,
                CATEGORIES = ( CONFIGURATION )
             END ATTRIBUTE objectClass;

       END ATTRIBUTES; (* IDENTIFIER *)

I only need a Latin1String for my event argument.

There a status checking after each call in my code, so I know there is no error
from the aes_get.

From your explanation I guess what I need to do is to force the mcc_l_id
to the value I want (the code of my event parameter) ""after"" the call to 
the aes_get? That way, the mcc_l_id of the descriptor and the code of my 
parameter will match...

Am I right, or is there something I'm missing?

Francois
1073.8you understood him.TOOK::CALLANDERJill Callander DTN 226-5316Fri May 31 1991 18:171
change the ild, and make sure the dt is correct, and the a_link is null.
1073.9Fine...PHONE::ALLAINFri May 31 1991 18:205
I was trying this, and it works fine...

Thanks Jill and Keith

Francois.
1073.10Would that be the cleanest way of doing this:PHONE::ALLAINFri May 31 1991 18:3727
status = mcc_desframe_create_descriptor(
          &(*p_context)->alloc_mem_list, 
          &desc_NUMBER_1,                     
          &1024,
          0,
          0,
          0,
          0);

status = mcc_aes_get (&p_callargs->p_in_entity, &1,
                             &class_code, desc_NUMBER_1, MCC_K_NULL_PTR);

status = mcc_desframe_create_descriptor(
          &(*p_context)->alloc_mem_list, 
          &desc_NUMBER_2,                     
          0,
          &MCC_K_DT_LATIN1STRING,
          desc_NUMBER_1->mcc_a_pointer,
          &MCC_K_ARG_MY_PARAMETER_CODE
          &DSC_K_DTYPE_Z );

status = mcc_ilv_put (&put_ctx, desc_NUMBER_2, 0);

Is it the right (clean) way of doing what I wanna do?

Francois
1073.11Simpler is betterNANOVX::ROBERTSKeith Roberts - DECmcc Toolkit TeamMon Jun 03 1991 09:1330
I would :

	o Create the Descriptor
	o Call mcc_aes_get
	o Set the mcc_l_id field of the Descriptor
	o (May have to set datatype if it isn't what you want from the aes_get)
	o Call mcc_ilv_put

No need to create a new descriptor

/keith

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

status = mcc_desframe_create_descriptor(
          &(*p_context)->alloc_mem_list, 
          &desc_NUMBER_1,                     
          &1024,
          0,
          0,
          0,
          0);

status = mcc_aes_get (&p_callargs->p_in_entity, &1,
                             &class_code, desc_NUMBER_1, MCC_K_NULL_PTR);

desc_NUMBER_1->mcc_l_id = MCC_K_ARG_MY_PARAMETER_CODE;
desc_NUMBER_1->mcc_l_dt = MCC_K_DT_LATIN1STRING;

status = mcc_ilv_put (&put_ctx, desc_NUMBER_1, 0);
1073.12Ok!PHONE::ALLAINMon Jun 03 1991 11:123
Thanks, I'll do it the way you suggest.

Francois.