home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / protocol / iso / 1100 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  2.2 KB

  1. From: mds@hpcndaw.CND.HP.COM (Mark Smith)
  2. Date: Fri, 4 Sep 1992 23:13:31 GMT
  3. Subject: Re:
  4. Message-ID: <86010003@hpcndaw.CND.HP.COM>
  5. Organization: HP Network and System Management Division
  6. Path: sparky!uunet!wupost!sdd.hp.com!scd.hp.com!hplextra!hpfcso!hpcndaw!mds
  7. Newsgroups: comp.protocols.iso
  8. References: <86010002@hpcndaw.CND.HP.COM>
  9. Lines: 61
  10.  
  11. Thanks to Bancroft Scott who sent me the following reply. I posted it
  12. in case anyone else was interested.
  13.  
  14. Mark smith
  15.  
  16.  
  17. >I'm trying to understand section 24.6 of ISO/IEC 8824:1990 regarding
  18. >distinct identifiers.
  19. >
  20. >Given the following definitions:
  21. >
  22. >T1 ::= SEQUENCE {   X1,
  23. >          b BOOLEAN
  24. >        }
  25. >
  26. >X1 ::= CHOICE { y INTEGER, z REAL }
  27. >
  28. >Would the identifiers for T1 be: y, z, b ??
  29.  
  30. No.  The only identifier for T1 is b, but y and z are visible to
  31. T1 because X1 does not have an identifier.  In effect, this means
  32. that when creating a value reference, you will not be able to
  33. distinguish whether y and z were defined in T1 or in X1.  If you
  34. were to define a component within X1 that has an identifier b, you
  35. would get a complaint from a decent ASN.1 compiler to let you know
  36. that you have duplicately defined identifiers.
  37.  
  38. What section 24.6 is saying can be rephrased to state that if a CHOICE
  39. enclosed in a SET, SEQUENCE or CHOICE, does not have an identifier, its 
  40. components must have identifiers different from those found in the enclosing
  41. SET, SEQUENCE or CHOICE, and different from those found in any other CHOICE 
  42. that has no identifier and lies within the enclosing SET, SEQUENCE or CHOICE.
  43.  
  44. I think you have the right interpretation of section 24.6, but your
  45. question is not stated well.
  46.  
  47. >I'm assuming the same would be true if the actual CHOICE definition replaced
  48. >the DefinedType X1.
  49.  
  50. Right.
  51.  
  52. >And to clarify, given the following variation on the definition:
  53. >
  54. >T2 ::= SEQUENCE { a X1, 
  55. >                  b BOOLEAN
  56. >                }
  57. >
  58. >Would the identifiers for T2 be: a, b ??
  59.  
  60. Yes.
  61.  
  62. >My assumption is that, if an identifier is specified for a reference to a
  63. >CHOICE type, then 8824 24.6 does not apply.
  64.  
  65. Correct.
  66.  
  67.  
  68. Bancroft Scott
  69.  
  70. ps: Note that effective with the 1993 issue of ASN.1, identifiers become
  71.     mandatory on all components of SET, SEQUENCE and CHOICE.
  72.