Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ASN.1 types are automatically mapped by Ultra as follows (this applies when there are automatic statements in the in-maps):

ASN.1 Type:

Ultra Type mapped to:

BOOLEAN

boolean

bcd

string

bigint

bigint

All ASN.1 string types except OCTET STRING

string

OCTET STRING

bytearray

ENUMERATED

int

INTEGER

int

REAL

float or bigdec

By default, the float ultra type is automatically mapped to the REAL ASN.1 type. Substituting ASN.1 type REAL with bigdec casts the field as BigDecimal type.

Info

Mapping to bigdecimal

Another method of mapping a REAL type to BigDecimal, is to use internal.

Code Block
//Create a flat internal that will be used to populate with integer and bigdecimal values.
internal flatInternal {
    int calledNumber;
    bigdec duration;
};

BIT STRING

bitset mapping is used. Bitset is mapped to Bit String and vice versa; bitset<->bitstring

For BER BIT STRING encoding: '0410'H is the correct encoding of the bit string '0001'B ("{3}" in APL debug, length of 4 bits.

Note

Note!

The string representation here does not actually give complete information since the length is not included. It can be inconvenient to have the same string representation for '0001'B and '000100'B, but the reason is that the same string representation as the Java BitSet class is used. In BER, these values are handled differently. For example, '0001'B is encoded as 0x0410, while '000100'B is encoded as 0x0210.

For further information about how BIT STRING is encoded/decoded in BER, see ITU-T specification X.690 (the first byte is not part of the bitstring itself - instead it encodes the number of unused trailing bits in the last byte in the bitstring encoding, which starts after the first byte).

NULL

bytearray (with value null)

Ultra Extensions

Within a UFDL  asn_block  it is possible to use some extensions which are not part of the ASN.1 standard. These are added to provide better  automatic decoding support for some formats.

...

It is also possible to use sequential formats to describe constructed ASN.1 types. In this case the tag must be declared as constructed (Image Removed a MediationZone specific keyword) to allow Ultra to correctly encode the type.

...

By default, ASN.1 external formats are decoded and encoded as BER. However, the decoding and encoding behavior can be modified by options on the in_map and out_map declarations. The available options are:

Option

Effect

CER_length

When encoding to BER, use the indefinite length encoding instead of definite length encoding (which is default)

ignore_unknown_tags

When decoding BER data, the presence of unknown tags will no longer be considered as decoding errors, they will simply be ignored instead.

PER_aligned

Instead of BER, use PER ALIGNED encoding

PER_unaligned

Instead of BER, use PER UNALIGNED encoding

ASN Language Limitations

The ASN.1 compiler is mostly concerned with the type notation of ASN.1. Elements of type notation not supported are:

...