Hi Paul,

I will answer your second question.  No, that is not all there is to
it.  The real benefit of the all of this "&." comes from using table
constraints (and component relation constraints) rather than just a type
constraint as shown in your example.  I suggest you refer the book
"Communications Between Heterogenus Systems" by Oliver Dubuisson, or
"ASN.1 Complete" by John Larmouth for good explanations of the real power
of this notation.  Both of these books are downloadable free of charge
from www.oss.com, or can be purchased from amazon.com.

----------------------------------------------------------------------------
Paul E. Thorpe                                 Toll Free    : 1-888-OSS-ASN1
OSS Nokalva                                    International: 1-732-302-0750
Email: [EMAIL PROTECTED]                          Tech Support : 1-732-302-9669
http://www.oss.com                             Fax          : 1-732-302-0023

On Mon, 24 Jun 2002, Paul Long wrote:

> Rajul,
> 
> Okay, thanks. So I think you're answer to my first question is, yes. :-)
> 
> Also, given X:
> 
> X ::= SEQUENCE {
>       a INTEGER, -- stuff...
>       b BOOLEAN
> }
> 
> I believe that Z1:
> 
> Z1 ::= SEQUENCE {
>       y TYPE-IDENTIFIER.&Type (X)
> }
> 
> encodes in PER exactly like Z2:
> 
> Z2 ::= SEQUENCE {
>       y OCTET STRING  -- contains X
> }
> 
> True?
> 
> Paul Long
> ipDialog, Inc.
> 
> > -----Original Message-----
> > From: Rajul Gupta [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 24, 2002 4:13 PM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [ASN.1] TYPE-IDENTIFIER.&Type
> >
> >
> > Hi Paul,
> >
> > (X) is a type constraints here, and it says that "y" MUST be of type "X"
> > only. Syntactically, this is equivalent to
> >
> > Z ::= SEQUENCE {
> >        y       X
> > }
> >
> > However, this kind of syntax (your syntax) is useful in case of PER. PER
> > always doesn't have length encoded, but while encoding open
> > types, PER puts
> > a length wrapper also. So if you are using PER, then at the decoding side
> > you can easily find out the length of encoded open type value, without
> > knowing it's type.
> >
> > Usually this type of construct is useful for security fields. Using length
> > wrapper you can easily find out the length of security data and leave this
> > data unwrapped and unprocessed in your application, and pass it to other
> > application or function, where this security data is used.
> >
> > I hope this answer could be helpful for you.
> >
> > Rajul
> >
> > > I've put it off too long. Now it's time for me learn this ".&" stuff. Is
> > y,
> > > below, encoded in PER as an open type that contains an encoding of X? Is
> > > that all there is to it?
> > > Also, what syntactical role does the "(X)" play? Is
> > > this a constraint and otherwise y could be encoded as an open
> > type of any
> > > type?
> > > X ::= SEQUENCE {
> > > a INTEGER, -- stuff...
> > > b BOOLEAN
> > > }
> > >
> > > Z ::= SEQUENCE {
> > > y TYPE-IDENTIFIER.&Type (X)
> > > }
> > >
> > > Paul Long
> > > ipDialog, Inc.
> > >
> > >
> > >
> >
> >
> 
> 

Reply via email to