[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

1096.0. "MCC_S_INV_ENTITY in mcc_dict_build_spec" by PHONE::ALLAIN () Wed Jun 05 1991 10:35

Hi everybody,

I'm getting an MCC_S_INV_ENTITY and I don't know how to fix it:

The call to mcc_dict_build_spec returns me a MCC_S_INV_ENTITY status. 

Does someone have any idea about this?

I enclosed the piece of code at the end of the note. I'm trying to get the name
of the class from its code, and to use the mcc_dict_translate_name_code seems to 
be the way of doing this... But for that, I need to build a dict_spec...

Thanks

Francois


PS: The p_callargs->p_in_entity must be good because I can use it for getting 
the name of the instance of my entity, so I think the probleme is around this
dict_spec...


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


MCC_A_AES                       dict_spec = MCC_K_NULL_PTR;
MCC_T_Descriptor                *temp_desc = MCC_K_NULL_PTR;


status = mcc_desframe_create_descriptor(
                                &(*p_context)->alloc_mem_list,
                                &temp_desc,
                                &sizeof (MCC_T_Integer32),
                                &MCC_K_DT_INTEGER32,
                                0,
                                0,
                                &DSC_K_DTYPE_L);

printf("\n St = %d", status);

temp_desc->mcc_a_pointer = &class_code;
status = mcc_dict_build_spec (  p_callargs->p_in_entity,
                                                &dict_spec,
                                                0,
                                                temp_desc);
printf("\n St  = %d", status);


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
       
T.RTitleUserPersonal
Name
DateLines
1096.1For what it's worth...TOOK::GUERTINI do this for a living -- reallyWed Jun 05 1991 12:086
    Although I can't see anything wrong with the entity specs, the
    arguments look a little funny to me.  How can you have a NULL class
    with an instance?  Did you try specifying a dictionary class? (Or
    passing in a NULL for the instance as well.)
    
    -Matt.
1096.2MCC_S_NOENTITY now...PHONE::ALLAINWed Jun 05 1991 13:1044
OK, I thought I tried it, but obviously not, because it works now!

Thank you. 
I have a problem now for the next call.... If you had an idea, that would be 
great...

Here is my code (updated with MCC_K_DICT_CLASS...):

                status = mcc_desframe_create_descriptor(
                                &(*p_context)->alloc_mem_list,
                                &temp_desc,
                                &sizeof (MCC_T_Integer32),
                                &MCC_K_DT_INTEGER32,
                                &class_code,
                                0,
                                &DSC_K_DTYPE_L);

                status = mcc_dict_build_spec (  p_callargs->p_in_entity,
                                                &dict_spec,
                                                &MCC_K_DICT_CLASS,
                                                temp_desc);

                status = mcc_desframe_create_descriptor(
                                &(*p_context)->alloc_mem_list,
                                &ev_src_obj_class_desc,
                                &100,
                                &MCC_K_DT_INTEGER32,
                                &class_code,
                                0,
                                0);

                status = mcc_dict_translate_name_code (
                                        dict_spec,
                                        ev_src_obj_class_desc,
                                        0);

And the call to mcc_dict_translate_name_code returns me a MCC_S_NOENTITY status.

Any idea about this?

Thanks in advance

Francois
                                                          
1096.3what are you doing?TOOK::CALLANDERJill Callander DTN 226-5316Wed Jun 05 1991 13:1420
if you have a valid in_e and what to create a dict spec, simply
call the build_dict_spec with the in_e. That will convert:

	in_e				dict_spec
class: your entity class	class: mcc_k_dict_class
instanse: your instance		instance: your entity class



MCC_A_AES                       dict_spec = MCC_K_NULL_PTR;

status = mcc_dict_build_spec (  *p_callargs->p_in_entity,         >>>> see **
                                                &dict_spec,
                                                MCC_K_NULL_PTR,
                                                MCC_K_NULL_PTR);

** I am not sure how p_callargs->p_in_entity is defined but the dict_build_spec
says that the first argument is an MCC_A_AES passed by value, not by reference.
Please check to see if an "*" is needed here.

1096.4what are you doing?TOOK::CALLANDERJill Callander DTN 226-5316Wed Jun 05 1991 13:1420
1096.5call mcc_aes_dumptTOOK::CALLANDERJill Callander DTN 226-5316Wed Jun 05 1991 13:173
put in a debug call to mcc_aes_dump (I think it is in the vector file
so you should be able to get at it), and see what the contents of
the dict spec look like.
1096.6Waouh!!!PHONE::ALLAINWed Jun 05 1991 13:3225
This is the dump of my dict_spect  


     entity [0] wild = NOT_WILD class = 1 id = 0 type = 35
        instance = �...
        %XE9030000
        entity [1] wild = NOT_WILD class = 2 id = 0 type = 35
        instance = �...
        %XF9030000
        entity [2] wild = NOT_WILD class = 1 id = 0 type = 31
        instance = �...
        %XF9030000


This the way I call the dump:

                status = mcc_aes_dump (dict_spec);
                printf("\n St 12.8 = %d", status);

This the status I get from the dump..., but i couldn't find it in the library!

 St 12.8 = 704524


Does that look good?
1096.7mcc_aes_dump is declared voidTOOK::KOHLSRuth KohlsWed Jun 05 1991 13:5012

>This the way I call the dump:
>
>                status = mcc_aes_dump (dict_spec);
>                printf("\n St 12.8 = %d", status);
>
 don't bother with the status of mcc_aes_dump.  Its declared void.
The dump looks similar to other aes dumps.  I didn't look to see if I could
tell if it was what you wanted, though.

Ruth
1096.8OkPHONE::ALLAINWed Jun 05 1991 15:0511
Ok, i removed (set it to MCC_K_NULL_PTR...) the last 2 parameters of my 
build_spec call, and everything is solved... You were right Jill. Thanks a lot.

The only thing is that I tried to append something at the end of the dict_spec
because I missunderstood the SRM for the mcc_dict_translate_name_code routine...

Sorry about this.

Thanks to everybody.

Francois
1096.9call is fine, spec is badTOOK::CALLANDERJill Callander DTN 226-5316Wed Jun 05 1991 15:0831

     entity [0] wild = NOT_WILD class = 1 id = 0 type = 35
        instance = �...
        %XE9030000
        entity [1] wild = NOT_WILD class = 2 id = 0 type = 35
        instance = �...
        %XF9030000
        entity [2] wild = NOT_WILD class = 1 id = 0 type = 31
        instance = �...
        %XF9030000


the types (mcc_k_dt) are in mcc_interface_def.h as well as the classes 
(mcc_k_dict).

 type 35 = unsigned32
 type 31 = interger32 (not the same thing)

 class 1 = mcc_k_dict_class (for use in GLOBALS only!!, see your third level)
 class 2 = mcc_k_dict_subclass

Now note that you have id=0 all the way down, that is right, but the instance
should have the codes associated with the request. Like the first one,
is your class code really %XE903? or is that the name? Note that translate
name requires you use a dt of latin1string or unsiged32 on the last 
instance to determine what to translate from/to. BTW: I have only ever
used the translate to translate the last item on the AES, it looks like
you are trying to do the whole thing, I will ask Matt if that is possible
(SRM implies it is).