[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

209.0. "Questions on passing Attrs to Directives" by COOKIE::KITTELL (Richard - Architected Info Mgmt) Fri Jul 27 1990 04:26

    Some questions about processing of request arguments with values, such
    as on a SET directive.
    
    1. The SRM says that if the request argument is specified with REQUIRED =
    TRUE and DEFAULT = NO DEFAULT, then doing a SET CLASS inst ATTR will cause
    the PM to prompt for a value. I haven't been able to get it to work
    that way, it just passes a value of "NULL". The PM will prompt for an
    attribute if I just enter "SET CLASS inst", but I haven't been able to
    get it to prompt for a value.
    
    2. Which brings up the next question: the only difference the directive
    code seems to see between SET CLASS inst ATTR = STRING and 
    SET CLASS inst ATTR is that in the latter case the value received is 
    the string "NULL". This is for a Latin1String attribute in a request 
    argument passed as an Attrib_list. Trouble is, what if the string
    "NULL" is a valid attribute value? Is there a flag somewhere to
    indicate that the value being passed-in was defaulted?
    
    3. Doing a "SET CLASS inst ATTR = " (no value after the equal sign) 
    results in a NOMSG  signal (value 0). This is from the FCL PM on 
    UT1.0.1 with the X1.1.0 upgrade.
    
    4. It seems there are two ways to pass attributes and values to a
    directive:
      a. Have one request argument of type Attrib_list
      b. Have multiple request arguments, one for each of the valid
         arguments, declared REQUIRED = FALSE so any one or more of them
         can be specified.
    
    Ignoring whether it may seem "easier" to code up style a or b, are
    there any operational trade-offs between the two? It would seem that
    style b would give better UI processing, because you can control
    options on a per-arg basis.
    
    As always, thanks for your insight.
    
    Richard
    
T.RTitleUserPersonal
Name
DateLines
209.1you are dealing with an attribute, not a request argument BARREL::LEMMONFri Jul 27 1990 13:2213
>  1. The SRM says that if the request argument is specified with REQUIRED =
>    TRUE and DEFAULT = NO DEFAULT, then doing a SET CLASS inst ATTR will cause
>   attribute if I just enter "SET CLASS inst", but I haven't been able to
>    get it to prompt for a value.
   
   The command SET CLASS inst ATTR is dealing with an attribute, not a request
   argument.   Request arguments apply only to Action directives (i.e., TEST).
   Attributes do not have a REQUIRED definition.  

   It was thought that only the Request Arguments need to be "REQURIED", 
   hence the user will not be promped for the attribute values.

/Jim
209.2re .1 continued...BARREL::LEMMONFri Jul 27 1990 13:3824
>    4. It seems there are two ways to pass attributes and values to a
>    directive:
>      a. Have one request argument of type Attrib_list
>      b. Have multiple request arguments, one for each of the valid
>         arguments, declared REQUIRED = FALSE so any one or more of them
>         can be specified.
    
 
	We had discussions on whether to do a. or b. early in the design
	process. Method a. was chosen because it was easier to implemtnt and on
	the MSL writer.   

	The basic question is "do we want to have required attributes?". 
	The answer at the time of writing SRM enrollment chapter was that
	attributes should not be required.  

	Now, if this is no longer the case (i.e., we get LOTS of feedback
	that some attributes should be required), we could enhance MSL so it
	allows for defining the REQUIRED definition under ATTRIBUTE and
	stores it in the dictionary.  The PMs could then go to the dictionary
	and determine which attributes need to be prompted for.  Note that
	this doesn't require any changes to how the attributes are encoded.

/Jim
209.3COOKIE::KITTELLRichard - Architected Info MgmtFri Jul 27 1990 13:529
Jim, thanks for the response, it help clear up some of the confusion.

A comment on making REQUIRED part of the nature of an attribute: I think
whether an attribute is required on any given command is a product of
the two. An attribute may not be required for all commands, in other
words, just some of them. So setting it on the attribute is probably too
broad a brush.

209.4Default is different from any other valueCAPN::SYLORArchitect = Buzzword GeneratorTue Jul 31 1990 00:0715
So what does MCC pass as the value when I do a command like

SET Node Capn Routing Circuit Cost

???

The answer had better be "the magic value default". Passing a null string isn't
right, since the data type of the attribute might be Latin1String, and ""
is a legal value for that. Looking up the value in the dictionary, and 
passing that isn't right since it is the entity (for EMA compliant entities)
that determines what the default is. This "bug" had been identified a long 
time ago, .0 seems to indicate it was never fixed.

Someone tell me it ain't so
				Mark
209.5Value:default is not the same as default valueTOOK::STRUTTColin StruttTue Jul 31 1990 03:0026
.4>	SET Node Capn Routing Circuit Cost
    
    This was discussed within the development group only two weeks ago
    (so you may not have code working 'correctly' yet).
    The intention - and if *I'm* wrong, someone better tell me - is that
    if an attribute has a default defined (whether as a specific value,
    or marked as implementation default) then mentioning the attribute
    name, but no value, on a SET command, will cause the
    	VALUE: default
    to be sent down and NOT the
    	default value
    to be sent across the mcc_call interface, and hence across the
    protocol.
    The same is true whether or not MCC (thinks it) knows the default.
    
    The *only* use that MCC makes of the MSL definition of the default
    value is to explain to the user (eg. at the iconic map) what value
    they ought to expect if they choose to set it to the default.
    
    I believe it has been defined this way in the SRM (though in our recent
    discussions we did discover about 7 places where some textual
    clarification was in order) for a long time - we just have to get the
    implementation (both the command line PM and the iconic map PM) to
    match.
    
    Colin
209.6no ""GOSTE::CALLANDERTue Jul 31 1990 14:0915
    Mark, As Colin stated in .5 this was discussed a few weeks ago.
    As it currently works the MSL syntax allows you to state a default
    value or implementation specific default (your magic). Currenlty
    the FCL does not work as Colin describes, but this is being fixed.
    What we do do is to send the default value specified in the MSL
    or the magic flag if there isn't a value but defaults are supported
    for the attribute.
    
    I will have to reread the earlier messages as to what the "" they
    were seeing was, since the only way to get that is to enter it in
    the MSL as the default value or at the UI (though the ILV dump may
    LOOK like "" since the flag isn't ascii readable).
    
    jill
    
209.7re.5BARREL::LEMMONTue Jul 31 1990 15:328
re: .5

 The iconic map currently sends the default value stored in the dictionary.
This is being changed to send the special "use default value" as requested 
in .4.  


/Jim
209.8GoodCAPN::SYLORArchitect = Buzzword GeneratorWed Aug 01 1990 19:122
I'm glad to see this will be fixed.
					Mark