naoki hashimoto wrote:
> 
> Hi:
> 
>  I do not understand CHOICE in below definition,
> (from ISO/WD 14827-2, P.19)
> 
> Time ::= SEQUENCE {
> time-Year-qty   INTEGER (-32768..32767) OPTIONAL,
> time-Second-qty INTEGER (0..60)         DEFAULT {0},
> 
> time-SecondFractions    CHOICE {               <-----
>     deci-seconds            INTEGER (0..9),
>     centi-seconds           INTEGER (0..99),
>     milliseconds            INTEGER (0..999),
>     ...}                    DEFAULT {0},       <-----
> 
> time-Timezone           SEQUENCE {
>     }                       OPTIONAL
> }.
> 
>  Dose the "DEFAULT {0}" mean default selection is zero,
> deci-seconds, or default value is zero for all alternatives.
>  If it means default selection, how can I give default value to
> deci-seconds?
>  If it means common default value for all alternatives, Can I
> think "DEFAULT {0}" is just for a chice type which has only
> same type alternatives?
> 
> That's all.
> Thank you in advance.
> 
> Naoki Hashimoto

Hi Naoki,

There appear to be a couple of places in this notation 
that are broken. The production symbols, "{" and "}" 
around the two instances of the notation "DEFAULT {0}"
should be removed.

I assume that this notation comes from a module that
has an AUTOMATIC TAGS default. If not, context specific
tags must be added to at least two of the three choice
alternatives of time-SecondFractions component of type
Time.

This notation does not make it clear which of the three
choice alternatives is to be used as the default. The 
default choice alternative could be specified (perhaps)
as

Time ::= SEQUENCE {
   time-Year-qty         INTEGER (-32768..32767)  OPTIONAL,
   time-Second-qty       INTEGER (0..60)  DEFAULT 0,
   time-SecondFractions  CHOICE {
      deci-seconds   INTEGER (0..9),
      centi-seconds  INTEGER (0..99),
      milliseconds   INTEGER (0..999),
      ...
   }  DEFAULT deci-seconds : 0,
   time-Timezone         SEQUENCE {}  OPTIONAL
}

to make this notation correct and the intent of the 
authors clear.

Phil
----
Phillip H. Griffin      Griffin Consulting
http://asn-1.com        Secure ASN.1 Design & Implementation
+1-919-832-7008         1625 Glenwood Avenue, Five Points
+1-919-832-7390 [fax]   Raleigh, North Carolina  27608  USA
------------------------------------------------------------

Reply via email to