OSS Nokalva Home Page
>
Resources
>
ASN1.IO
> ASN.1/C Web Compiler (beta)
×
The following license will be emailed to you
No promo exists.
×
ASN.1/C Web - Codec Variants
Features
Full Codec with Validation
Compact Codec
ASN.1 Features Support
Complete
Few Restrictions
i
No support for CHARACTER STRING, EMBEDDED-PDV, EXTERNAL, INSTANCE OF, and the TIME type and its subtypes.
Binary Encoding Rules
all
all
Text Encoding Rules
JER (JSON)
✗
CHOICE type with untagged alternatives
✓
✗
SEQUENCE/SET with a complex DEFAULT
✓
✗
i
Such DEFAULTs are not ignored, the user must take responsibility to ensure that no values matching the defaults will be presented to the Encode function of the canonical encoding rules, otherwise this may result in non-canonical encodings.
Recursive type definition in schemas
✓
✓
Automatic encoding/decoding of OCTET STRING and BIT STRING with a contents constraint
✓
✓
Automatic decoding constrained open types
✓
✓
i
Limited to only one referenced component of the same SEQUENCE or SET type and the reference is INTEGER or OBJECT IDENTIFIER.
Validation of an ASN.1 value
✓
✗
Copying, comparison of ASN.1 values
✓
✗
Get PDU id by type name
✓
✗
Detailed errors
✓
i
Multiple errors, including the position of the field. E.g. Error 80002: The end of the encoding was encountered inside the content; check the content (INTEGER type 'I') of field 'cc' (OCTET STRING type 'OI') of PDU (SEQUENCE type 'CC-INT')
✗
i
Single error with an error code and a short description. E.g. Error 401: The input value is invalid and cannot be encoded
Support for standard malloc/free
✓
✓
Support for custom malloc/free
✓
✓
Support for the 'Black Hole' allocator
i
The 'Black Hole' allocator extracts contiguous memory blocks from a preallocated buffer and never re-uses those blocks.
✓
✓
Buy
Sign Up for FREE
•
Get Promo License
questionnaire
One minute
ASN.1 Schema
Enter manually
Upload .asn file
Color ::= ENUMERATED {red (0), blue (1), yellow (2)} colorOfTheSky Color ::= blue
General options
Codec choice:
Codec with Validation
Compact Codec
ⓘ
Allow encoding of complex DEFAULTs
Ignore complex DEFAULTs (for types other than NULL, BOOLEAN, ENUMERATED, INTEGER and BIT STRING) during encoding. Warning: for canonical ER, it might produce non-conformant encodings, as complex DEFAULT values will still be encoded.
Always decode the Open Types
Decode Open Types even when their IDs are nested at a different level. Otherwise Open Types can be decoded in a separate step.
Encoding rule:
BER
DER
PER Unaligned
Canonical PER Unaligned
PER Aligned
Canonical PER Aligned
OER
Canonical OER
Include JER (useful for debugging)
Text and binary formats, where OER is faster, PER is smaller, JER is human readable, etc.
Code generation
Codec name:
The name is incorporated in public generated names.
Generate sample
Type or Value name for the sample:
Syntax: ModuleName.TypeName
Generate functions:
Encode and Decode
Encode only
Decode only
Generate codec for PDU(s):
Syntax: ModuleName.TypeName
List of space-delimited type names (TypeName or ModuleName.TypeName or *.TypeName), to be included in the generated code, along with all their dependencies. By default, all the types defined in the schema are included.
Namespace prefix:
Syntax: starts with letter or _ and no longer than 32 chars
Useful to distinguish multiple compilations for different schemas and/or encoding rules.
Data binding
BigIntegers
Generates a BigInteger to accommodate unconstrained integers (instead of 64-bit values).
BigReals
Generates a BigReal for REAL (instead of "double").
BigOIDs
Generates unconstrained OID arcs (instead of 64-bit values).
Platform options
Platform:
Windows VC++ on x86 (32-bit)
Windows VC++ on x86-64 (64-bit)
Linux 32-bit gcc on x86 (32-bit)
Linux 64-bit gcc on x86-64 (64-bit)
MacOS clang on x86-64 (64-bit)
MacOS clang M1 (64-bit)
Solaris cc Sparc (64-bit)
Other (contact asn1io@oss.com)
Inquire about ARM, MIPS, PowerPC, and other bare or embedded platforms. Email us your platform specs at
asn1io@oss.com
Memory management
BlackHole
All memory allocations are made out of a single buffer provided by the user
MallocFree
All memory allocations are made by calling the malloc/free functions defined in the standard C library
Custom MallocFree
All memory allocations by generating malloc/free style function calls (see below). The functions to be called must be defined in the user application and declared in a header file named "custom.h"
Malloc function name:
Free function name:
Type names
Built in / Keywords
No use of type names for 64-bit integer types; use the built-in types “long long” and “unsigned long long” as such
Standard
The type names to be used are those defined in the standard header file stdint.h (normally "int64_t" and "uint64_t").
Custom
Alternative type names to refer to the built-in 64-bit integer types instead of using keywords such as "long long" (see below). The type names to be used must be declared in a header file named "custom.h"
SignedInt64TypeName:
UnsignedInt64TypeName:
Advanced options
Shorten public identifiers
Ensures that the names of all types, fields, and functions in the API are no longer than 31 characters.
Code footprint reduction
Exclude types:
Syntax: ModuleName.TypeName
List of space-delimited type names (TypeName or ModuleName.TypeName or *.TypeName) for optional components of a SEQUENCE or alternatives of a CHOICE that are not expected to be present in a message and can be excluded from the generated code.
Output