[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

1570.0. "Reading dictionary defaults and partitions?" by RIVAGE::SILVA (Carl Silva - Telecom Eng - DTN 828-5339) Tue Oct 01 1991 10:59

	Has anyone written an example to read the default value for an
attribute from the dictionary?  Also, how can I read all the attribute IDs for
a given parition?

	Carl
T.RTitleUserPersonal
Name
DateLines
1570.1TOOK::SWISTJim Swist LKG2-2/T2 DTN 226-7102Tue Oct 01 1991 11:2821
    The call you want is mcc_dict_get_def_info, if you need an example,
    send mail and I'll dig one up, the trickiest part is getting the
    dictionary aes right.  In you first example you want...
    
    <mcc_k_dict_class, class id>
       <mcc_k_dict_subclass..... (if any)>,
           <mcc_k_dict_attribute, attr code>,
               <mcc_k_dict_definition, mcc_k_dd_default_value >
    
    Your second example requires the attribute_list definition on the
    partition in question so the aes is....
    
    <mcc_k_dict_class, class id>
       <mcc_k_dict_subclass..... (if any)>,
           <mcc_k_dict_attribute_partition, partition code>,
               <mcc_k_dict_definition, mcc_k_dd_attribute_list >
    
    In the latter case, the attrlib list is returned as an array of
    unsigned long attribute codes.
    
    
1570.2Getting warmer...RIVAGE::SILVACarl Silva - Telecom Eng - DTN 828-5339Tue Oct 01 1991 12:5732
	RE: .1,

	Thanks for the help!!

>    The call you want is mcc_dict_get_def_info, if you need an example,
>    send mail and I'll dig one up, the trickiest part is getting the
>    dictionary aes right.  In you first example you want...

	Yes, I have an example of using mcc_dict_get_def_info.

>    <mcc_k_dict_class, class id>
>       <mcc_k_dict_subclass..... (if any)>,
>           <mcc_k_dict_attribute, attr code>,
>               <mcc_k_dict_definition, mcc_k_dd_default_value >

	I used MCC_K_DD_VALUE_DEFAULT but I get NOENTITY.
    
>    Your second example requires the attribute_list definition on the
>    partition in question so the aes is....
>    
>    <mcc_k_dict_class, class id>
>       <mcc_k_dict_subclass..... (if any)>,
>           <mcc_k_dict_attribute_partition, partition code>,
>               <mcc_k_dict_definition, mcc_k_dd_attribute_list >
>    
>    In the latter case, the attrlib list is returned as an array of
>    unsigned long attribute codes.

	OK, I tried this but I only got 1 attribute out of the partition.  Do I
have to do multiple dict accesses using a handle to get all the attribute IDs?

	Carl
1570.3TOOK::SWISTJim Swist LKG2-2/T2 DTN 226-7102Tue Oct 01 1991 13:2015
    1) Check with dap that the definition is there and that the codes you
    are using are correct.  Each entity level instance descriptor should
    be of datatype UNSIGNED32.
    
    2) The definition rec returned should have count set to the number of
    elements in the array and the 2nd and subsequent values should follow
    the first.  Make sure your buffer is big enough.  Again check with dap
    to make sure of what's in the dict.   BTW, DAP does a
    mcc_dict_get_def_info just like you do.
    
    3) If all else fails, try something simpler.  All dict objects have
    at least an MCC_K_DD_PRESENTATION_NAME definition.  So try retrieving
    that for just the class, then add the subclass, then add the attribute,
    etc.   (This advice is for case #1).
    
1570.4Thanks Jim!!!RIVAGE::SILVACarl Silva - Telecom Eng - DTN 828-5339Tue Oct 01 1991 14:2226
	RE: .3,

>    1) Check with dap that the definition is there and that the codes you
>    are using are correct.  Each entity level instance descriptor should
>    be of datatype UNSIGNED32.

	OK, did this!
    
>    2) The definition rec returned should have count set to the number of
>    elements in the array and the 2nd and subsequent values should follow
>    the first.  Make sure your buffer is big enough.  Again check with dap
>    to make sure of what's in the dict.   BTW, DAP does a
>    mcc_dict_get_def_info just like you do.

	OK, I re-defined it as an array of unsigend long and it worked!
    
>    3) If all else fails, try something simpler.  All dict objects have
>    at least an MCC_K_DD_PRESENTATION_NAME definition.  So try retrieving
>    that for just the class, then add the subclass, then add the attribute,
>    etc.   (This advice is for case #1).

	Yes, I got this working.

	Carl