| 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 |
I would like to know what is the best way of representing a default
value of "none" for characteristic attributes of different types.
For example I have a characteristic attribute of type :
Escalation time : BIN_ABS_TIME.
If the user does fill this in then I would like the default to be none.
Another example I have an attribute of type record:
Scheduling : Record
I would also like the default to be none, when the user does not set
this attribute.
Final example is a type of Enumerated OSI Severity:
and I would like the default to be none.
Is it possible to use the b_flags in the attribute list and have the
ICONIC PM display the default valued none for these datatypes?
If not what is the best way to do this?
Thanks,
Carol
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1506.1 | none | TOOK::CALLANDER | Jill Callander DTN 226-5316 | Fri Sep 20 1991 16:46 | 5 |
there isn't a way of doing it for all types. For sets and sequences an empty () would be sufficient to get your point accross but for things like time, there is simply no way to really do it. Simply set default_allowed to true and supply no debault and we will state implementation specific in the iconic map if they choose to use defaults. | |||||
| 1506.2 | Try a different approach... | BLUMON::SYLOR | Architect = Buzzword Generator | Thu Oct 03 1991 22:59 | 40 |
Right now, there is no way.
In some future version of EMA, I'll add a CHOICE type constructor, and
you could define a type as
TYPE
Schedule = xx CHOICE {
Never Set = [1] NULL,
Time = [2] BinAbsTime }
And the user would see either
Schedule = Never Set:
or
Schedule = Time: 1-Jan-1999:00:03:00.0000Z I0.00500
or something like that.
Meanwhile, it has been my observation that one can often define a value
that means "Never Set" by chosing some unusual value or changing the
meaning, and hence the values, of a type. For example, say you wanted
to schedule some action at certain periodic times. You could do that by
two attributes, the first time an action was done, and a delta time
between them. The problem is, what if you need to allow the schedule
to be set so it is never done?
An alternative representation is to define a single attribute whose
type is SET OF TimeOfDay. The value {00:00:00,12:00:00} would mean
perform the action twice a day, at noon and at midnight. But the value
{} means never perform this! Now of course the two attributes are not
exactly equivalent. With the Start + DeltaT approach, I can deal with
periods of 5 hours, something the SET OF TimeOfDay could not represent.
On the other hand, SET OF TimeOfDay can deal with schedules like
{5 AM, 8AM, Noon, 7 PM}.
So anyway, the point here is be a little creative, and you might find a
different way of solving the problem that doesn't require Null values
or "attributes that have no value".
Mark
| |||||