Hi Martin,

Why not use

X ::= SEQUENCE {
  padding BIT STRING (SIZE(10))('0000000000'B),
  a       A
}

where A is the choice below with two items?  If you add more items to the
choice, you reduce the size of the size of the bit string correspondingly.

----------------------------------------------------------------------------
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 Fri, 4 Mar 2005, Martin Andersson (EAB/RGV/E) wrote:

> Hello.
>
> I have this question about CHOICE
>
> Imagine the following.
>
> A ::= CHOICE {
>         something-a    INTEGER,
>         something-b    INTEGER
> }
>
> I'm using Unaligned PER and need the index for this to be encoded with 11 
> bits.
> To accomplish this today I have put in lots of NULL after the INTEGER
> So it looks something like this.
>
> A ::= CHOICE {
>         something-a    INTEGER,
>         something-b    INTEGER,
>         spare-2        NULL,
> .... and so on
>         spare-2047     NULL
> }
>
> As you can imagine this is not very nice. Is there anything in ASN.1 that can 
> help me with this.
> So I don't have to get this xtremly lengthy A :: CHOICE
>
> brg/Martin
>
> _______________________________________________
> ASN1 mailing list
> [email protected]
> http://lists.asn1.org/mailman/listinfo/asn1
>
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to