TOP

ASN.1/C# Compiler Limitations

Applies to: ASN.1/C# 4.5

When using the OSS ASN.1 compiler, consider the following limitations:

Line Size

The maximum number of bytes allowed on a single line of an ASN.1 input file is 4096.

Token Item Size

The maximum number of bytes allowed on an input item such as an identifier, type reference, value reference, module reference, bstring, cstring, or hstring is 1024.

INTEGER Size

To enable support for INTEGERs that have a maximum size of 4096 bytes, use the ASN1.HugeInteger or OSS.HUGE directive. In C#, the size of an INTEGER is 4 bytes.

Real Range Constraint

Although the ASN.1 compiler supports the syntax of open-ended, value range constraints on REAL types, the runtime libraries will not enforce open-ended, value range constraints (using "<") on REAL types. These are treated as if the "<" was not present in the schema. If an open-ended constraint must be enforced, use the EXCEPT clause.

Example

Instead of:

A ::= REAL ( 0 <..MAX ) 
B ::= REAL ( 100 <..< 1000 )

use:

A ::= REAL (( 0..MAX ) EXCEPT 0) 
B ::= REAL (( 100 <..< 1000 ) EXCEPT ( 100 | 1000 ))

Limitations to be removed in future releases

  • The –prefix compiler option is not supported.
  • The -relaySafe compiler option, which can preserve unknown extensions during re-encoding, is not supported.
  • The –nodebug compiler option will not disable the generation of debug data.
  • Open types with a single type constraint cannot be automatically decoded. However, the component relation constraint is supported.

This documentation applies to the OSS® ASN.1 Tools for C# release 4.5 and later.

Copyright © 2017 OSS Nokalva, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior permission of OSS Nokalva, Inc.
Every distributed copy of the OSS® ASN.1 Tools for C# is associated with a specific license and related unique license number. That license determines, among other things, what functions of the OSS ASN.1 Tools for C# are available to you.