In the ANSI MAP specification there are unsigned types as included
below.  How should I map these in ASN.1?

The intention is to reclaim the high bit to use as value.  Given
presence of these types in this document I'm sure there is an
accepted way of doing this however I coukldn't turn up anything.

An example from TIA/EIA-41-D:

QulificationInformationCode ::= [17] IMPLICIT Unsigned Enumerated

The length is one octet and the values are given as:

  Bits  H G F E D C B A    Value   Meaning

        0 0 0 0 0 0 0 0      0     Not used.
        0 0 0 0 0 0 0 1      1     No information.
        0 0 0 0 0 0 1 0      2     Validation only.
        0 0 0 0 0 0 1 1      3     Validation and profile.
        0 0 0 0 0 1 0 0      4     Profile only.

        0 0 0 0 0 1 0 1      5     -+ Reserved.  Treat the same as
              ...         through   | value 3, Validation and
        1 1 0 1 1 1 1 1     223    -+ profile.

        1 1 1 0 0 0 0 0     224    -+ Reserved for TIA/EIA-41 protocol
              ...         through   | extensions.  If unknown, treat
        1 1 1 1 1 1 1 1     255    -+ the same as value 3, Validation
                                      and profile.


        -Vance


6.5.3.14. Unsigned Enumerated

          An Unsigned Enumerated value that is limited in range to 
          non-negative values including zero. For the purposes of 
          this Standard, the sign bit is considered part of the 
          unsigned enumerated value. This type cannot be expressed 
          as an ASN.1 ENUMERATED type, because an ENUMERATED type is
          encoded as an INTEGER which always uses the sign bit.

          An Unsigned Enumerated value may be extended in future 
          releases.

          The length of a fixed length Unsigned Enumerated value may 
          not be extended in future releases.


6.5.3.15. Unsigned Integer

          An integer that is limited in range to non-negative values 
          including zero. For the purposes of this Standard, the sign
          bit is considered part of the Unsigned Integer value. This 
          type cannot be expressed as an ASN.1 INTEGER type, because
          an INTEGER always uses the sign bit.

Reply via email to