[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

1275.0. "mcc_a_link of MCC_T_Descriptor?" by SWORD1::ES (Eugene Shvartsman) Mon Jul 22 1991 19:05

I understand, that mcc_a_link field may be used to build a link list of
descriptors, but is it used and how by MCC proper?

For example, if we have a link list of descriptors, we still have to put each
of them individually into ILV through mcc_ilv_put.

What values are permissible for this field, i.e. may it be other then NULL
pointer, when we are calling mcc_... functon? Or it doesn't matter and this
field is ignored by these function?

Any insight?

Thank you,
	Gene
T.RTitleUserPersonal
Name
DateLines
1275.1TOOK::SWISTJim Swist LKG2-2/T2 DTN 226-7102Tue Jul 23 1991 11:588
    It is used when the datatype is constructed.   The descriptors are put
    into a tree structure matching the semantics of the construction - the
    mcc_a_link field points to the next sibling and the mcc_a_pointer field
    points to the next child.
    
    You must not set the value of mcc_a_link to anything other than NULL
    unless you are setting up a construction as described above.
    
1275.2Still puzzledSWORD1::ESEugene ShvartsmanWed Jul 24 1991 15:2335
After rereading MCC SRM I tend to disagree with reply in .1.

According to the description of the mcc_ilv_put routine:

"This routine appends the specified value to the ILV parameter list, or current
level of a construction within the parameter list, using the information in the
value's MCC descriptor. The value may be any MCC "Numeric" or "String" data
type.

The mcc_ilv_put_cons_begin and mcc_ilv_put_cons_end routines are used to ILV-
encode MCC "Constructor" data types."

For me it sounds as there is no usage for the mcc_a_link field. But again,
nowhere in the description there is any mention about this field at all.

I have to admit, that I cannot recall any mention about this field anywhere
in th SRM, except of the description of MCC_T_descriptor itself.

BTW,  maybe unrelated question, anyone can shed light on the following
sentence in the description of the mcc_ilv_put routine:

"If the constructed data type MCC_K_DT_ENTITY is presented to the ILV call
interface, this routine will process the entire value in a single call"

I don't know anything about MCC_K_DT_ENTITY data type and it isn't in
MCC_INTERFACE_DEF.h file.

How it should be constructed and presented (in view of the .1 reply it is
related question) to ILV call interface?

And what is the "ILV call interface"?

Still puzzled.

	Gene
1275.3more infoTOOK::HAOThu Jul 25 1991 12:2016
    The mcc_a_link field is used as Jim described in .1. by PM/FM/AM to
    store constructor values.  However, the xM still has to "walk" the
    mcc_a_link fields to individually ilv encode the elements of the
    constructor value.  The ILV routines do not "walk" the mcc_a_link
    linkage and encode the entire constructor value in one fell swoop.
    That's up to the xM.  This relates to what you read about using
    mcc_ilv_put_cons_begin and mcc_ilv_put_cons_end routines.
    
    The MCC_K_DT_ENTITY datatype looks like a typo.  It means the
    MCC_K_DT_FULL_ENTITY datatype.  This particular datatype is represented
    by a descriptor whose mcc_a_pointer points to an AES.  The ILV routines
    knows about this datatype specially so that the xM doesn't have to use
    the mcc_ilv_put_cons_xxx routines, just a normal mcc_ilv_put.
    
    Christine
    
1275.4TOOK::SWISTJim Swist LKG2-2/T2 DTN 226-7102Thu Jul 25 1991 13:183
    What about the mcc_cdt_ilv_put routine?   Doens't it walk the
    descriptor tree?
    
1275.5That's another "pending" ECO to the SRMTOOK::GUERTINI do this for a living -- reallyThu Jul 25 1991 14:281
    
1275.6same question, refrasedSWORD1::ESEugene ShvartsmanThu Jul 25 1991 21:2026
I am afraid there is some misunderstanding. Let me try again.

When I've said: "I understand, that mcc_a_link field may be used to build a 
link list of descriptors" and Jim's reply in .1, it have been examples of
how this field may be used to described constructor values in any code used
to write PM/FM/AM modules. And this is ok.

But, and this is the QUESTION!, I have asked: "but is it used and how by MCC
proper?" Under the "MCC proper" I mean the functions described in the MCC SRM
manual.

I've interpreted Jim's reply as: use mcc_a_link field to describe the
constructed types and use single mcc_ilp_put to put it. That contradicted of
my understanding of SRM, hence reply .2.

Now, back to the original question (refrased this time): 

What values should be in the mcc_a_link field of the MCC_T_Descriptor stucture, 
when we use such descriptors as parameters into the functions described in the
SRM manual? For example, in ValueDesc parameter of mcc_ilv_put.

Thank you all for your answers,

	Gene.

BTW, what is mcc_cdt_ilv_put routine?
1275.7let's try againTOOK::CALLANDERJill Callander DTN 226-5316Fri Jul 26 1991 12:0716
Maybe we should put this in different terms....

Christine (hao) and Jim (swist) have told you what "can" be done with the
a_link field; now let's make it concrete. For example: if you want to build
a full entity spec (AES) for an entity that has an identifier of a constructed
type, then use the a_link field as they  have described. Other routines in
MCC also make use of the a_link field (I believe the ATS does) but these
uses are hidden from the user. You should ALWAYS initialize the a_link 
field to 0 (NULL), and ONLY set it when using the descriptor to encode a
constructed type. The only other routines that might walk the a_link
would be the MIR routines...Matt if you are reading could you please
enlighten us on that one. Now as to the ILV put routines it is my 
understanding that the ONLY ilv put that will automatically walk the
a_link of the valuedesc is if the datatype is fullentity (AES), all
other values (like set_of) that can use a_link, must walk the construction
themselves.
1275.8Jill is rightTOOK::KOHLSRuth KohlsWed Jul 31 1991 19:3017
Jill is correct in  -.1.  For all primitive data types to be encoded  by the
ilv routines, the mcc_a_link field is unused.  
				BUT
You will get unpredictable results if the mcc_a_link field is not used
properly, so I strongly recommend that it be set to MCC_K_NULL_PTR, and
only used for constructor entity instances in AES's.  For example, an AES
(created and managed by the mcc_aes routines, of course)
whose instance is "SET OF" sometype may be d/encoded "in one gulp" with an
ilv put/get.

The mcc_cdt_ilv routines work as described in previous responses.
They are layered on ILV and on the Dictionary routines.  I believe that
they will not be ECO'd into the SRM.  I think they may turn up elsewhere, 
but when or where I don't know.

Ruth K