TOP

ASN-1Step Command-line Options Reference

Applies to: ASN-1Step 10.5

-1990 | -2021

Specifies the ASN.1 version used in the input ASN.1 specification file.

The -1990 option indicates that the ASN.1 specification conforms only to the 1990 version of ASN.1. ASN-1Step supports ASN.1:1990, including these features:

  • Macro notation
  • ANY DEFINED BY
  • Named types without identifiers

The -2015 option indicates that the ASN.1 specification conforms to the 2015 version of ASN.1. ASN-1Step supports ASN.1:2015, including these features:

  • Automatic tagging
  • Information object classes
  • Component relation constraints
  • Table constraints
  • User-defined constraints
  • Parameterization
  • Version brackets
  • Enhanced subtype notation capabilities
  • TIME, OID-IRI, and RELATIVE-OID-IRI types

The -2021 option indicates that the ASN.1 specification conforms to the 2021 version of ASN.1. ASN-1Step supports ASN.1:2021, including this feature:

  • Addition of WITH SUCCESSORS and WITH DESCENDANTS to the imports clause

Remarks

ASN-1Step lets you mix the 1990 and 2021 syntaxes, but issues warnings since this behavior is not allowed by X.680 (2021) ISO/IEC 8824-1:2021.

When using ASN.1:2021 syntax, ASN-1Step complains when:

  • Components of a SET, SEQUENCE, or CHOICE do not have an identifier.
  • A colon (":") is absent from an open type or CHOICE value.
  • A value reference (defined value) appears before the DEFINITIONS keyword that signals the start of an ASN.1 module or appears within an object identifier used to define an ASN.1 module.

The -1993, -1994, -1997, -2002, -2008, and -2015 compiler options are equivalent to the -2021 option.

Default Behavior

ASN-1Step starts out in neutral mode, expecting either ASN.1 version. Once syntax unique to ASN.1:1990 or ASN.1:2021 is detected, ASN-1Step exits neutral mode and checks for conformance to the detected version, generating messages for any violations. However, starting in neutral mode could cause a longer ASN.1 specification debugging cycle, especially when creating new ASN.1 specifications.

↩Options Index


-allCsvMax number

Specifies the maximum number of all CSVs to create for a top-level PDU type value that may include multiple components for multiple SET OF and SEQUENCE OF type values for which extra CSVs are created.

Example

Mod DEFINITIONS AUTOMATIC TAGS ::= BEGIN

     Type ::= SEQUENCE {
             sofbool SEQUENCE OF BOOLEAN,
             sofint SEQUENCE OF INTEGER
     }
     value Type ::= {
             sofbool {TRUE, FALSE, TRUE},
             sofint {1, 2, 3}
     }

END

Command line without -allCsvMax:

     asn1step test.asn -encode value -csv 
     
Output CSV without -allCsvMax:

     Encoded successfully in 9 CSVs in 81 bytes:
     sofbool,sofint
     TRUE,1
     TRUE,2
     TRUE,3
     FALSE,1
     FALSE,2
     FALSE,3
     TRUE,1
     TRUE,2
     TRUE,3
     
Command line with -allCsvMax:

     asn1step test.asn -encode value -csv -allCsvMax 3
     
Output CSV with -allMaxCsv:

     Encoded successfully in 3 CSVs in 36 bytes:
     sofbool,sofint
     TRUE,1
     TRUE,2
     TRUE,3

Default Behavior

The maximum number of all CSVs is fixed to maximum between the user-specified number on the number of CSVs per each SET OF and SEQUENCE OF type and 50, multiplied by 50.

See Also

↩Options Index


-allEncode

This option instructs ASN-1Step to encode all value references specified in the input ASN.1 specification. It works as if the -encodeValue option, with one or more encoding rule options, was specified for each value reference in the input notation.

When the -output or -putFiles option is not specified, each value reference is encoded using the specified encoding rules. The output filenames will have prefixes derived from the value reference names and extensions derived from the encoding rules. This is similar to how the -encodeValue option works.

When the -output <prefix> option is specified, one file is created for each encoding rule, with concatenated messages for all values. The filename prefix matches the prefix specified in the option and the file extension is derived from the encoding rule. If the -concatenate option is also specified and the output file already exists, the new records are concatenated to the content of the output file. In this case, the concatenated records must belong to the same PDU. Otherwise, if records were created using PER or if the syntax has PDUs with non-unique tags, the decoder cannot automatically decode all concatenated messages from such a file.

When the -putFiles <path>[,<prefix>[,<firstFileNumSuffix>]] option is specified, multiple files are created for each value reference and each encoding rule in the specified location or in the current directory, if the first parameter is empty. By default, filenames will have prefixes derived from the value reference names and extensions derived from the encoding rules. If the second prefix parameter is specified, it is used as a common prefix for all files that will be suffixed with an underscore and a number suffix that starts with the value of the third parameter, if specified, or the '_1' suffix used by default for the first created encoding file. The number suffix is increased by 1 for other files with the same file name extension that is derived from the encoding rules. If the -concatenate option is also specified and an output file already exists, the new record is concatenated to the content of the output file. In this case, the concatenated records must belong to the same PDU. Otherwise, if records were created using PER or if the syntax has PDUs with non-unique tags, the decoder cannot automatically decode all concatenated messages from such a file.

Default Behavior

The -allEncode option is turned off.

↩Options Index


-allow BadCase

This option instructs ASN-1Step to accept input syntax that deviates from the standard, as specified by the argument. Use with caution and only when absolutely necessary.

The option takes a single argument, but can be specified more than once when multiple arguments are needed, for example:

asn1step foo.asn -allow BadValues -allow UniversalTags 

Arguments

-allow BadExplicitAutomaticTagging

Instructs ASN-1Step to use explicit automatic tagging not only for untagged but also for tagged CHOICE types, open types, and "DummyReference" types, based on the interpretation of clause 31.2.7 c of the X.680 2002 ASN.1 standard.

In the following example, if -allow BadExplicitAutomaticTagging is specified, ASN-1Step uses explicit automatic tagging for the ch field that has the tagged CHOICE type. If -allow BadExplicitAutomaticTagging is not specified, ASN-1Step uses implicit tagging for this field.

B4114 DEFINITIONS AUTOMATIC TAGS ::= BEGIN
   Seq ::= [65] SEQUENCE { ch Cho }
   Cho ::= [65] CHOICE { b BOOLEAN }
   s Seq ::= { ch b : TRUE }
END
-allow BadExtensibilityImplied

This option instructs ASN-1Step to ignore the EXTENSIBILITY IMPLIED option in the module definition for the following types defined in a module:

  • All ENUMERATED types.
  • SET, SEQUENCE, and CHOICE types whose type definitions match some other type definitions inside other modules that do not have the EXTENSIBILITY IMPLIED option.

Example

Mod DEFINITIONS AUTOMATIC TAGS ::= BEGIN 
  Set    ::= SET    {a INTEGER, b BOOLEAN} 
  Choice ::= CHOICE {a INTEGER, b BOOLEAN}
END

ModExt DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED  ::= BEGIN
  SetExt    ::= SET    {a INTEGER, b BOOLEAN} 
  ChoiceExt ::= CHOICE {a INTEGER, b BOOLEAN} 
  EnumExt   ::= ENUMERATED { a(1), b(2)} 
END

When -allow BadExtensibilityImplied is specified, the SetExt, ChoiceExt, and EnumExt types are not marked as extensible in the generated code. As a result, their values could be incorrectly encoded using the Packed Encoding Rules.

-allow BadValues

This option is implied by the default -relaxedMode option and instructs ASN-1Step to continue the current process when a content error is found in the value notation of restricted character strings (i.e., NumericString, PrintableString, and VisibleString), OBJECT IDENTIFIERs, or extensible types with missing mandatory extension additions.

Example

myPhoneNumber   NumericString      ::= "(800) 555-1212 EXT-6"
myObjectID      OBJECT IDENTIFIER  ::= {0 26}

This value notation will cause ASN-1Step to exit with an error message, unless -allow BadValues is specified.
According to the ASN.1 standard, the NumericString type allows only numbers (0-9) and white space in its contents. The OBJECT IDENTIFIER type allows no value larger than 4 for its second node.

Remarks

ASN-1Step does not truncate BIT STRING, restricted string, or OCTET STRING values defined with extensible size constraints when the UNBOUNDED or NULLTERM representation is used. Nor will it truncate SEQUENCE OF or SET OF types.

To instruct ASN-1Step to treat the errors as warnings, use the -ignoreError option.

This option also instructs ASN-1Step to issue the A1007W warning message, instead of the A1006E error message in some cases of type-value mismatch in ENUMERATED, SET, SEQUENCE, or CHOICE value assignments. For ENUMERATED types, differences in the named values set are allowed. For SET, SEQUENCE, and CHOICE types, differences in field tags and in the extension marker position are allowed.

See Also

-allow incompatibleGovernorsForObjectValueSets

Instructs ASN-1Step to accept information object sets or value sets as actual parameters, even when they have governors that are not compatible with actual parameters of the paramdummy governors included in an instance of a parameterized type. As a result, the generated code could have other problems. For example, the time-optimized code generated by the ASN.1/C compiler could fail to C compile with the following errors:

error C2065: '_ref_ids0': undeclared identifier
error C2099: initializer is not a constant

Example

B4468 DEFINITIONS ::= BEGIN

   MACAlgorithms ALGORITHM ::= {  ...   }
    MessageAuthenticationCodeAlgorithm ::=  AlgorithmIdentifier
        {MAC-ALGORITHM, {MACAlgorithms}}

    AlgorithmIdentifier {ALGORITHM-TYPE, ALGORITHM-TYPE:AlgorithmSet} ::= 
      SEQUENCE {
        algorithm   ALGORITHM-TYPE.&id({AlgorithmSet}),
        parameters  ALGORITHM-TYPE.&Params({AlgorithmSet}{@algorithm})
      }
    ALGORITHM ::= CLASS {
        &id OBJECT IDENTIFIER UNIQUE,
        &Params 
    }
    MAC-ALGORITHM ::= CLASS {
        &id OBJECT IDENTIFIER UNIQUE,
        &Params,
        &Other OPTIONAL
    }
END

The governor of the information object set, MACAlgorithms, used as the actual parameter in MessageAuthenticationCodeAlgorithm, is ALGORITHM, but it should be MAC-ALGORITHM according to the definition of the parameterized type AlgorithmIdentifier {}. If -allow incompatibleGovernorsForObjectValueSets is not in effect ASN-1Step reports the following errors with the -autoencdec option:

"b4468.asn", line 4 (B4468): A0998E: The governor 'MAC-ALGORITHM' of the dummy parameter
'AlgorithmSet' and the governor of the valueset 'MACAlgorithms' used as the actual parameter 
in the instance 'MessageAuthenticationCodeAlgorithm' of the parameterized type
'AlgorithmIdentifier' are not compatible.

"b4468.asn", line 8 (B4468): A0875E: The ObjectClassFieldType uses the class 'MAC-ALGORITHM' 
while the information object set of class 'ALGORITHM' is used in the TableConstraint or
ComponentRelationConstraint.  The same class must be used for both.

"b4468.asn", line 9 (B4468): A0875E: The ObjectClassFieldType uses the class 'MAC-ALGORITHM' 
while the information object set of class 'ALGORITHM' is used in the TableConstraint or
ComponentRelationConstraint.  The same class must be used for both.
-allow MixedCaseForSomeBuiltInTypesNames

This option is implied by the default -relaxedMode option. It instructs ASN-1Step to accept mixed-case names for some ASN.1 built-in types, provided that types with these names are not already defined in the ASN.1 input.

This option currently supports mixed-case names for these built-in types:

  • INTEGER without named numbers
  • BOOLEAN
  • NULL
  • Restricted character string: UTF8String, NumericString, PrintableString, TeletexString, T61String, VideotexString, IA5String, GraphicString, VisibleString, ISO646String, GeneralString, UniversalString, BMPString
  • Time: TIME, DATE, TIME-OF-DAY, DATE-TIME, DURATION
  • GeneralizedTime and UTCTime

Example

M DEFINITIONS ::=  BEGIN
 Type ::= IA5STRING
 value Type ::= "abc"
END

This is normally an invalid ASN.1 syntax since 'IA5STRING' is used but is not defined.

If -allow MixedCaseForSomeBuiltInTypesNames is not specified the compiler reports the following errors:

"test.asn", line 2 (M): A0256W: 'IA5STRING' is referenced, but is not defined.
"test.asn", line 2 (M): A0052E: 'IA5STRING' is not defined.

The -allow MixedCaseForSomeBuiltInTypesNames option allows you to compile such ASN.1 syntax; the compiler will assume that the 'IA5STRING' is a misspelling of the built-in type 'IA5String':

"test.asn", line 2 (M): A1277W: 'IA5STRING' is assumed to be a misspelling of the built-in type 'IA5String'.
-allow UnderscoresInAsn1Names

This option is implied by the default -relaxedMode option. It instructs ASN-1Step to accept ASN.1 names that contain the underscore character ("_") after the initial character.

Example

M DEFINITIONS ::= BEGIN
  Some_Type ::= INTEGER
END

If -allow UnderscoresInAsn1Names is not specified ASN-1Step reports the following errors:

"test.asn", line 2 (M): A1271E: The low line character ('_') is not among the permitted characters for ASN.1 names. 
Please use the '-allow UnderscoresInAsn1Names' command line option to force the compiler to accept such invalid names.
  Some_Type ::= INTEGER
      ^

"test.asn", line 2 (M): A0120E: Parsing error: expecting '::=', '{' or an ASN.1 Type but found illegal character.
  Some_Type ::= INTEGER
      ^
-allow UniversalTags

Instructs ASN-1Step to accept UNIVERSAL class tags that are normally prohibited. This option is enabled by default in trial versions of ASN-1Step.

Use UNIVERSAL class tags for

  • IMPLICIT tags whose number matches a built-in type tag.
  • CHARACTER STRING and OCTET STRING types with a specified tag number that matches one of the restricted character string types.

Any other UNIVERSAL tags are rejected.

Example

If you use a UNIVERSAL tag for a CHARACTER STRING or OCTET STRING type, ASN-1Step will redefine the type to a restricted character string type according to its tag number.

M DEFINITIONS IMPLICIT TAGS ::= BEGIN
        B-ignore ::= [UNIVERSAL 1] IMPLICIT BOOLEAN

        CS-ignore ::= [UNIVERSAL 29] CHARACTER STRING
        OS-ignore ::= [UNIVERSAL 4] OCTET STRING

        GT-ignore ::= [UNIVERSAL 24] GeneralizedTime
        UTCT-ignore ::= [UNIVERSAL 23] UTCTime
        U8-ignore ::= [UNIVERSAL 12] UTF8String
        BMP-ignore ::= [UNIVERSAL 30] BMPString

        CS-U8 ::= [UNIVERSAL 12] CHARACTER STRING
        OS-U8 ::= [UNIVERSAL 12] OCTET STRING

        CS-BMP ::= [UNIVERSAL 30] CHARACTER STRING
        OS-BMP ::= [UNIVERSAL 30] OCTET STRING  
END

In this example, the CS-U8 type is treated as a UTF8String. Following is one of the warning messages issued:

"test.asn", line 2 (M): A0307W: OSS has relaxed the standards to allow the definition of a type with tag [UNIVERSAL 1].
 This is normally invalid ASN.1.  The tag will be ignored.
        B-ignore ::= [UNIVERSAL 1] IMPLICIT BOOLEAN
                                 ^

Default Behavior

The -allow UniversalTags option is turned off.

See Also

↩Options Index


-allSampleAsn1Values | -sampleAsn1Value

These options instruct ASN-1Step to create sample values in ASN.1 value notation format for PDU types present in the ASN.1 input. The options have the following syntax:

-allSampleAsn1Values [[<flags>][,<outFileName>]]
-sampleAsn1Value <pduTypeName>[,[<flags>][,<outFileName>]]
  • The -allSampleAsn1Values option instructs the compiler to create sample values for all PDU types present in the ASN.1 input, except for artificial PDU types created for types in the "ContentsConstraint" and PDU types created by the use of component relation constraints.
  • The -sampleAsn1Value option instructs the compiler to create a sample value for the particular PDU type specified by the <pduTypeName> parameter.

By default, the ASN.1 value listing created with these options is printed to stdout. You can change this behavior using the optional <flags> and <outFileName> parameters.

The <flags> parameter is one or two of the following flags, separated by colons:

  • FILE - print the ASN.1 value listing into an <outputprefix>-samplevalues.asn file, where <outputprefix> is the last input .asn file prefix.
  • MOD - print values inside a module definition.

The <outFileName> parameter specifies the output file name to be used for ASN.1 value listing, the parameter is ignored if the FILE flag is specified in <flags>.

Consider the following ASN.1 example (bcas.asn):

Bcas DEFINITIONS ::= BEGIN

    BBCard ::= SEQUENCE {
        name IA5String (SIZE (1..60)),
        team IA5String (SIZE (1..60)),
        age INTEGER (1..100),
        position IA5String (SIZE (1..60)),
        handedness ENUMERATED {left-handed(0), right-handed(1), ambidextrous(2)},
        batting-average REAL
    }

 END

Issue the following command:

asn1step bcas.asn -allSampleAsn1Values

After execution, you should see output similar to the following:

ASN1STEP: Creating sample values for all PDU types

    samplevalue-BBCard Bcas.BBCard ::= {
        name            "name",
        team            "team",
        age             1,
        position        "position",
        handedness      left-handed,
        batting-average 0
    }

    C0043I: 0 error messages, 0 warning messages and 0 informatory messages issued.

This command

asn1step bcas.asn -sampleAsn1Value BBCard,FILE:MOD

will create the bcas-samplevalues.asn file with the following content:

OSS-SAMPLE-VALUES-MODULE
    DEFINITIONS ::=
    BEGIN
    IMPORTS
        BBCard
        FROM Bcas;

    samplevalue-BBCard BBCard ::= {
        name            "name",
        team            "team",
        age             1,
        position        "position",
        handedness      left-handed,
        batting-average 0
    }

    END

This command:

asn1step bcas.asn -sampleAsn1Value BBCard,MOD,myBcasValues.asn

will create the myBcasValues.asn file with the same content as in the bcas-samplevalues.asn from the previous example.

Default Behavior

These options are turned off.

↩Options Index


-asn1Value

Instructs ASN-1Step to generate ASN.1 value notation for an input encoded message when the -decodePdu option is used or implied or for specified ASN.1 value references in input ASN.1 when the -encode option is used.

The output ASN.1 value notation is placed in a text file whose name, by default, is based on the corresponding input encoding files (e.g., myValue.ber.txt for the input encoding file named myValue.ber) or based on the corresponding value reference name (e.g., myValueRef.txt for the ASN.1 value reference myValueRef). Use the -output option to specify a different name or the -putFiles option to specify a different location and optionally a different name prefix for the output text file.

Examples

asn1step bcas.asn -decodePdu BBCard bcas.ber -asn1value

In the above example, the input BER-encoded value stored in the bcas.ber file will be decoded and the corresponding ASN.1 value will be written to the bcas.ber.txt file. If several input files with encoded messages are specified along with the -decode, -asn1Value, and -output options, all values are added to one text file with the same prefix as the -output option's parameter, with the .txt extension. If the -putFiles option is specified, all values are written to multiple files at the specified location with an optional common file name prefix. Files are distinguished by an underscore and a number suffix. If the -concatenate option is also specified and the output file already exists, the new ASN.1 values are appended to the end of the existing text file.

asn1step bcas.asn -encode myCard -asn1value

In the above example, the ASN.1 value reference myCard defined in the input ASN.1 will be encoded using all licensed encoding rules and the corresponding ASN.1 value will be written to the myCard.txt file.

Default Behavior

The -asn1Value option is turned off.

↩Options Index


-assignments

Instructs ASN-1Step to process type and value assignments found outside defined input modules.

Example

 Module1 DEFINITIONS ::= BEGIN
    MyInt ::= INTEGER
 END

    ExtraModularType ::= INTEGER

 Module2 DEFINITIONS ::= BEGIN
    MyBit ::= INTEGER
 END
  

If the -assignments option is not specified, ASN-1Step issues an error because ExtraModularType is outside of a BEGIN-END ASN.1 module.

Default Behavior

The -assignments option is turned off.

↩Options Index


-autoEncDec

Allows automatic encoding and decoding of open types when constraint checking is disabled (-noConstraints).

Default Behavior

The -autoEncDec option is turned off.

See Also

↩Options Index


-binCharacters [numGroupChars]

Specifies that BER, DER, PER Aligned or Unaligned, OER, or COER encoded data should be read/written to a text file containing binary characters (i.e., '0's and '1's). For example, the following command issued for samples/sample.asn:

asn1step sample.asn sample.ber -bin -encodeValue myName

will produce a text file named sample.ber that contains:

00010110 00000011 01001111 01010011 01010011

The optional numGroupChars argument specifies the number of '0's and '1's that should be printed before a white space is inserted. By default, numGroupChars has a value of 8.

Remarks

ASN-1Step writes the output encoded data to a binary file and expects the input encoded data to be contained within a binary file.

Default Behavior

The -autoEncDec option is turned off.

See Also

↩Options Index


-commandFile commandFileName

Specifies the name of the text-file containing command-line options for the current invocation of ASN-1Step. This option is useful on systems that do not permit long command lines or do not support command-line continuation characters. Options contained in the file are treated as if they were entered on the command line. The file can consist of several lines; ASN-1Step will read all of them.

Example

The following command invokes ASN-1Step using the command-line tokens contained in the tenLinesOfOptions.opt text file :

asn1step -commandFile tenLinesOfOptions.opt

Remarks

Command files can contain comments. The "--" characters specify the beginning of a comment. They can be placed anywhere on the line. The comment continues until a subsequent "--" is reached or the line ends.

Default Behavior

The -commandFile option is turned off.

↩Options Index


-concatenate

Can be used along with the -output or -putFiles option to instruct ASN-1Step to preserve the content of the output file, if it exists. New records will be added to the end of the existing output file when this option is specified.

Default Behavior

The -concatenate option is turned off.

↩Options Index


-constraints | -noConstraints

The -constraints option instructs ASN-1Step to check constraints.

The -noConstraints option specifies that no constraint checking is done, which results in a slightly faster execution.

Default Behavior

The -constraints option is turned on.

↩Options Index


-csv flags

Instructs the compiler to convert ASN.1 to or from the Comma-Separated Value (CSV) format. The -csv option can be used with the -allEncode, -encodeValue, -decodePDU, or -test option. You can specify one or more comma-separated flags immediately after the option.

Examples

In the following example, -csv is used with -encodeValue. The myCard ASN.1 value is encoded as myCard.csv using CSV column format. OCTET STRING type values without the OSS.PrintFunctionName directive and an OSS conversion function are converted to TBCD. The '=' character is a column separator, and extra CSVs are created for a maximum of 3 components from each SET OF and SEQUENCE OF value.

asn1step bcas.asn -encodeValue myCard -csv tbcd,column,=,3

In the next example, -csv is used with -decodePDU. The input value encoded in CSV is stored in the myCard.csv file, which is decoded using the ascii, noheader, ':' flags. The flags assume that the CSV has a row format, the header is absent, and ':' is used as a column separator. OCTET STRING type values are converted from ASCII to the internal format if they do not have the OSS.PrintFunctionName directive with an OSS conversion function.

asn1step bcas.asn -decodePDU BBCard myCard.csv -csv nohead,ascii,':'

When decoding succeeds, CSVs will not be re-encoded with the same flags. Conversely, when decoding is successful using BER, PER, or other encoding rules, re-encoding is performed.

When decoding fails, ASN-1Step attempts to determine the format of the input .csv file and decode it. If this decoding succeeds, then the .csv file is re-encoded using the flags from the -csv option to create the output myCard.csv file. If it fails, the error from the first decoding is re-issued.

For OCTET STRING type values that do not have the OSS.PrintFunctionName directive with an OSS conversion function, you can select the ASCII, BCD, or TBCD format.

OSS conversion functions

  • ossPrintOctetAsBCDString
  • ossPrintOctetAsTBCDString
  • ossPrintOctetAsASCII
  • ossPrintOctetAsIPAddress
  • ossPrintOctetAsTimeStamp

When the OCTET STRING type values have the OSS.PrintFunctionName directive containing an OSS conversion function as a parameter in the input ASN.1 syntax, then the values are always converted to the format related to the function name: BCD, TBCD, ASCII, IP address, or a time stamp format.

Flags used to parse CSV input and to create CSV output

Flag names can be truncated.

CSV Flag Description
ascii Converts values of OCTET STRING types (that do not have OSS.PrintFunctionName directives with an OSS conversion function) from ASCII when decoding input CSVs and to ASCII when creating output CSVs.
column Indicates that the input or output CSVs are placed on a separate line, possibly following an optional CSV header name and a column separator.
bcd Converts OCTET STRING type values (that do not have the OSS.PrintFunctionName directive with an OSS conversion function) to or from BCD.
dashes Converts GeneralizedTime type values and values of OCTET STRING types that have the OSS.PrintFunctionName directive with the ossPrintOctetAsTimeStamp parameter to or from the following time stamp format: YYYY-MM-DD HH:MM:SS.
Example: 2007-11-07 11:36:49
digit Prints BOOLEAN and ENUMERATED type values as their related integers.
extended Indicates that the CSV header includes full absolute reference names with the following additions:
  • The PDU name prefix is added to all nodes.
  • The * token is used for unnamed components of SET OF and SEQUENCE OF types.
  • The component index, starting with "1", is used for unnamed components of SET, SEQUENCE, and CHOICE types.
noauto Indicates that open type values are not automatically decoded. If the XER encoding rules are available, open type values are printed in XML. Otherwise, the first available encoding rules are used to handle open type values, either in XML or in hexadecimal format (for binary encoding rules).
noheader Indicates that the CSV header is absent.
pduname Indicates that the header name in the first column has the PDU name prefix.
singlenames Indicates that the CSV header includes single field names for the innermost simple types.
slashes Converts GeneralizedTime type values and values of OCTET STRING types that have the OSS.PrintFunctionName directive with the ossPrintOctetAsTimeStamp parameter to or from the following time stamp format: MM/DD/YY HH:MM:SS. Example: 06/01/00 11:36:49
spaces Indicates that column separators may have surrounding spaces in the input CSV. Also, when converting to CSV, an extra space character is added before and after the column separator.
tbcd Converts OCTET STRING type values (that do not have the OSS.PrintFunctionName directive with an OSS conversion function) to or from TBCD.
text Indicates that the input or output CSV is a null-terminated string in which Unicode characters are represented as UTF-8 encodings in text format using \x##, a special C-style character sequence.
<number> Identifies the maximum number of components of each SET OF and SEQUENCE OF type value for which an extra CSV should be created. By default, to avoid significant performance degradation, the number is limited to 50. Starting with version 10.1, the specified number can be greater than 50. The total number of additional CSVs for all SET OF and SEQUENCE OF type is limited to the maximum between the user-specified number and 50, multiplied by 50.
':' Is used as a column separator.
'=' Is used as a column separator.
';' Is used as a column separator for Windows platforms.

When -csv is specified without parameters, the following flags are used by default to create CSVs:

  • The row format is used with the comma separator without surrounding spaces.
  • The full header is used with absolute references for all fields and special PDU names or numbers inside parentheses for open type values. The underscore character is used as a name separator, for example, field1_field2_field3.
  • FALSE and TRUE values are used for BOOLEAN types.
  • Identifiers are printed for ENUMERATED types.
  • Open type values are automatically decoded.
  • OCTET STRING type values (that do not have the OSS.PrintFunctionName directive with an OSS conversion function) are printed as xmlhstrings.
  • Additional CSVs are created for up to 50 components from values of each SET OF and SEQUENCE OF type.

Example

ASN.1:

     PersonnelRecord ::= SEQUENCE {
             name     PrintableString,
             number   INTEGER OPTIONAL,
             status   BOOLEAN,
             children SEQUENCE OF ChildInformation
     }
     ChildInformation ::= SET {
             name    PrintableString,
             gender  ENUMERATED {girl(0), boy(1)},
             time    GeneralizedTime OPTIONAL
     }

     value PersonnelRecord ::= {
             name "Nancy",
             number 201,
             status TRUE,
             children {
                     {name "James", gender boy, time  "20020312123517"},
                     {name "Martha", gender girl, time "20100820045240"}
             }
     }

Command line:

     asn1step csvtest.asn -encode value -csv 

CSV:

     name,number,status,children_name,children_gender,children_time
     "Nancy",201,TRUE,"James",boy,20020312123517.000
     "Nancy",201,TRUE,"Martha",girl,20100820045240.000

Command line:

     asn1step csvtest -encode value -csv 1,=,column,spaces,dashes,pduname 

CSV:

     PersonnelRecord_name = "Nancy"
     number = 201
     status = TRUE
     children_name = "James"
     children_gender = boy
     children_time = 2002-03-12 12:35:17

Command line:
	
     asn1step csvtest.asn -encode value -csv noheader,digit,slashes

CSV:

     "Nancy",201,1,"James",1,03/12/02 12:35:17
     "Nancy",201,1,"Martha",0,08/20/10 04:52:40

Default Behavior

The -csv option is turned off.

See Also

↩Options Index


-csvEmptyOctStrIfFails

When an OCTET STRING type has the OSS.PrintFunctionName directive applied that contains an OSS conversion function as a parameter in the input ASN.1 syntax, then its values are always converted to the format related to the function name: BCD, TBCD, ASCII, IP address, or a time stamp format.

Starting with version 10.2, when conversion to the format specified in the OSS.PrintFunctionName directive fails, ASN-1Step includes the original value in hexadecimal format prefixed with the "???" string in the output CSV. The CSV decoder skips conversion for such values and processes the hexadecimal format as a regular OCTET STRING value. The -csvEmptyOctStrIfFails option instructs the CSV encoder to include empty values in CSVs for backward compatibility with previous versions of ASN-1Step.

Example

     --<OSS.PrintFunctionName Mod.OctBcd "ossPrintOctetAsBCDString">--
     Mod DEFINITIONS AUTOMATIC TAGS ::= BEGIN
         OctBcd ::= OCTET STRING
         value OctBcd ::= '12191D'H
     END


Command line:

     asn1step test -encode value -csv

Output CSV:

     OctBcd
     ???12191D


Command line:

     asn1step test.asn -encode value -csv -csvEmptyOctStr

Output CSV:

     OctBcd

Default Behavior

The -csvEmptyOctStrIfFails option is turned off.

See Also

↩Options Index


-csvMaxLevel level

Specifies the maximum nesting level inside a PDU type, starting from which values of simple types should NOT be included in the output CSV. The -csvMaxLevel option is used to create a subset of a PDU CSV. In most cases, you won't be able to decode this partial CSV. If the specified maximum level cannot include at least one simple type value, the resulting CSV could be empty.

Example

     Mod DEFINITIONS AUTOMATIC TAGS ::= BEGIN Seq ::= SEQUENCE {
           a SEQUENCE { b BOOLEAN },
           c INTEGER,
           d IA5String
     }

     value Seq ::= { 
        a { b TRUE},     
        c 10,
        d "Test" 
     }

Command line:

     asn1step test -encode value -csv

Output CSV:

     a_b,c,d
     TRUE,10,"Test"

Command line:

     asn1step test.asn -encode value -csv -csvMaxLevel 1

Output CSV:

     c,d
     10,"Test"

Default Behavior

The -csvMaxLevel option is turned off.

See Also

↩Options Index


-csvMinLevel level

Specifies the minimum nesting level inside a PDU type, which is used as a starting point to include simple type values in the output CSV. For the topmost SET, SEQUENCE, or CHOICE types, the deepest level is 0. This option is used to create a subset of a PDU CSV. In most cases, you won't be able to decode this partial CSV because, once some values and separators are skipped, the CSV structure no longer corresponds to the PDU type structure.

Example

     Mod DEFINITIONS AUTOMATIC TAGS ::= BEGIN  Choice ::= [12] CHOICE {
           a SEQUENCE { b BOOLEAN },
           c SEQUENCE { d INTEGER }
     }
     value Choice ::= c : { d  10 }

Command line:

     asn1step test.asn -encode value -csv

Output CSV:

     a_b,c_d
     ,10

Command line:

     asn1step test.asn -encode value -csv -csvMinLevel 1

Output CSV:
     c_d
     10

Default Behavior

The -csvMinLevel option is turned off.

See Also

↩Options Index


-csvSkipEmpty

Instructs the CSV encoder to skip CSVs that include only column separators and spaces; that is, CSVs with empty values for all nested simple types.

Default Behavior

The -csvSkipEmpty option is turned off.

See Also

↩Options Index


-debug | -noDebug

The -debug option instructs ASN-1Step to issue detailed trace data and error messages. The -noDebug option instructs ASN-1Step to disable tracing and detailed error messages. Disabling such detailed tracing slightly improves CPU performance.

Default Behavior

The -debug option is turned on.

↩Options Index


-decFlags anyOneValidFlag

Provides greater control over the decoding conducted by ASN-1Step. Specify one or more valid decoding flags, separated by commas or colons, immediately after the option. To disable a flag, precede it by an exclamation point ("!").

The valid decoding flags are:

  AUTOMATIC_ENCDEC
  DEBUGPDU
  DEBUG_ERRORS
  DONT_DO_DECODED
  DONT_DO_ENCODED
  DONT_FREE_ENCODED
  IGNORE_DEFER_DECODING
  IGNORE_PDU_TAG
  NOCONSTRAIN
  NOTRAPPING
  OSS_RELAXED
  OSS_SKIP_UNKNOWN_CONTENT
  OSS_TRAPPING
  STRICT_CONSTRAINT_CHECKING
  STRICT_ENCODING_DECODING_RULES
  USE_COMPRESSION


-decodePdu <pduID | pduName | 0>[,maxNum[,skippedNum]] <inputFilename.[encodingRules | cdr]> [-ber | -cer | -der | -per | -uper | -cper | -cuper | -oer | -coer | -xer | -cxer | -exer | -json | -asn1value | -csv]

Instructs ASN-1Step to decode all or up to the specified maximum number of messages of the PDU defined in the input ASN.1 specification, given its encoding in a separate file. Optionally, it will skip the specified number of messages before decoding starts. The name of this file can appear before or after the -decodePdu option on the command line.

Remarks

The -decodePdu option requires at least one argument that names the PDU in your ASN.1 specification to which the input encoding pertains. For example, you can first use the -listPduId option to learn the names and numbers of the PDUs available for encoding/decoding. Then, you can specify this name or number as an argument to -decodePdu:

asn1step bcas.asn -decodePdu BBCard myCard.xer

Unless PER is used or the input syntax contains PDUs with non-unique tags, ASN-1Step can determine the PDU name or number by specifying the 0 argument:

asn1step bcas.asn -decodePdu 0 myCard.ber

Automatic determination of the PDU number is possible only when the input ASN.1 syntax has unique PDU tags and PER (Aligned or Unaligned) is not used.

ASN-1Step can also decode multiple concatenated PDUs contained within a single input encoding file. Note that all such concatenated messages must be encoded with the same encoding rules, unless the input file has a CDR format with the type of encoding rules included in the record headers.

ASN-1Step will decode all or up to the maximum number of messages specified in the second argument after a comma separator. It can be omitted if the third argument is present after the second separator. If the third argument is present, the specified number of messages is skipped before decoding starts.

For example, use the following command to decode all BER messages from the beginning of "input.ber":

asn1step input.asn input.per -decode PduId

Use the following command to decode no more than "2" PER messages from the beginning of "input.per":

asn1step input.asn input.per -decode PduId,2

Use the following command to skip "3" BER messages before starting to decode the remaining messages from "input.ber":

asn1step input.asn input.ber -decode PduId,,3

Use the following command to decode only "1" JSON message after skipping "5" messages and ignore the rest of the input "input.json" file:

asn1step input.asn input.json -decode PduId,1,5

If the input file contains concatenated messages that pertain to various PDUs, the default decodePdu 0 option enables decoding of such messages. To use this feature, your ASN.1 specification must have unique PDU tags and the encoding rules in use cannot be PER (Aligned or Unaligned).

The inputFilename filename extension determines which encoding rules are used to decode the value:

  • .ber: Basic Encoding Rules (BER)
  • .der: Distinguished Encoding Rules (DER)
  • .per: Aligned variant of the Packed Encoding Rules (PER)
  • .uper: Unaligned variant of the Packed Encoding Rules (UPER)
  • .cper: Aligned variant of the Canonical Packed Encoding Rules (CPER)
  • .cuper: Unaligned variant of the Canonical Packed Encoding Rules (CUPER)
  • .oer: Unaligned variant of the Octet Encoding Rules (OER)
  • .coer: Unaligned variant of the Canonical Octet Encoding Rules (COER)
  • .xer: XML Encoding Rules (XER)
  • .cxer: Canonical XML Encoding Rules (CXER)
  • .cer: Canonical Encoding Rules (CER)
  • .exer: Extended XML Encoding Rules (E-XER)
  • .json: JavaScript Object Notation Encoding Rules (JSON)
  • .txt: input is interpreted as standard ASN.1 value notation
  • .csv: Comma-Separated Value (CSV) format
  • .cdr: Encoding rules for each record are determined based on the CDR record header settings. Currently BER, PER, UPER, and XER
          are supported.

Use the -getFiles option to specify the location of the input encoding files that will be filtered based on the specified filename extension that corresponds to the encoding rules used to create the files. An optional third parameter specifies a non-default format of the input files, such as a text format with hexadecimal or binary digits for files created using binary encoding rules or a special CSV format for CSV files.
Use the following command to decode messages from all .ber files included in the current directory (note that the first parameter in the option is empty). All input files have text hexadecimal format:

asn1step bcas.asn -decodePdu BBCard -getFiles ,ber,hex

Use the following command to decode messages from all .csv files included in the 'myDir' directory. All input CSV files do not have a CSV header and use ':' as a column separator:

asn1step bcas.asn -decodePdu BBCard -getFiles myDir,csv,noheader,: 

You can re-encode an input encoding message using a different set of encoding rules by specifying one of the available encoding rules options. For example:

asn1step bcas.asn -decodePdu BBCard myCard.ber -per

will re-encode the BER-encoded myCard value using Aligned PER. The output PER encoding will be written to a file named myCard.ber.per. Use the -output option to specify a different name for the output encoding file; if multiple input encoding files are specified, only a single output file is produced.

ASN-1Step can create concatenated records when re-encoding several input files. When -decodePdu and -output are specified and re-encoding or value notation creation is requested, all records encoded with the same encoding rules and all values are added to the same file. The filename prefix is derived from the parameter specified in the -output option, and the extension is derived from the encoding rules or .txt for value notation. If the -concatenate option is specified and the output file already exists, the new records are appended at the end of the existing output file.

Use the -putFiles option to produce multiple output files at the specified location for multiple input files. By default, output filenames will have prefixes derived from the input filenames and extensions derived from the output encoding rules. If the second prefix parameter is specified in the option, it is used as a common prefix for all output files that will be suffixed with an underscore and a number suffix that starts with the value of the third parameter, if specified, or '_1' is used by default. The number suffix is increased by 1 for other files with the same file name extension that is derived from the encoding rules. If the -concatenate option is also specified and an output file already exists, a new record is concatenated to the content of the existing file. In this case, the concatenated records must belong to the same PDU. Otherwise, if records were created using PER or if the syntax has PDUs with non-unique tags, the decoder cannot automatically decode all concatenated messages from such a file.

ASN-1Step supports the Comma-Separated Value (CSV) format. Note that -decodePDU behaves differently when used with an input .csv file and the -csv <flags> option compared to the other encoding rules.

When the -getfiles option is not specified, use the -csv <flags> option to

  • Specify the flags used to decode the input .csv file. When decoding succeeds, the CSVs are not re-encoded with the same flags. Conversely, when decoding is successful using BER, PER, or other encoding rules, re-encoding is performed.
  • Specify the flags used to re-create CSVs. If decoding fails when flags are used for decoding, ASN-1Step attempts to determine the input .csv file format and decode it. If decoding succeeds, the -csv flags are used to re-create the output .csv file using the new format. If it fails, the error from the first decoding is re-issued.

When the -getFiles option with the 'csv' filename extension is specified, the CSV flags explicitly specified or assumed by default describe the input CSV structure and are used to decode the input CSV files. Use the -csv <flags> option to create the output CSV files with a different structure using the specified set of flags.

Default Behavior

-decodePdu 0 is assumed when ASN-1Step encounters input encoding files on the command line and no option is specified.

See Also

↩Options Index


-demo Bcas | PersonnelRecord

Allows ASN-1Step trial users to better experience the capabilities of ASN-1Step by accessing the built-in Bcas or PersonnelRecord sample ASN.1 specifications.

Specify the -demo option followed by either the Bcas or PersonnelRecord argument, then specify any ASN-1Step option to try out the various features of ASN-1Step.

Example

List the available value references in the Bcas specification by entering the following:

asn1step -demo Bcas -valueRefTable

Output

ASN1STEP: List of valid valuereferences and associated PDU numbers:

       1  myCard

Now encode the available value reference using PER:

asn1step -demo Bcas -encodeValue myCard -per

Output

ASN1STEP: Encoding of valuereference 'myCard' for PDU #1:

Encoding to the file 'myCard.per' using PER ALIGNED encoding rule...
BBCard SEQUENCE [fieldcount (not encoded) = 6]
  name IA5String [length = 5.0]
    "Casey"
  team IA5String [length = 13.0]
    "Mudville Nine"
  age INTEGER [length (not encoded) = 0.7]
    32
  position IA5String [length = 10.0]
    "left field"
  handedness ENUMERATED [length (not encoded) = 0.2]
    2
  batting-average REAL [length = 3.0]
    1 * 2^-2
Total encoded length = 37.0
Encoded successfully in 37 bytes:
10436173 6579304D 75647669 6C6C6520 4E696E65 3E486C65 66742066 69656C64
800380FE 01

Next, analyze and decode the encoded data file as follows:

asn1step -demo Bcas -decodePdu BBCard myCard.per

Output

ASN1STEP: Decoding PDU #1 from file 'myCard.per':

rec1value BBCard ::=
{
  --TYPE INFORMATION: SEQUENCE
  --OFFSET: 0,0
  name "Casey",
    --TYPE INFORMATION: IA5String (SIZE(1..60))
    --OFFSET: 0,0; LENGTH: 6,0
    --length: <.000100> (decoded as 5)
    --padding: <00>
    --contents: .43.61.73.65.79
  team "Mudville Nine",
    --TYPE INFORMATION: IA5String (SIZE(1..60))
    --OFFSET: 6,0; LENGTH: 14,0
    --length: <.001100> (decoded as 13)
    --padding: <00>
    --contents: .4D.75.64.76.69.6C.6C.65.20.4E.69.6E.65
  age 32,
    --TYPE INFORMATION: INTEGER (1..100)
    --OFFSET: 20,0; LENGTH: 0,7
    --contents: <.0011111>
  position "left field",
    --TYPE INFORMATION: IA5String (SIZE(1..60))
    --OFFSET: 20,7; LENGTH: 11,1
    --length: <0.01001> (decoded as 10)
    --padding: <000>
    --contents: .6C.65.66.74.20.66.69.65.6C.64
  handedness ambidextrous,
    --TYPE INFORMATION: ENUMERATED {left-handed,right-handed,ambidextrous}
    --OFFSET: 32,0; LENGTH: 0,2
    --contents: <.10>
  batting-average { mantissa 1, base 2, exponent -2 }
    --TYPE INFORMATION: REAL
    --OFFSET: 32,2; LENGTH: 4,6
    --padding: <000000>
    --length: .03 (decoded as 3)
    --type of real number encoding: .80
    --exponent: .FE
    --mantissa: .01
}
--TOTAL LENGTH: 37,0
Successfully decoded 37 bytes.
rec1value BBCard ::=
{
  name "Casey",
  team "Mudville Nine",
  age 32,
  position "left field",
  handedness ambidextrous,
  batting-average { mantissa 1, base 2, exponent -2 }
}

For your reference, following are the Bcas and PersonnelRecord ASN.1 specifications.

Bcas

Bcas DEFINITIONS ::= BEGIN
	BBCard ::= SEQUENCE {
		name IA5String (SIZE (1..60)),
		team IA5String (SIZE (1..60)),
		age INTEGER (1..100),
		position IA5String (SIZE (1..60)),
		handedness ENUMERATED
			{left-handed(0), right-handed(1), ambidextrous(2)},
		batting-average REAL
	}
	myCard BBCard ::= {
		name "Casey",
		team "Mudville Nine",
		age 32,
		position "left field",
		handedness ambidextrous,
		batting-average {250, 10, -3}
	}
END

PersonnelRecord

EmployeeRecord DEFINITIONS ::= BEGIN

 PersonnelRecord ::= [APPLICATION 0] SET {
	name		      Name,
	title		  [0] VisibleString,
	number		      EmployeeNumber,
	dateOfHire	  [1] Date,
	nameOfSpouse [2] Name,
	children	SEQUENCE OF ChildInformation DEFAULT {}
 }

 ChildInformation ::= SET {
	name          Name,
	dateOfBirth   Date
 }

 Name ::= [APPLICATION 1] SEQUENCE{
	givenName	VisibleString,
	initial		VisibleString,
	familyName	VisibleString
 }

 EmployeeNumber ::= [APPLICATION 2] INTEGER
 Date ::= [APPLICATION 3] VisibleString  --  YYYY MMDD
 
 personnelRecord  PersonnelRecord ::= {
	name		{givenName "John", initial "P", familyName "Smith"},
	title		"Director",
	number		51,
	dateOfHire	"19710917",
	nameOfSpouse	{givenName "Mary", initial "T", familyName "Smith"},
	children
	{
		{name  {givenName "Ralph", initial "T", familyName "Smith"},
		dateOfBirth "19571111"},
		{name  {givenName "Susan", initial "B", familyName "Jones"},
		dateOfBirth "19590717"}
	}
 }

END

Default Behavior

The -demo option is turned off.

↩Options Index


-designerWarnings

Instructs ASN-1Step to generate additional warning messages for protocol designers writing ASN.1 specifications.

Remarks

Additional warning messages are issued in the following situations:

  • The -per, -uper, -cper, or -cuper option is specified, but a SET, SEQUENCE, or CHOICE type that contains a single component and no extension marker is found. When using PER, this will make adding fields in the future impossible; having an inextensible structured type with only one field is inefficient.
  • The -per, -uper, -cper, or -cuper option is specified and there is more than one unreferenced type in the root module, which is the last module in the input. This can cause problems determining the PDU number when decoding, as PER encodings have no tag information. In this case, the application developer must explicitly pass the desired PDU number to the decoder.
  • There is no defined object set used in a table constraint when ObjectSetFromObject notation is used for dummy information object sets.
  • An information object CLASS definition includes a WITH SYNTAX clause, but an optional element is not enclosed in square brackets ("[]").
  • A contents constraint includes only the ENCODED BY clause without a containing type defined, and automatic encoding/decoding is enabled.

Default Behavior

The -designerWarnings option is turned off.

↩Options Index


-dtd

Instructs ASN-1Step to generate multiple Data Type Definitions (DTD) files, one for each PDU. Normally, a separate DTD file is not produced, even when the XML encoding rules (XER) are requested.

Remarks

The DTD filenames will be the same as the PDU type names, with the .dtd suffix added.

When -encodeValue is specified, ASN-1Step can generate a reference for your DTD when producing its XML output for a particular PDU. Just pass the desired .dtd file on the ASN-1Step command line.

Example

asn1step bcas.asn -xer -encodeValue myValue ValueType.dtd

Only one .dtd file is allowed per invocation of ASN-1Step. When multiple -encodeValue options are used, the .dtd specified is used in the XER encoding of the last value reference.

NOTE: To have ASN-1Step generate a system reference to your DTD, leave the filename extension as .dtd. To have ASN-1Step generate a public reference to your DTD, change the filename extension to .pdtd.

Default Behavior

The -dtd option is turned off.

↩Options Index


-encFlags anyOneValidFlag

Provides greater control over the encoding conducted by ASN-1Step. Specify one or more valid encoding flags, separated by commas or colons, immediately after the option. To disable a flag, precede it by an exclamation point ("!").

The valid encoding flags are:

  AUTOMATIC_ENCDEC
  BACK_ALIGN
  COMPACT_XER_ENCODING
  DEBUGPDU
  DEBUG_ERRORS
  DEFAULT_ALIGN
  DEFINITE
  DETERMINE_ENC_LENGTH
  DONT_DO_DECODED
  DONT_DO_ENCODED
  DONT_OPTIMIZE_XMLNS
  FRONT_ALIGN
  IGNORE_DEFER_DECODING
  INDEFINITE
  NOCONSTRAIN
  NOTRAPPING
  NO_XML_DECLARATION
  OSS_AUTO_ENCODE_WITHOUT_CHECKING_CONSTRAINT
  OSS_RELAXED
  OSS_TRAPPING
  RELAY_OPEN_TYPE_IN_HEX
  STRICT_CONSTRAINT_CHECKING
  STRICT_ENCODING_DECODING_RULES
  STRICT_PER_ENCODING_OF_DEFAULT_VALUES
  USE_COMPRESSION

↩Options Index


-encodeValue <valuereference |[pduId,]<inputValueFileName.txt|inputPathWithValueFiles> [<outputFileName.encodingRules> | < -ber | -cer | -der | -per | -uper | -cper | -cuper | -oer | -coer | -xer | -cxer | -exer | -json | -csv | -asn1Value> ]

Instructs ASN-1Step to encode the valuereference specified in the input ASN.1 specification or one or more values in value notation format from the specified input text file or from all .txt files in the specified input directory using the specified PDU id. Trace data produced during encoding is also printed to standard output when this option is in use.

Remarks

Encode values in value notation format included in a text file

You can encode one or more values included in a separate text file whose name is passed to -encodeValue as a parameter. The file may contain one or more ASN.1 values in the form

<valueName> <PduTypeName> ::= <value_notation>

or simply

<value_notation>

In the latter case, you must include a PDU identifier (pduId) along with the text file name in the parameter passed to the -encodeValue option.

For example, to encode the ASN.1 value from the valueFile.txt input file to the outFile.per output file using packed encoding rules, specify

asn1step syntax.asn -encodeValue valueFile.txt outFile.per

where syntax.asn includes

Mod DEFINITIONS ::= BEGIN
        MyStr ::= IA5String
END

valueFile.txt:
     value MyStr ::= "Hello World!"

Output

ASN1STEP: Encoding of value notation from 'valueFile.txt' for PDU #1:

Encoding to the file 'outFile.per' using PER ALIGNED encoding rule...
MyStr IA5String [length = 12.0]
  "Hello World!"
Total encoded length = 13.0
Encoded successfully in 13 bytes:
0C48656C 6C6F2057 6F726C64 21

The following command encodes the ASN.1 value in valueFile.txt with all available encoding rules. A valueFile.txt.* file is generated for each set of encoding rules, where * is the file extension derived from the encoding rules.

asn1step syntax.asn -encodeValue valueFile.txt

Encode values in value notation format included in .txt files at the specified location

You can encode one or more values included in .txt files at the specified location passed to -encodeValue as a parameter.

For example, to encode all values from all .txt files from the 'myDir' location to the outFile.per output file using packed encoding rules, specify

asn1step syntax.asn -encodeValue myDir outFile.per

outputFileName

The output filename specifies where the encoded data will be written. It can appear before or after the -encodeValue option on the command line. Also, the filename extension determines which encoding rules are used to encode the value:

  • .ber: Basic Encoding Rules (BER)
  • .der: Distinguished Encoding Rules (DER)
  • .per: Aligned variant of the Packed Encoding Rules (PER)
  • .uper: Unaligned variant of the Packed Encoding Rules (UPER)
  • .cper: Aligned variant of the Canonical Packed Encoding Rules (CPER)
  • .cuper: Unaligned variant of the Canonical Packed Encoding Rules (CUPER)
  • .oer: Unaligned variant of the Octet Encoding Rules (OER)
  • .coer: Unaligned variant of the Canonical Octet Encoding Rules (COER)
  • .xer: XML Encoding Rules (XER)
  • .cxer: Canonical XML Encoding Rules (CXER)
  • .cer: Canonical Encoding Rules (CER)
  • .exer: Extended XML Encoding Rules (E-XER)
  • .json: JavaScript Object Notation Encoding Rules (JSON)
  • .csv: Comma-Separated Value (CSV) format

Specify specific encoding rules

Specify an encoding rules option along with the -encodeValue keyword to instruct ASN-1Step to encode the named value or one or more values from the input text file or from all .txt files at the specified location using the specified encoding rules. The output encoding file will have a name that is derived from the value or text file to be encoded. For example, to encode a value named myValue using DER, just specify

asn1step syntax.asn -encodeValue myValue -der

ASN-1Step will create a DER-encoding of myValue in the file myValue.der.

To encode a PDU type value with a PDU id of "1" (obtained with -listPduIdentifiers) from valueFile.txt using DER, just specify

asn1step syntax.asn -encodeValue 1,valueFile.txt -der

To encode PDU type values with a PDU id of "1" (obtained with -listPduIdentifiers) from multiple .txt files located in the current directory to multiple .der files using DER, just specify

asn1step syntax.asn -encodeValue 1,. -der

To encode values in value notation format of the PDU type from multiple .txt files located in the 'inputMyDir' directory (e.g., inputMyDir/myFile1.txt, inputMyDir/myFile2.txt, and so on) to multiple .xer files using XER, just specify

asn1step syntax.asn -encodeValue 1,inputMyDir -xer -putFiles outputMyDir

ASN-1Step will create an XER-encoding of values from the inputMyDir/myFile1.txt file in the outputMyDir/myFile1.txt.xer file, from the inputMyDir/myFile2.txt file in the outputMyDir/myFile2.txt.xer file, and so on.

Use optional flags

When used in conjunction with -encodeValue, the -xer, -cxer, or -exer option can be followed by the optional COMPACT_XER_ENCODING, NO_XML_DECLARATION, and DONT_OPTIMIZE_XMLNS flags. When specifying two or more flags, separate them with a comma (",") or colon (":"), for example,

asn1step syntax.asn -encodeValue val -xer COMPACT_XER_ENCODING:NO_XML_DECLARATION

Create concatenated records

ASN-1Step can create concatenated records when encoding several value references at once. When several -encodeValue options are specified with one or more encoding rule options along with the -output<prefix> option, ASN-1Step encodes all specified value references using the specified encoding rules and creates one or more output encoding files. The filenames will have the same prefix as the prefix parameter and the file extensions will be derived from the encoding rules used to encode the values. In addition, if the -concatenate option is specified and the output file already exists, the new records are appended to the content of the output file. In this case, you must make sure that the concatenated records belong to the same PDU. Otherwise, if records were created using PER encoding rules or if the syntax has non-unique PDU tags the decoder will not be able to automatically decode all concatenated messages.

Default Behavior

By default, this option is turned off and ASN-1Step only performs a syntax check on the input files.

See Also

↩Options Index


-errorFile errorFilename

Redirects ASN-1Step error, warning, and informatory messages to a named error file. This is useful on platforms that do not have a simple mechanism for redirecting stdout and stderr to a file.

Remarks

If an error is detected on the command line before the -errorFile option, the message is written to stdout instead of to the error file. List the -errorFile option first on the command line (as shown below) so that all messages resulting from errors on the command line are written to the error file:

asn1step -err myerrs.err foo.asn -test

A suffix of .err is appended to errorFilename if it does not already have an extension. If errorFilename has an extension of .asn, it is replaced with .err; otherwise, errorFilename will keep the extension that you specify. Note that existing error-files with the same name as that specified will be overwritten by a new invocation of ASN-1Step.

Default Behavior

The -errorFile option is turned off.

↩Options Index


-flags anyOneValidFlag

Offers greater control over the encoding and decoding conducted by ASN-1Step. Specify one or more valid common encoding and decoding flags, separated by commas or colons, immediately after the option. To disable a flag, precede it by an exclamation point ("!").

Remarks

You can find a list of valid common encoding and decoding flags in the -decFlags and -encFlags sections.

↩Options Index


-generateMessages <pduID | pduName>[,maxNum[,maxAttempts]] [-ber | -cer | -der | -per | -uper | -cper | -cuper | -oer | -coer | -xer | -cxer | -exer | -json | -asn1value | -csv]

Instructs ASN-1Step to generate up to the specified maximum number of unique messages of the PDU defined in the input ASN.1 specification. One or more encoding rules options specify the encoding rules to be used to encode the randomly generated values. By default, the maximum number of messages is set to 10. The upper limit on the maximum number of messages is 10 in the trial version of ASN-1Step and 10,000 in the release version. Encoded messages are saved in the output files. Each output file contains one message. By default, all filenames have a common prefix derived from the specified PDU type name, an underscore, and a number suffix; the filename extension is derived from the encoding rules used (e.g., BBCard_1.per, BBCard_1.per, and so on). To preserve the created values in ASN.1 value notation files with matching names and the .txt extension (e.g., BBCard_1.txt, BBCard_2.txt, and so on), specify the -asn1Value option. You can use the -output or -putFiles option to change the default behavior. You can use -concatenate with either -output or -putFiles to append the generated message to the content of the output file, if it exists.

The third parameter in the option specifies the maximum number of attempts to create a unique message. The default value is set to 10. Specify 0 to skip checking messages for uniqueness and allow duplicates. If the actual number of generated files with unique messages is less than the specified maximum number, you can increase the number of attempts. The greater the specified number of attempts, the more files with unique messages, without exceeding the specified maximum in the second parameter, are created. Note that increasing the number of attempts will have no effect, for example, when the number of all possible values is less than the specified maximum. Keep in mind also that increasing the number of attempts may affect performance. To improve performance, try to specify the number of attempts as less than 10 but still great enough to create as many unique messages as possible.

Remarks

By default, ASN-1Step uses pre-defined ranges of values for different ASN.1 type-specific properties from which random values for the corresponding ASN.1 types are generated. Use the -randomLimits option to change the pre-defined ranges for some common ASN.1 type properties. Use the -seed option to specify a custom seed in the random number generator. For constrained types, ASN-1Step randomly selects values from a set of ASN.1 constraints applied to a type.

You can change some ASN.1 type properties only for the selected types by marking them with the OSS.GenRandomValues or OSS.GenOrderedValues directive. Custom limits specified in those directives have precedence over limits specified by the -randomLimits option and global pre-defined limits are assumed otherwise.

Use the -noRandomLimits option to instruct ASN-1Step to generate fixed values for all ASN.1 types and their properties for which no OSS.GenRandomValues or OSS.GenOrderedValues directive is specified. The fixed values for unmarked types are determined as follows:

  • If the -randomLimits option for a given ASN.1 built-in type property is not present, the default value from the third column of the table below is used.
  • If the -randomLimits option for a given ASN.1 built-in type is present, the minimum value from the range specified in the fourth column is used.

The following table includes descriptions of various ASN.1 type properties, their fixed default values, and their value ranges for unconstrained ASN.1 types that are used in generation of random or ordered PDU messages.

ASN.1 Type Property Default Value Value Range Description
BOOLEAN Boolean value FALSE FALSE or TRUE
BIT STRING Single bit value 0 0 or 1 for each bit
Named bit balue, if present 1 0 or 1 for all bits from a NamedBitList
Length in bits 1 Range is between 0 and 16.
CHOICE Index of the alternative 0 Range is based on the number of alternatives.
ENUMERATED Index of the enumerator 0 Range is based on the number of enumerators.
INTEGER Integer value 0 Range is between -4096 and 4096.
Named number value, if present Value of the first named number All values from a NamedNumberList and range is between -4096 and 4096.
OBJECT IDENTIFIER
OID-IRI
Root arcs of the OID tree {0 0} Set of valid top-level arcs for ITU-T and ISO root arcs and the three most popular nodes for the top-level Joint-ISO-ITU-T arc:
  • {0 0}   - /ITU-T/Recommendation
  • {0 1}   - /ITU-T/1
  • {0 2}   - /ITU-T/Administration
  • {0 3}   - /ITU-T/Network-Operator
  • {0 4}   - /ITU-T/Identified-Organization
  • {0 5}   - /ITU-T/R-Recommendation
  • {1 0}   - /ISO/Standard
  • {1 1}   - /ISO/Registration-Authority
  • {1 2}   - /ISO/Member-Body
  • {1 3}   - /ISO/Identified-Organization
  • {2 0}   - /Joint-ISO-ITU-T/0
  • {2 1}   - /Joint-ISO-ITU-T/ASN.1
  • {2 16} - /Joint-ISO-ITU-T/Country
  • {2 17} - /Joint-ISO-ITU-T/Registration-Procedures
Additional arc value 0 Range is between 0 and 4096.
Number of additional arcs 0 Range is between 0 and 8.
OCTET STRING Single octet value 0 Range is between '00' (0) and 'FF' (256) for each octet.
Length in octets 1 Range is between 0 and 16.
REAL Mantissa value 0 Range is between -4096 and 4096.
Exponent value 0 Range is between -16 and 16.
Recursive types Nesting level 0 Range is between 0 and 4.
RELATIVE-OID
RELATIVE-OID-IRI
Arc value 0 Range is between 0 and 4096.
Number of arcs 2 Range is between 1 and 8.
SET and SEQUENCE OPTIONAL field value Absent OPTIONAL field values are randomly selected between being included or excluded.
Value from DEFAULT Present Values for fields with a DEFAULT syntax are randomly excluded and included with values from a DEFAULT syntax, or with other values according to the settings in the table.
Extension addition value Included Extension addition values are randomly being included or excluded.
SET OF and
SEQUENCE OF
Number of components 1 Range is between 0 and 4.
Time types Calendar date value Day 1
Month 1
Year 2000
The range for day is between 1 and 31, for month between 1 and 12, and for year between 1980 and 2029.
Time of day value Second 0
Minute 0
Hour 0
The range for second is between 0 and 59, for minute between 0 and 59, and for hour between 0 and 23.
Restricted
character strings
Character for numeric strings 0 Range is between '0' and '9' numeric characters.
Character for other strings 0 Range is between ASCII characters with a value between 'a' (97) and 'z' (122).
Length in characters 1 Range is between 0 and 16.

The -generateMessages option requires at least one argument that names the PDU in your ASN.1 specification. You can first use the -listPduIdentifiers option to learn the names and numbers of the PDUs available for encoding/decoding. Then, you can specify this name or number as an argument to -generateMessages. Use the following command to randomly generate up to 10 unique XER encoded messages and preserve the generated values in ASN.1 value notation format in .txt files with the same filename prefixes as the corresponding .xer files:

asn1step bcas.asn -generateMessages BBCard -xer -asn1Value

Use the following command to generate up to 100 JSON messages in separate files with up to 5 attempts to create a unique JSON message.

asn1step input.asn -generateMessages PduId,100,5 -json

Use the following command to generate 10 BER messages, possibly duplicate, in separate files and limiting a range of unrestricted character strings to include 1, 2, or 3 characters 'A', 'B', and 'C':

asn1step input.asn -generateMessages PduId,,0 -randomLimits char,1,3:1char,\'A\',\'C\' -ber

Use the following command to generate up to 20 unique PER messages concatenated in the output "myFile.per" file and preserve the corresponding values in value notation format concatenated in "myFile.txt":

asn1step input.asn input.ber -generateMessages PduId,20 -per -asn1value -output myFile

Use the following command to generate up to 1000 unique OER messages in separate files with up to 20 attempts to create unique messages, place the output files with file names "outDir/myFile_10.oer", "outDir/myDile_11.oer", and so on. Do not override the content of existing output files, append an output message at the end of the file:

asn1step input.asn input.json -generateMessages PduId,1000,20 -oer -putFiles outDir/myFile,10 -concatenate

Use the following command to generate up to 10 BER messages in separate files, "input_1.ber", "input_2.ber", and so on, with up to 10 attempts to create a unique message. These filenames are selected by default when no explicit encoding rules option is specified.

Because the -noRandomLimits option is specified, use the default fixed values from the third column of the Table above for all ASN.1 types except for INTEGER types and for types marked with the OSS.GenRandomValues or OSS.GenOrderedValues directive. For INTEGER types, -randomLimits intValues,-20,20 is specified, so values between -20 (the minimum limit) and 20 (the maximum limit) are generated. If a field with an INTEGER type is marked with the OSS.GenRandomValues or OSS.GenOrderedValues directive with the type-specific value range, use the range of values from the directive. If the directive is specified without limits, use the range of values between -20 and 20 from the -randomLimits option to generate either random or ordered values.

asn1step input.asn -generateMessages PduId -noRandomLimits -randomLimits intValues,-20,20

Default Behavior

The -generateMessages option is turned off.

See Also

↩Options Index


-getFiles <path>, <ber|cer|der|per|uper|cper|cuper|oer|coer|xer|cxer|exer|json|csv|cdr>[,<flags>]

Instructs ASN-1Step to get a list of input encoding files for decoding at the specified location. The files are filtered based on the filename extension specified in the second argument that corresponds to the encoding rules used to create input encoded messages. An optional third 'flags' parameter specifies a non-default file format: hex or bin for text files with hexadecimal or binary characters for messages created using binary encoding rules; comma-separated CSV flags for CSV files.

Remarks

The second ber, cer, der, per, uper, cper, cuper, oer, coer, xer, cxer, exer, json, csv, or cdr argument is mandatory. It identifies the encoding rules to be used to decode the input encoding files.

  • When ber is specified, the DEFINITE and INDEFINITE length BER decoder is invoked.
  • When cer is specified, the CER decoder is invoked.
  • When der is specified, the DER decoder is invoked.
  • When per is specified, the aligned PER decoder is invoked.
  • When uper is specified, the unaligned PER decoder is invoked.
  • When cper is specified, the aligned Canonical PER decoder is invoked.
  • When cuper is specified, the unaligned Canonical PER decoder is invoked.
  • When oer is specified, the OER decoder is invoked.
  • When coer is specified, the Canonical OER decoder is invoked.
  • When xer is specified, the XER decoder is invoked.
  • When cxer is specified, the canonical XER decoder is invoked.
  • When exer is specified, the extended XER decoder is invoked.
  • When json is specified, the JSON decoder is invoked.
  • When cdr is specified, the encoding rules for each record in the files are determined based on the CDR record header settings. Currently BER, PER, UPER, and XER are supported.
  • When csv is specified, the CSV decoder is invoked.

The following flags can be specified with the second csv argument:

Flag Description
';' or ':' or '=' Alternative column separators
'noheader' Do not print CSV header
'singlename' Print a compact CSV header
'extended' Print an extended CSV header
'text' Do not use UTF-8 file format for CSV with Unicode characters
'column' Print values on separate lines
'spaces' Add spaces around column separators
'pduname' Specify a PDU name for the first header name
<num> Maximum number of additional CSVs for SET OF and SEQUENCE OF
'digit' Print numbers for BOOLEAN and ENUMERATED values
'noauto' Print Open Type values in XML or hexadecimal format
'ascii' or 'bcd' or 'tbcd' Specify the format for OCTET STRING values
'dashes' or 'slashes' Specify a time stamp format for GeneralizedTime values

Default Behavior

-getFiles is turned off.

See Also

↩Options Index


-hexCharacters [numGroupChars]

Specifies that BER, DER, PER (Aligned or Unaligned), OER, or COER encoded data will be read or written to a text file that contains hexadecimal characters (i.e., '0' to 'F').

Remarks

The optional numGroupChars argument specifies the number (in the range of 1 to 72) of hexadecimal characters that should be printed before a white space is inserted. By default, numGroupChars has a value of 8.

Example

The following command, issued for samples/sample.asn,

asn1step sample.asn sample.ber -hex -encodeValue myName

will produce a text file named sample.ber that contains

16034F53 53

Default Behavior

ASN-1Step writes the output encoded data to a binary file and expects the input encoded data to be contained within a binary file.

See Also

↩Options Index


-help

Displays a summary of all valid command-line options.

Example

By entering asn1step -help you can obtain a summary of valid command-line options:

OSS ASN-1Step Version 10.5
Copyright (C) 2023 OSS Nokalva, Inc.  All rights reserved.

Compiler parameters: (.D. indicates default)
  <input> <...input> . one or more ASN.1 input files
  <pdufile.<ber|per|der|uper|cper|cuper|xer|cxer|cer|exer|oer|coer|json|csv|cdr> <...>
                   ... one or more files containing encoded PDUs (binary by
                       default), suffixes determine encoding rules
  -getFiles <path>,<ber|per|der|uper|xer|cxer|cer|exer|oer|coer|json|csv|cdr>[,<flags>]
                   ... get a list of input encoding files at specified location,
                       filtered based on filename extension, corresponding to used
                       encoding rules, optional 'flags' specifies file format:
                       'hex' or 'bin' for text files with binary encodings,
                       CSV flags separated by ',' for CSV files
  -demo <Bcas|PersonnelRecord>
                   ... run pre-defined ASN.1 syntax Bcas or PersonnelRecord

  -syntax          ... perform syntax checking only
  -output name     ... use 'name' as the prefix in the output file name
                       to store encoded, possibly concatenated, messages
                       or generate XSL/DTD files at specified location
  -putFiles <path>[,<name>[,<firstNumSuffix>]]
                   ... create output encoding files at specified location,
                       optionally using 'name' as filename prefix to be
                       suffixed with underscore and number suffix that
                       starts with 'firstNumSuffix' or '_1 ' by default;
                       it is increased by '1' for other files
  -nooutput        ... do not generate output encoded files
  -tracefile file  ... write encoder/decoder information to 'file'
  -notrace         ... do not print encoder/decoder tracing information
  -printper flags  ... configure PER analyzer output
  -setnesting limit... nesting limit for decoding SET or SEQUENCE types
  -stringnest limit... nesting limit for decoding constructed strings
  -errorfile file  ... write all messages to 'file' instead of stdout/stderr

  -uniquepdu       .D. check that pdu id's are unique
  -nouniquepdu     ... do not check that pdu id's are unique
  -useXmlNames     ... generates C type and field names according to E-XER
                       "NAME" encoding instructions
  -hexchar <grpDigits>
                   ... read input encoding from or write output encoding to
                       a text file with hexadecimal characters, <grpDigits>
                       specifies a digit-spacing format for the output
  -binchar <grpDigits>
                   ... read input encoding from or write output encoding to
                       a text file with binary characters, <grpDigits>
                       specifies a digit-spacing format for the output

  -constraints     .D. check constraints at runtime
  -restrictedConstraintChecking
                   ... do not ignore the OSS.NoConstrain directive
                       when -constraints is specified
  -noconstraints   ... do not check constraints at runtime
  -relaxper        ... ignore minor PER violations on decode
  -norelaxper      .D. input PER-encoded PDU must strictly conform to PER
  -relaxber        ... ignore minor BER violations on decode
  -norelaxber      .D. input BER-encoded PDU must strictly conform to BER
  -test            ... test encoding/decoding of all ASN.1 valuereferences
  -notest          .D. do not test encoding/decoding of all ASN.1 values
  -debug           .D. issue detailed trace data and error messages
  -nodebug         ... do not issue detailed trace data and error messages
                       to slightly improve CPU performance

  -decodepdu       <pduId|pduTypeName>[,[maxNum][,<skippedNum>]]
                   ... decode all or up to 'maxNum' of PDU messages from
                       each file using a PDU id or a type name and, when
					                          before decoding starts
  -allencode       ... encode all valuereference from input ASN.1 file
  -encodevalue     <valuereference|[pduId,]<inFileName|inPath>>
                   ... encode specified valuereference from input ASN.1 file or
                       encode one or more values in value notation format from
                       input text file or input directory using specified PDU id
  -concatenate     ... concatenate one or more new encoded records to the
                       content of the output file(s) whose prefix is specified
                       in the -output or -putFiles option
  -listpduid [true]... print table of PDU numbers available for decoding,
                       <true> prints numbers of unreferenced PDU types and
                       some types marked with PDU directives
  -valuereftable   ... print table of valuereferences available for encoding
  -sampleAsn1Value <pduTypeName>[,[<flags>][,<outFileName>]]
                   ... create sample value for the specified PDU type from
                       ASN.1 input
  -allSampleAsn1Values [[<flags>][,<outFileName>]]
                   ... create sample values for all PDU types from ASN.1 input
  -generateMessages <pduId|pduTypeName>[,[maxNum][,<maxAttempts>]]
                   ... generate up to 'maxNum' of PDU messages ('10' by default)
                       using a PDU id or a type name in multiple files (with
                       -putFiles) or in a single file (with -output), perform up
                       to 'maxAttempts' to create unique values ('10' by default),
                       specify '0' to allow duplicates

  -warning         ... allow warning messages
  -nowarning       ... suppress warning messages
  -suppress msg#   ... suppress a specific message
  -ignoresuppress  ... ignore the SUPPRESS directive (display all messages)
  -verbose         ... display compilation progress messages
  -noverbose       .D. do not display compilation progress messages
  -pedantic        ... rigorously check all modules
  -nopedantic      .D. rigorously check only the root module(s)
  -relaxedMode     .D. automatically select command-line options that
                       result in relaxed compiler behavior, for example,
                       -allowBadValue, -noWarning, etc.
  -norelaxedMode   ... automatically select command-line options that
                       result in strict compiler behavior
  -informatory     ... allow informatory messages
  -noinformatory   ... suppress informatory messages
  -ignoreError msg# .. ignore a specific error (issue a warning instead)
  -designerWarnings .. issue additional warnings for protocol designers
  -allow badcase   ... allow slight deviations from the ASN.1 standard
  -1990            ... all modules conform to 1990 ASN.1 syntax
  -2021            .D. all modules conform to 2021 ASN.1 syntax

  -per             .D. use Aligned PER to encode and decode PDUs
  -cper            ... use Canonical Aligned PER to encode and decode PDUs
  -uper            .D. use Unaligned PER to encode and decode PDUs
  -cuper           ... use Canonical Unaligned PER to encode and decode PDUs
  -ber             .D. use BER to encode and decode PDUs
  -der             .D. use DER to encode and decode PDUs
  -xer <flags>     .D. use XER to encode and decode PDUs using specified flags
  -cxer            .D. use Canonical XER to encode and decode PDUs
  -cer             .D. use CER to encode and decode PDUs
  -exer <flags>    .D. use EXTENDED XER to decode and to encode with specified
                       flags separated by ':' or ','; supported flags are
                       NO_XML_DECLARATION, COMPACT_XML_ENCODING,
                       DONT_OPTIMIZE_XMLNS
  -oer             .D. use OER to encode and decode PDUs
  -coer            .D. use Canonical OER to encode and decode PDUs
  -json <flags>    .D. use JSON to encode and decode PDUs using specified flags
  -jer <flags>     ... alias to -json
  -csv <flags>     ... use CSV format to encode and decode PDUs with optional
                       flags separated by ',':
                         <';'|':'|'='> ... alternative column separators
						                          'singlename'| ... print a compact CSV header
                         'extended'>   ... print a CSV header with absolute
                                           references, starting with a PDU name,
                                           '*' for unnamed SET OF and SEQUENCE OF
                                           components, and an index for each unnamed
                                           SET, SEQUENCE, and CHOICE component
                         'text'        ... do not use UTF-8 file format for CSV
                                           with Unicode characters
                         'column'      ... print values on separate lines
                         'spaces'      ... add spaces around column separators
                         'pduname'     ... add a PDU name to the first header name
                         <num          ... maximum number 'num' of CSVs for each
                                           SET OF and SEQUENCE OF type value
                         'digit'       ... print numbers for BOOLEAN and ENUMERATED
                         'noauto'      ... print Open Type values in XML or hex
                         <'ascii'|
                         'bcd'|'tbcd'> ... format for OCTET STRING values
                         <'dashes'|
                         'slashes'>    ... format for GeneralizedTime values
  -csvMinLevel lvl ... include in the CSV only those simple type values
                       that are nested at the specified level or deeper
  -csvMaxLevel lvl ... include in the CSV only those simple type values
                       that are nested not deeper than the specified level
  -allCsvMax   num ... create up to 'num' CSVs for a top-level PDU value
  -csvSkipEmpty    ... skip CSVs with empty values for all simple types
  -csvEmptyOctStrIfFails
                   ... include in the CSV empty values for OCTET STRING with
                       OSS.PrintFunctionName directives if conversion fails
  -jsonIndent indent
                   ... use given indentation for JSON output
  -commandfile <file> ... read command line from 'file'
  -root            ... treat all modules as root modules
  -pdusforopentypes... ignore NOPDU directive for opentypes
  -nopdusforopen   ... do not generate PDUs for info objects with -noconstraints
  -allowbadvalues  ... allow generation of bad values
  -relaySafe       .D. retain unrecognized extension additions at runtime
  -norelaySafe     ... do not retain unrecognized extension additions at runtime
  -autoencdec      ... permit automatic encoding/decoding even if -noconstraint
                       is used
  -messageFormat   <format>
                   ... display error messages in <format>:
                       'oss', 'emacs' or 'msvc'

  -asn1value       ... generate ASN.1 value notation in text file when
                       decoding encoding file or encoding ASN.1 value
                       reference
  -xsl             ... generate default stylesheet for each PDU
  -dtd             ... generate document type definition file for each PDU
  <file.xsl>       ... XSL stylesheet file for XER encoder
  <file.dtd>       ... system DTD file for XER encoder
  <file.pdtd>      ... public DTD file for XER encoder

  -assignments     ... process type and value assignments defined outside
                       ASN.1 modules
  -pdusforcontainingtypes
                   ... ignore NOPDU directive for types referenced by a
                       contents constraint
  -nopdusforcontainingtypes
                   ... do not generate PDUs for types referenced by a
                       contents constraint
  -ignoreIncompleteItems
                   ... ignore incomplete ASN.1 definitions of types and values
  -ignoreRedefinedAssignments
                   ... ignore redefined ASN.1 definitions of types and values
  -truncatePrintedStrings num#
                   ... truncates long printed strings at the position
                       specified by the <num>
  -flags           ... instruct the encoder and decoder to use flags separated
                       by ':' or ','; to turn off a flag, precede it by '!'
  -encflags        ... instruct the encoder to use the flags separated
                       by ':' or ','; to turn off a flag, precede it by '!'
  -decflags        ... instruct the decoder to use the flags separated
                       by ':' or ','; to turn off a flag, precede it by '!'
  -offset num      ... find the first record to decode or skip at offset
                       'num' in the input encoding
  -recordOffset num .. start decoding at offset 'num' inside each record
  -noCDRHeadersDetection
                   ... do not automatically detect and skip CDR headers
  -sortSetChoice   ... sort SET and CHOICE components according to PER-based
                       and canonical encoding rules even when those rules
                       are not explicitly specified
  -noSortSetChoice ... skip PER-based and canonical encoding rules, that
                       require sorting of SET and CHOICE components, from
                       a set of all encoding rules implied by default
  -norandomLimits  ... generate PDU messages by selecting the first most
                       suitable value for each nested type that does not have
                       global random limits specified in the -randomLimits
                       option and it is not marked with one of the
                       OSS.GenRandomValues or OSS.GenOrderedValues directive
  -randomLimits <len|int|bit|char|1char|oct|1oct|oid|arc|man|exp|rec|sof|year>,min,max
                   ... use range of values between 'min' and 'max' in random
                       value generation for ASN.1 type property, identified
                       by the first parameter, use ':' to separate values for
                       multiple properties:
                         'length'       ... common size range for all string types
                         'intValue'     ... value range for INTEGER
                         'bitCount'     ... size range for BIT STRING
                         for OCTET STRING:
                           'octetCount' ... size range
                           '1octetValue'... one octet value range between
                                            '00' and 'FF' or 0 and 255
                         for restricted character strings:
                           'charCount'  ... size range
                           '1charValue' ... one ASCII character value range
                                            between ' ' and '~' or 32 and 126
                         for OBJECT IDENTIFIER, OID-IRI, RELATIVE-OID(-IRI):
                           'arcValue'   ... arc value range
                           'oidCount'   ... arc count range
                         for REAL:
                           'mantissa'   ... mantissa value range
                           'exponent'   ... exponent value range
                         for SET OF and SEQUENCE OF:
                           'sofCount'   ... number of components range
                         'recurLevel'   ... nesting level range for recursive types
                         'year'         ... year value range for time types
  -seed value      ... use 'value' as seed for random number generator

Remarks

You can obtain a synopsis of the command-line syntax by entering asn1step with no arguments:

OSS ASN-1Step Version 10.5
Copyright (C) 2023 OSS Nokalva, Inc.  All rights reserved.

asn1step <infile(s)> [<inASN1file(s)>   |  -demo <Bcas | PersonnelRecord>]
    [-getFiles <path>,<fileExt>[,<flag>]] [-commandfile  <commandfile>   ]
    [-putFiles <path>[,[name][,numSuf]  ] |-output name| -nooutput       ]
    [-ber ] [-root ] [-1990  | -2021    ] [-relaxedMode|-norelaxedMode   ]
    [-der ]          [-test  | -notest  ] [-constrain  | -noconstrain    ]
    [-cer ]          [-warn  | -nowarn  ] [-inform     | -noinform       ]
    [-per ] [-cper ] [-debug | -nodebug ] [-pedantic   | -nopedantic     ]
    [-uper] [-cuper] [-designerWarnings ] [-unique     | -nounique       ]
    [-oer ] [-coer ] [-ignoresuppress   ] [-verbose    | -noverbose      ]
    [-xer   <flags>] [-suppress    msg# ] [-relaxper   | -norelaxper     ]
    [-exer  <flags>] [-ignoreError msg# ] [-relaxber   | -norelaxber     ]
    [-cxer]          [-notrace          ] [-tracefile     <tracefile>    ]
    [-json  <flags>] [-jsonIndent <num> ] [-errorfile     <errorfile>    ]
    [-jer   <flags>] [-allSampleAsn1Value [<flags>][,<outfile>]]         ]
    [-asn1value    ] [-sampleAsn1Value     <pduName>[,[<flags>][,<file>]]]
    [-csv   <flags>] [-csvMinLevel level] [-csvMaxLevel   <level>        ]
    [-allCsvMax num] [-csvSkipEmpty     ] [-csvEmptyOctStrIfFails        ]
    [-flags <flags>] [-encflags  <flags>] [-decflags      <flags>        ]
    [-dtd]           [-printper  <flags>] [-allow         <badcase arg>  ]
    [-xsl]           [-allowbadvalues   ] [-binchar       <grpDigits>    ]
    [-syntax       ] [-pdusforopentypes ] [-hexchar       <grpDigits>    ]
    [-assignments  ] [-nopdusforopentype] [-messageFormat <format>       ]
    [-autoencdec   ] [-decodepdu  <pduId| pduName>[,[maxNum][,<skipNum>]]]
    [-allencode    ] [-encodevalue <vRef| [pduId,]<invaluefile|inpath>>  ]
    [-concatenate  ] [-pdusforcontaining] [-nopdusforcontainingtypes     ]
    [-offset num   ] [-recordOffset  num] [-noCDRHeadersDetection        ]
    [-listpduid    ] [-stringNesting lmt] [-ignoreRedefinedAssignments   ]
    [-valueRefTable] [-setNesting    lmt] [-restrictedConstraintChecking ]
    [-relaySafe      |-norelaySafe      ] [-truncatePrintedStrings num   ]
    [-norandomLimit] [-sortSetChoice    ] [-noSortSetChoice              ]
    [-seed numValue] [-randomLimits        <asn1TypeProperty>,min,max    ]
    [-generateMessages <pduId|pduName>  [,[maxNum][,<maxAttempts>]]      ]

enter "asn1step -help" for more information

Default Behavior

Command-line help is not displayed when input files are specified.

↩Options Index


-ignoreError errorNumber

Instructs ASN-1Step to treat certain error message numbers, specified by errorNumber, as warnings instead. Use this option to test the encoding and decoding of PDUs without correcting your ASN.1 specification. However, be aware that the values used are invalid according to the ASN.1 standard.

Remarks

The current version of ASN-1Step can ignore only the following message numbers: 49, 76, 77, 305, 319, 811, 832, 1078, 1130, 1162, 1207, and 1211.

Default Behavior

All the above errors are ignored via the default -relaxedMode option.

See Also

↩Options Index


-ignoreIncompleteItems

Instructs ASN-1Step to treat certain errors related to undefined ASN.1 types and values as warnings, and to ignore incomplete ASN.1 definitions that directly or indirectly reference undefined ASN.1 types or values. This allows you to check PDUs that are fully defined even when the input syntax contains some undefined ASN.1 definitions.

Remarks

ASN.1 types that are referenced only by ignored incomplete types are still not considered to be PDUs by ASN-1Step, unless the global or local PDU directive is applied.

Use the -verbose option along with -ignoreIncompleteItems to see the incomplete items that ASN-1Step ignored.

Example

M DEFINITIONS ::= BEGIN
   A ::= SEQUENCE {
      a1 A1,
      a2 A2,
      b B1
   }
   A1 ::= INTEGER
   A2 ::= BOOLEAN
   B ::= REAL
END

In the test.asn example above, type reference A references type B1, which is undefined.

Output of the "asn1step test.asn -noRelaxedMode" command:

"test.asn", line 5 (M): A0256W: 'B1' is referenced, but is not defined.

"test.asn", line 5 (M): A0052E: 'B1' is not defined.

C0043I: 1 error message, 1 warning message and 0 informatory messages issued.

Partial output of the "asn1step test.asn -ignoreIncompleteItems -verbose" command:

C0284I: Syntax checking file 'test.asn'.

"test.asn", line 5 (M): A0256W: 'B1' is referenced, but is not defined.

"test.asn", line 2 (M): C1215W: The definition of the type identified by the absolute reference 'M.A'
 is incomplete and will be ignored.

C0285I: Global checking abstract syntax.

C0043I: 0 error messages, 2 warning messages and 3 informatory messages issued.

NOTE: The "asn1step test.asn" command gives the same result as "asn1step test.asn -ignoreIncompleteItems" because -relaxedMode is turned on by default, which implies -ignoreIncompleteItems.

Default Behavior

The -ignoreIncompleteItems option is implied by the default -relaxedMode option and is turned off if -noRelaxedMode is specified.

See Also

↩Options Index


-ignoreRedefinedAssignments

Instructs ASN-1Step to treat some errors caused by incorrectly redefined ASN.1 types and values as warnings, and to ignore all duplicate definitions within the same ASN.1 module.

Example

M DEFINITIONS ::= BEGIN
Type ::= INTEGER
Type ::= INTEGER
END

In the test.asn example above, Type is defined twice in the same ASN.1 module, which is normally invalid ASN.1.

The "asn1step test.asn -noRelaxedMode" command without -ignoreRedefinedAssignments results in these errors:

"test.asn", line 3 (M): A0146E: Type 'Type' is illegally redefined.
Type ::= INTEGER
         ^

C0043I: 1 error message, 0 warning messages and 0 informatory messages issued.

The "asn1step test.asn -ignoreRedefinedAssignments" command results in the following:

C1310I: No critical errors found, but message(s) were suppressed due to the compiler's default permissive mode.  
Compile with -noRelaxedMode to see all messages.

C0245I: 1 warning message suppressed, 0 informatory messages suppressed.
To see the suppressed messages use the option -warningMessages.

C0043I: 0 error messages, 0 warning messages and 1 informatory message issued.

NOTE: The command "asn1step test.asn" gives the same result as "asn1step test.asn -ignoreRedefinedAssignments" because -relaxedMode is turned on by default, which implies -ignoreRedefinedAssignments.

Default Behavior

The -ignoreRedefinedAssignments option is implied by the default -relaxedMode option.

See Also

↩Options Index


-ignoreSuppress

Instructs ASN-1Step to ignore any OSS.SUPPRESS directives within an ASN.1 module definition. So, if the module definition contains an OSS.SUPPRESS directive, but the -ignoreSuppress option is specified, messages will not be suppressed.

Default Behavior

All messages identified by the OSS.SUPPRESS directive are suppressed.

↩Options Index


-informatoryMessages | -noInformatoryMessages

Specifies whether ASN-1Step should generate informatory messages.

Remarks

When either -relaxedMode or -noWarningMessages is specified, the -noInformatoryMessages option is implied.

When either -norelaxedMode or -warningMessages is specified, the -informatoryMessages option is implied.

The order in which -informatoryMessages | -noInformatoryMessages, -warningMessages | -noWarningMessages, and -relaxedMode | -noRelaxedMode appear on the command line is important. The rightmost option is enforced, which overrides any effects of the previous options.

Default Behavior

The -noInformatoryMessages option is implied via the default -relaxedMode option.

See Also

↩Options Index


-jsonIndent indent

Controls the indentation size for a JSON encoding generated by ASN-1Step. Specify a positive integer argument immediately after this option. A negative integer (-1, for example) enables compact encoding mode.

Default Behavior

The encoder indents two spaces.

↩Options Index


-listPduIdentifiers [true]

Instructs ASN-1Step to display a table of the PDUs available for decoding in the input ASN.1 specification.

Remarks

The option accepts the optional true parameter that instructs ASN-1Step to display only a subset of unreferenced ("true") PDU type names and some types marked with the PDU directive.

If the -noDebug option is specified along with -listPduIdentifiers, only available PDU numbers are printed, all PDU identifiers are printed as <anonymous>.

Example

--<OSS.PDU Mod.P>--
Mod DEFINITIONS AUTOMATIC TAGS ::= BEGIN
      P ::= SEQUENCE {
            id PCLASS.&id ({P-Set}),
            value PCLASS.&Type ({P-Set}{@id})
      }
      PCLASS ::= CLASS {
        &id INTEGER UNIQUE,
        &Type
      }
      P-Set PCLASS ::= { {&id 1, &Type VisibleString} | {&id 2, &Type P} }
      I ::= INTEGER
END

The command line "asn1step test.asn -listPduId" results in the following:

ASN1STEP: List of valid PDU numbers and associated PDU names:

       1  P
       2  I
       3  P-Set-VisibleString

The command line "asn1step test.asn -listPduId true" results in the following:

ASN1STEP: List of valid unreferenced and/or user-defined PDU numbers and associated PDU names:

       1  P
       2  I

Default Behavior

The -listPduIdentifiers option is turned off.

See Also

  • Example using the -listPduIdentifiers option

↩Options Index


-messageFormat formatScheme

Sets the format of the error, warning, and informatory messages issued by ASN-1Step. A mandatory parameter specifies which format scheme is used.

Remarks

Two format schemes are available:

oss
The default message format used by ASN-1Step:
"filename.asn", line [(moduleName)]: code: message
Example:
"msgfmt.asn", line 7 (Module-10): A0217W: The identifier 'address' is missing from the value and is assumed.
   mySeq Seq ::= {int  5, bool TRUE, "350 5th Avenue"}
                                     ^
emacs
This format is compatible with many text editors:
filename.asn:[moduleName:]line:[position:] code: message
Example:
msgfmt.asn:Module-10:7:38: A0217W: The identifier 'address' is missing from the value and is assumed.

You can feed the second format scheme to a parser or compatible text editor to help automatically find the location in the input file where the message was issued.

↩Options Index


-noCDRHeadersDetection

Instructs ASN-1Step to suppress automatic detection and skip CDR headers for certain file formats.

Remarks

The following file formats are supported:

  • CDR files that consist of a CDR file header that occupies 50 or 54 bytes and CDR records that include CDR record headers and BER-based messages.
  • CDR files that include CDR record headers that consist of a record identifier in the first two bytes and a record length in the next two bytes.

Default Behavior

The -noCDRHeadersDetection option is turned off.

↩Options Index


-noRandomLimits

The -noRandomLimits option turns off random value generation for all ASN.1 types and their properties for which neither the OSS.GenRandomValues nor the OSS.GenOrderedValues directive is specified, and when the -generateMessages option is specified. The fixed values for unmarked types are determined as follows:

  • If the -randomLimits option for a given ASN.1 built-in type property is not present, the default value from the third column of the Table in the -generateMessages section is used.
  • If the -randomLimits option for a given ASN.1 built-in type is present, the minimum value of the range from the fourth column of the Table in the -generateMessages section is used.

The limits that are used in random or ordered value generation for types marked with the OSS.GenRandomValues or OSS.GenOrderedValues directive are determined as follows:

  • Use minimum and/or maximum values from the directive, if present.
  • If minimum and/or maximum values are absent in the directive and the -randomLimits option for the same ASN.1 type property is present, use the limits from the option.
  • If minimum and/or maximum values are absent in the directive and the -randomLimits option for the same ASN.1 type property is not specified, use the global pre-defined limits. See the fourth column of the Table in the -generateMessages section.

Examples

Use the following command to generate up to 15 unique JSON messages. Use the default fixed values for all ASN.1 types except those that are marked with the OSS.GenRandomValues or OSS.GenOrderedValues directive:

asn1step input.asn -json -generateMessages PduId,15 -noRandomLimits

Use the following command to generate up to 10 unique PER messages. Use the default fixed values for all ASN.1 types except BIT STRING types and those that are marked with the OSS.GenRandomValues or OSS.GenOrderedValues directive. Use "2" as the fixed number of bits for BIT STRING types that are not marked with the above directives or if they are specified without limit parameters. Use limits "2" and/or "4" if limit parameters are absent in the directives to generate random or ordered values for the marked BIT STRING types.

asn1step input.asn -per -generateMessages PduId,15 -noRandomLimits -randomLimits bitCount,2,4

Default Behavior

-noRandomLimits is turned off. Random value generation is used with the pre-defined limits for all properties for all types, except for the types for which the OSS.GenRandomValues or OSS.GenOrderedValues is specified.

See Also

↩Options Index


-offset num

Instructs ASN-1Step to locate the first record to decode by skipping num bytes at the beginning of the input encoding.

Remarks

If the input file contains an encoding in text, binary, or hexadecimal format, num bytes is calculated after skipping any number of spaces between digits and after converting from text to binary format.

The -offset option can be used to skip the 3GPP header (included in CDR files) that occupies 50 or 54 bytes. For CDR files, if you use the -offset option with the -recordOffset recNum option, ASN-1Step will skip a CDR header that occupies 4 bytes at the beginning of each record.

Examples

Skip 100 bytes at the beginning of text.ber and start decoding:

asn1step test.asn test.ber -offset 100

Start decoding the first record at offset 54 and the next records at offset 4:

asn1step test.asn -decode PduName test.ber -offset 50 -recordOffset 4

Default Behavior

-offset is turned off; however, ASN-1Step automatically tries to detect and skip CDR headers in the input file with BER-based encoded messages.

The following file formats are supported:

  • CDR files that consist of a CDR file header that occupies 50 or 54 bytes and CDR records that include CDR record headers and BER-based messages.
  • CDR files that include CDR record headers that consist of a record identifier in the first two bytes and a record length in the next two bytes.

To suppress automatic detection, use the -noCDRHeadersDetection command-line option.

See Also

↩Options Index


-output <prefix | path> | -noOutput

Specifies the filename prefix, which may start with a directory path, in the output encoding file where message(s) encoded using the same encoding rules or values in ASN.1 value format, possibly concatenated, are saved when the -allEncode, -encodeValue, -decodePDU with re-encoding, or -generateMessages option is specified. The output filename extension corresponds to the encoding rules used.

When -dtd or -xsl is used, the argument specifies the location where DTD/XSL files are generated.

The -noOutput option instructs ASN-1Step to suppress creating output files when the -allEncode, -encodeValue, -decodePDU with re-encoding, or -generateMessages option is specified.

Remarks

When the -decodeValue option is specified and multiple separate input files are present and a re-encoding action is requested, all records created with the same encoding rules are concatenated in the same output file with the extension corresponding to the specified encoding rules. However, if multiple separate input files are present only the output file corresponding to the first input file will have its name affected.

To re-encode multiple files to multiple files with a common filename prefix or to one different from the current prefix, use the -putFiles option instead of -output.

Example

Use the following command to encode all value references included in the input ASN.1 using BER and save all encoded messages in the output file C:/myDir/MyAsn1.ber.

asn1step -allEncode syntax.asn -ber -output C:/myDir/MyAsn1

Use the following command to re-encode multiple .ber files from the 'myInputDir' directory using XER rules and save all messages in the 'myOutName.xer' file. Save all DTD files in the 'myOutName' directory. The directory is created if it does not exist.

asn1step -syntax.asn -decode PduId -getFiles myInputDir,ber -xer -output myOutName -dtd

Default Behavior

ASN-1Step places its output files in the current working directory.

See Also

↩Options Index


-pdusForContainingTypes | -noPdusForContainingTypes

The -pdusForContainingTypes option instructs ASN-1Step to always treat types referenced by contents constraints as PDUs.

The -noPdusForContainingTypes option instructs ASN-1Step to not assign PDU numbers to types referenced by contents constraints. In this case, the automatic encoding or decoding of BIT STRING and OCTET STRING types defined with CONTAINING will not be performed.

Default Behavior

Both options are turned off.

↩Options Index


-pdusForOpenTypes | -noPdusForOpenTypes

These options tell ASN-1Step whether to treat open types created by either the ASN1.DeferDecoding or OSS.ENCODABLE directive as PDUs.

Remarks

When -pdusForOpenTypes is used, open types created by any of the ways listed below are treated as PDUs, even when the OSS.NOPDU directive is specified (globally or locally):

  • ASN1.DeferDecoding directive
  • OSS.ENCODABLE directive
  • Component relation constraints

When -noPdusForOpenTypes is used, the compiler does not generate PDU numbers for any open types. For ASN.1 notations with a large number of PDU types, this option can help to prevent the following ASN.1 compiler error:

C0923E: Implementation limit exceeded; too many fields in module.

The -noPdusForOpenTypes option can only be used together with the -noConstraints option, otherwise it will be ignored.

Default Behavior

Both the -pdusForOpenTypes and -noPdusForOpenTypes options are turned off, and only unreferenced types can become PDUs.

↩Options Index


-pedantic | -noPedantic

Instructs ASN-1Step to thoroughly check the entire abstract syntax.

Remarks

The -pedantic option specifies that the entire abstract syntax is to be thoroughly syntax checked. Normally ASN-1Step does not consider it an error if a type is referenced but never defined, so long as it is neither directly nor indirectly referenced by the root modules. The -pedantic option implies the -syntaxOnly option, so no values are encoded or decoded; only a syntax check is performed.

Default Behavior

The -pedantic option is turned off, -noPedantic is implied.

See Also

↩Options Index


-printPerFlags anyOneValidFlag

Offers greater control over the output PER analysis conducted by ASN-1Step.

Remarks

You must specify one or more valid PER analyzer flags, separated by commas or colons, immediately after this option.

The valid flags and their descriptions are listed in the following table:

PER Analysis Flag Description
OSS_ASN_ONLY Print ASN.1 value notation only.
OSS_HEXBYTES Print full bytes with hexadecimal notation.
OSS_SEPARATE_ASN Separate ASN.1 values.
OSS_NOBRACES Do not print braces.
OSS_NO_CONTAINED_TYPE Do not print information about contained types.
OSS_NO_CONTAINED_TYPE_TRACE Do not print trace information for non-PER encodings of contained types.
OSS_NO_TIME_DETAILS Do not print details for TIME types.
OSS_NO_TRACE_FOR_TRUNCATED_ELEMENTS Do not print trace information for truncated elements of SEQUENCE OF and SET OF types with OSS.Truncate.
OSS_PRINT_ABSREF Print absolute references for sub-fields.
OSS_PRINT_OFFSET Print length and offset for sub-fields.
OSS_PRINT_NUMBERS Print indentation level numbers.
OSS_PRINT_TYPE_INFO Print ASN.1 type information.
OSS_PRINT_COMMENTS Print additional comments.

Default Behavior

The following PER analyzer flags are used: OSS_PRINT_OFFSET, OSS_HEXBYTES, OSS_PRINT_TYPE_INFO, OSS_PRINT_COMMENTS

↩Options Index


-putFiles <path>[,[,firstFileNumSuffix]]

When the -allEncode, -encodeValue, -decodePdu with re-encoding, or -generateMessages option is specified, use the -putFiles option to specify the location for the multiple output encoding files, an optional common filename prefix, and an optional number suffix for the first output file, which is increased by '1' for other files. When an input encoding file contains multiple concatenated messages, they are re-encoded and written in the same order to the corresponding output file. By default, the output file names are derived from value reference names (with -encodeValue), or input encoding file names used in re-encoding (with -decodePdu), or PDU type names (with -generateMessages). If the second argument is specified, it is used as a common prefix for all output files. The default suffix consists of an underscore and a number starting from "1", or the number specified in the third argument is used.

Remarks

The -putFiles option creates multiple output encoding files. If you need to create a single output file with multiple messages, use the -output option.

In addition, if the -concatenate option is specified and an output file already exists, the new record(s) is appended at the end of the existing output file.

The -noOutput option instructs ASN-1Step to suppress creating output files when the -allEncode, -encodeValue, -decodePdu with re-encoding, or -generateMessages option is specified.

Examples

Use the following command to encode the 'value1' and 'value2' valuereferences using JSON and save the results in myDir/value1.json and myDir/value2.json:

asn1step input.asn -json -encode value1 -encode value2 -putFiles myDir

Use the following command to re-encode BER-encoded messages from 'inFile.ber' and PER-encoded messages from 'inFile.per' to the 'outFile_1.xer' and 'outFile_2.xer' files using XER format in the current directory:

asn1step input.asn -decode PduId inFile.ber infile.per -xer -putFiles ,outFile

Use the following command to generate OER-encoded messages for the 'MyPdu' PDU in multiple files in the 'outDir' directory (outDir/MyPdu_5.oer, outDir/MyPdu_6.oer, and so on) and use the number '5' as the first filename suffix:

asn1step input.asn -generateMessages MyPdu -oer -putFiles outDir,,5

Use the following command to change the CSV format from all input .csv (inDir/inFile1.csv, inDir/inFile2.csv, so on) files included in the 'inDir' directory and place the resulting .csv files in the 'outDir' directory (outDir/inFile1.csv.csv, outDir/inFile2.csv.csv, so on):

asn1step input.asn -generateMessages MyPdu -oer -putFiles outDir,,5

Default Behavior

ASN-1Step places its output files in the current working directory, the output filenames are derived from input filenames or valuereference names.

See Also

↩Options Index


-randomLimits <len|int|bit|char|1char|oct|1oct|oid|arc|man|exp|rec|sof|year>,min,max

The -randomLimits option specifies a custom range of values between 'min' and 'max' to be used in random values generation for the specified ASN.1 type-specific property in the first parameter, when the -generateMessages option is specified.

By default, ASN-1Step uses a pre-defined set of values in random value generation for different ASN.1 type-specific properties, see the Table in the -generateMessages section. You can specify your own range of values for several properties using the -randomLimits option. Use a colon as a separator to specify ranges for multiple properties or specify several -randomLimits options on the command line.

ASN.1 property-specific flags

Flag names can be truncated.

Flag Description
length Common size range for different strings of BIT STRING, OCTET STRING, and unrestricted character string types
intValue Integer value range for INTEGER types
bitCount Number of bits range for BIT STRING types
octetCount Number of octets range for OCTET STRING types
1octetValue Value range for a single octet for OCTET STRING types. It should be between \'00\' and \'FF\' hexadecimal digits in single quotes or between 0 and 255 decimal values.
charCount Number of characters range for unrestricted character string types
1charValue Value range for a single ASCII character for unrestricted character string types. It should be between \' \' and \'~\' characters in single quotes or between 32 and 126 decimal values.
arcValue Non-negative integer value range for the third and up arcs for OBJECT IDENTIFIER and OID-IRI types, and for the first and up arcs for RELATIVE-OID and RELATIVE-OID-IRI types.
oidCount Number of arcs range starting from 0 for arcs after the first two root arcs for OBJECT IDENTIFIER and OID-IRI types, and starting from 1 for RELATIVE-OID and RELATIVE-OID-IRI types.
mantissa Mantissa value range for REAL types
exponent Exponent value range for REAL types
sofCount Number of components for SEQUENCE OF and SET OF types
recurLevel Nesting level range for recursive types
Year Year value range for time types

Remarks

When multiple ranges for the same property flag are specified, the last range specified on the command line is used.

Custom limits specified in the OSS.GenRandomValues and OSS.GenOrderedValues directives have precedence over limits specified by the -randomLimits option and over global pre-defined limits.

The -noRandomLimits option turns off random value generation for all ASN.1 types and their properties except for types for which the OSS.GenRandomValues or OSS.GenOrderedValues directive is specified. In this case, limits from the -randomLimits option can be used to change the fixed values for unmarked types and value ranges for types marked with the above directives.

Examples

Use the following command to generate 20 unique PER-encoded messages limiting the sizes of values for BIT STRING, OCTET STRING, and unrestricted character string types to between 2 and 5:

asn1step input.asn -per -generateMessages PduId,20 -randomLimits len,2,5

Use the following command to generate 1000, possibly duplicate, XER messages in separate files limiting values to between -10 and 0 for INTEGER types, mantissa values to between -5 and 25, and exponent values to between -3 and 6 for REAL types:

asn1step input.asn -xer -generate PduId,1000,0 -randomLimits int,-10,10 -random man,-5,25:exp,-3,6

Use the following command to generate up to 15 unique JSON messages. Use the default fixed values for all ASN.1 types except those that are marked with the OSS.GenRandomValues or OSS.GenOrderedValues directive. Use the value '100' for all INTEGER types that are not marked with those directives and use the limits '100' and/or '105' for marked INTEGER types if one or both minimum and maximum limits are absent in the directive.

asn1step input.asn -json -generateMessages PduId,15 -noRandomLimits -randomLimits intValue,100,105

Default Behavior

-randomLimits is turned off.

See Also

↩Options Index


-recordOffset num

Instructs ASN-1Step to start decoding by skipping bytes at the beginning of each record in the input encoding.

Remarks

If the input file contains an encoding in text, binary, or hexadecimal format, num bytes is calculated after skipping any number of spaces between digits and after converting from text to binary format.

The -recordOffset option can be used along with the -offset num option, which instructs ASN-1Step to find the first record to decode at -offset num at the beginning of the input encoding.

Examples

Start decoding each record at offset 10:

asn1step test.asn test.ber -recordOffset 10

Start decoding the first record at offset 54 and the next records at offset 4:

asn1step test.asn -decode PduName test.ber -offset 50 -recordOffset 4

Default Behavior

-recordOffset is turned off; however, ASN-1Step automatically tries to detect and skip CDR headers in the input file with BER-based encoded messages.

The following file formats are supported:

  • CDR files that consist of a CDR file header that occupies 50 or 54 bytes and CDR records that include CDR record headers and BER-based messages.
  • CDR files that include CDR record headers that consist of a record identifier in the first two bytes and a record length in the next two bytes.

To suppress automatic detection, use the -noCDRHeadersDetection command-line option.

See Also

↩Options Index


-relaxedMode | -norelaxedMode

Automatically selects command-line options that result in relaxed or strict compiler behavior.

Remarks

When -relaxedMode is specified, these options are automatically enabled:

  • -allow BadValues
  • -allow MixedCaseForSomeBuiltInTypesNames
  • -allow UnderscoresInAsn1Names
  • -ignoreError (for all ignorable errors)
  • -ignoreIncompleteItems
  • -ignoreRedefinedAssignments
  • -noInformatoryMessages
  • -noWarningMessages

Some significant warning messages are not suppressed when -relaxedMode is used. Use the -noWarningMessages option to suppress all warnings.

-norelaxedMode cancels the options enabled by -relaxedMode and implies the -warningMessages option.

To enable warning or informatory messages when -relaxedMode is specified, specify -warningMessages or -informatoryMessages after -relaxedMode on the command line.

To disable warning or informatory messages when -norelaxedMode is specified, specify -noWarningMessages or -noInformatoryMessages after -norelaxedMode on the command line.

Default Behavior

The -relaxedMode option is turned on.

See Also

↩Options Index


-relaxBER | -noRelaxBER

The -relaxBER option instructs ASN-1Step to silently ignore minor violations to the BER standard while decoding an encoding.

Remarks

-relaxBER instructs ASN-1Step to silently ignore the following types of violations:

  • For example, if the following syntax is used
    I ::= INTEGER (0..MAX)
    and the following encoding of a 123 decimal value is passed to the BER decoder
    0x02, 0x03, 0x80, 0x00, 0x7b
    the decoder normally issues an error message saying that a negative unsigned integer was encountered, which is in strict accordance with the ITU-T Standards. Now, if the -relaxBER option is specified, the decoder decodes the above encoding silently as if it were
    0x02, 0x04, 0x00, 0x80, 0x00, 0x7b
  • If the first 9 bits of the passed encoding are all 1's or all 0's
    0x02, 0x03, 0x00, 0x00, 0x7b
    the decoder normally complains that the integer value encoding is unnecessary long, which is in strict accordance with the Standards. If the -relaxBER option is specified, the decoder decodes such encodings silently.
  • The -relaxBER option also can disable error checks for
    • BIT STRING encodings that omit the leading octet, which tells how many non-significant trailing bits are in the encoding.
    • BIT STRING encodings that are fragmented, but each fragment contains empty octets.
    • Primitive encodings in the indefinite length form.
    • HUGE integer encodings that contain all zeros in the first 9 bits.

Default Behavior

The -noRelaxBER option is implied.

↩Options Index


-relaxPER | -noRelaxPER

The -relaxPER option instructs ASN-1Step to silently ignore minor violations to the PER standard while decoding an encoding.

Remarks

-relaxPER instructs ASN-1Step to silently ignore the following types of violations:

  • Violations relating to the length determinant (part of the PER encoding that precedes all other parts of the encoding) as specified in clause 11.9.3 of X.691. For example,
    Foo1 ::= VisibleString
    could have the following standard and valid PER ALIGNED encoding
    04 6E6E6E6E
    where the first octet (04) defines the length of the contents (in this case, the length is four octets long). However, some applications could incorrectly encode the length field so that the length value can still be retrieved but the format of the length field is non-standard, for example,
    1004 6E6E6E6E
    Normally, the PER decoder issues an error message on receiving such an encoding, since the length determinant is encoded with too many octets. Note that, according to the ASN.1 standard, a two octet length, as shown above, should only be used when the length is larger than 127. To work around such problematic encodings, specify the -relaxPER option to instruct the decoder to retrieve the correct value of the length field while ignoring its incorrect format.
  • Similarly, the -relaxPER option can also be used to instruct the decoder to accept an encoded length which is in the wrong format (i.e. it occupies more bytes than is necessary) for extension additions.
  • The -relaxPER option also can disable error checks for
    • INTEGER encodings which contain unnecessary zero octets.
    • REAL values with the mantissa or exponent encoded in a longer format than they should be.

Default Behavior

The -noRelaxPER option is implied.

↩Options Index


-relaySafe | -noRelaySafe

When specified, -noRelaySafe instructs the decoder to skip unrecognized extension additions. Otherwise, unrecognized extensions are always preserved.

Remarks

By default, the -relaySafe option is implied. ASN-1Step safely relays unknown extension additions when decoding and re-encoding messages with such additions in SEQUENCE, SET, and CHOICE types. The -noRelaySafe option instructs ASN-1Step to silently ignore unknown extension additions when decoding and re-encoding messages.

When -noRelaySafe is used, and the firewall supported version 1 of H.323 is used, and later a version 2 H.323 message containing some added fields (not defined in version 1) is received, the decoder will skip over these added fields and return only the version 1 fields to the firewall application. The problem with this is that if the firewall is to decode and re-encode the message with a new IP address, it would re-encode the message as a version 1 message since the version 2 fields were skipped over during decoding. With relay-safe decoding and encoding, the decoder will retain the value of the fields added in version 2 and, when the message is re-encoded by the firewall application, the encoder will automatically insert the version 2 fields back into the newly encoded message, resulting in a version-2-compliant message with the new IP address - even though the firewall understands only version 1 messages and even though the firewall has no clue as to what is contained in the version 2 fields.

NOTE: You cannot re-encode the unknown extension fields with a set of encoding rules that differ from those that were used to encode them originally.

Default Behavior

The -relaySafe option is turned on.

↩Options Index


-restrictedConstraintChecking

Instructs ASN-1Step not to ignore the OSS.NoConstrain directive when the explicit -constraints option is present.

Remarks

When you use -constraints with -restrictedConstraintChecking, ASN-1Step enables runtime constraint checking for all types except those that have the OSS.NoConstrain directive applied.

NOTE: The -restrictedConstraintChecking option has no effect unless the -constraints option is explicitly specified.

Default Behavior

The -restrictedConstraintChecking option is turned on.

See Also

↩Options Index


-root

Instructs ASN-1Step to treat all input modules as root modules.

Remarks

When you use the -root option, all modules are thoroughly checked for syntax, and all unreferenced types in all modules are considered PDUs.

Default Behavior

Only the last module specified on the command line is treated as a root module.

↩Options Index


-seed value

Instructs ASN-1Step to use the specified number as the seed for the random value generator to generate random values for different ASN.1 types when the -generateMessages option is specified. By default, the current time is used as the seed.

Example

Use the number '123456' as the seed in random values generation:

asn1step test.asn -generatMessages PduId -seed 123456

Default Behavior

-seed is turned off, the current time is used as the seed.

See Also

↩Options Index


-setNestingLimit nestingLimit

This option gives you control over the nesting limit of structured types (SEQUENCE, SET, SEQUENCE OF, SET OF, and CHOICE). You must specify a positive integer argument immediately after this option. Specify zero for unlimited nesting.

Default Behavior

nestingLimit is 64.

↩Options Index


-sortSetChoice | -noSortSetChoice

The -sortSetChoice option instructs ASN-1Step to sort components of SET and CHOICE types according to PER-based and canonical encoding rules requirements even when no explicit or implied command line options or encoding files with file extensions that enforce sorting were specified. Prior to version 10.5, this option could be used only when encoding to CSV or decoding from .csv files. Now it can be used independently, such as when creating or parsing ASN.1 value notation files or values printed in encoder and decoder traces.

Starting with version 10.5, the -noSortSetChoice option can be used to instruct ASN-1Step to skip PER-based and canonical encoding rules that force sorting of SET and CHOICE components when all encoding rules are implied by default, that is, when no explicit encoding rules options or encoding files were specified. When this option is specified without any explicit encoding rules options, a subset of encoding rules that do not require sorting (e.g., BER-based, JSON, XER) is used.

The -sortSetChoice option always overrides the -noSortSetChoice option.

Default Behavior

Sorting components of SET and CHOICE types depends on other explicit or implied command line options that require sorting. For example, -per or -cxer is specified when encoding or an .exer file is present on the command line when decoding.

Examples

BBCard ::= SET {
        name IA5String,
        age INTEGER,
        positions SEQUENCE OF IA5String
}
myCard BBCard ::= {
        name      "name",
        age       1,
        positions {"pos"}
}

For the syntax above, the following command

asn1step test.asn -encode myCard -csv

results in a CSV with non-sorted elements as follows because the -csv option implies BER-specific rules:

name,age,positions
"name",1,"pos"

To decode the above CSV with non-sorted elements, you will need to add the -noSortSetChoice option because all encoding rules are implied by default when no explicit encoding rules options are specified:

asn1step test.asn -decode 1 myCard.csv -noSortSetChoice

The following command with the -sortSetChoice option

asn1step test.asn -encode myCard -csv -sortSetChoice

results in a CSV with elements sorted according to PER-based and canonical rules as follows:

age,positions,name
1,"pos","name"

The following two commands

asn1step test.asn -encode myCard -asn1Value -ber
asn1step test.asn -encode myCard -asn1Value -noSortSetChoice

result in ASN.1 value notation format with non-sorted elements because BER rules are specified in the first command line and -noSortSetChoice is specified in the second:

value BBCard ::= {
  name "name",
  age 1,
  positions {
    "pos"
  }
}

The following two commands

asn1step test.asn -encode myCard -asn1Value
asn1step test.asn -encode myCard -asn1Value -ber -sortSetChoice

result in ASN.1 value notation format with elements sorted according to PER-based and canonical rules because all encoding rules are implied by default in the first case and -sortSetChoice is specified along with -ber in the second:

value BBCard ::= {
  age 1,
  positions {
    "pos"
  },
  name "name"
}

↩Options Index


-stringNestingLimit nestingLimit

This option gives you control over the nesting limit of a constructed string encoding. You must specify a positive integer argument immediately after this option. Specify zero for unlimited nesting.

Default Behavior

nestingLimit is 10.

↩Options Index


-suppress messageNumber

Instructs ASN-1Step to suppress a specific warning or informatory message.

Remarks

You can specify -suppress more than once on the command line.

messageNumber can be either the complete message identifier, such as A0210W, or only the numeric portion, such as 210.

Default Behavior

The -suppress option is turned off.

↩Options Index


-syntaxOnly

Instructs ASN-1Step to perform only a syntax check on the ASN.1 input. This is useful when you do not need to encode or decode any values but only wish to check an abstract syntax for correctness.

Default Behavior

The -syntaxOnly option is turned on.

See Also

↩Options Index


-test [-ber | -cer | -der | -per | -uper | -cper | -cuper | -oer | -coer | -xer | -cxer | -exer | -json | -csv] | -noTest

Instructs ASN-1Step to test the encoding and decoding of all value references in the input ASN.1 specification.

Remarks

The -ber, -cer, -der, -per, -uper, -cper, -cuper, -oer, -coer, -xer, -cxer, -exer, -json, and -csv arguments are optional to the -test keyword and instruct ASN-1Step as to which encoding rules should be tested. By default, all available encoding rules are tested.

  • When -ber is specified, the DEFINITE and INDEFINITE length BER encoder/decoder is invoked on the value references in the input specification.
  • When -cer is specified, the CER encoder/decoder is invoked on the value references in the input specification.
  • When -der is specified, the DER encoder/decoder is invoked on the value references in the input specification.
  • When -per is specified, the aligned PER encoder/decoder is invoked on the value references in the input specification.
  • When -uper is specified, the unaligned PER encoder/decoder is invoked on the value references in the input specification.
  • When -cper is specified, the aligned Canonical PER encoder/decoder is invoked on the value references in the input specification.
  • When -cuper is specified, the unaligned Canonical PER encoder/decoder is invoked on the value references in the input specification.
  • When -oer is specified, the OER encoder/decoder is invoked on the value references in the input specification.
  • When -coer is specified, the Canonical OER encoder/decoder is invoked on the value references in the input specification.
  • When -xer is specified, the XER encoder/decoder is invoked on the value references in the input specification. The following flags can be specified with the -xer option: COMPACT_XER_ENCODING, NO_XML_DECLARATION, DONT_OPTIMIZE_XMLNS.
  • When -cxer is specified, the canonical XER encoder/decoder is invoked on the value references in the input specification.
  • When -exer is specified, the extended XER encoder/decoder is invoked on the value references in the input specification. The following flags can be specified with the -exer option: COMPACT_XER_ENCODING, NO_XML_DECLARATION, DONT_OPTIMIZE_XMLNS.
  • When -json is specified, the JSON encoder/decoder is invoked on the value references in the input specification. The following JSON-specific flags can be specified with the -json option: JSON_COMPACT_ENCODING, JSON_ENC_CONTAINED_AS_TEXT, JSON_ENC_DEFAULT_VALUES, JSON_ENC_ABSENT_COMPONENTS, JSON_USE_UNICODE_ESCAPE_SEQUENCE.
  • When -csv is specified, the CSV encoder/decoder is invoked for the input specification value references. By default, the length of the printed CSV string is truncated for a maximum of 2048 characters. To avoid the default limit, specify -truncate 0.

The following flags can be specified with the -csv option:

Flag Description
';' or ':' or '=' Alternative column separators
'noheader' Do not print CSV header
'singlename' Print a compact CSV header
'extended' Print an extended CSV header
'text' Do not use UTF-8 file format for CSV with Unicode characters
'column' Print values on separate lines
'spaces' Add spaces around column separators
'pduname' Specify a PDU name for the first header name
<num> Maximum number of additional CSVs for SET OF and SEQUENCE OF
'digit' Print numbers for BOOLEAN and ENUMERATED values
'noauto' Print Open Type values in XML or hexadecimal format
'ascii' or 'bcd' or 'tbcd' Specify the format for OCTET STRING values
'dashes' or 'slashes' Specify a time stamp format for GeneralizedTime values

Default

-test is turned off and -noTest is assumed.

↩Options Index


-traceFile traceFilename | -noTraceFile

Instructs ASN-1Step to write all encoder/decoder trace information to the specified traceFilename file when the -decodePdu or -test option is used.

Default Behavior

This option is turned off.

↩Options Index


-truncatePrintedStrings num

Instructs ASN-1Step to truncate long printed strings at the position specified by the num parameter.

Remarks

If num is 0; no truncation occurs.

Example

A ::= IA5String
a A ::= "12345678901234567890123456789012345678901234567890"

For the syntax above, value A will be printed as follows:

value A ::= "12345678901234567890123456789012345 ..."

This is the result when -truncatePrintedStrings 48 is specified:

value A ::= "123456789012345678901234567890123456789012345678 ..."

Default Behavior

Strings longer than 35 characters are automatically truncated.

↩Options Index


-uniquePDU | -noUniquePDU

The -uniquePDU option specifies that the tags for all PDUs must be unique. When the -noUniquePDU option is specified, ASN-1Step will not issue a warning message when it finds a non-unique PDU tag.

Default Behavior

ASN-1Step issues a warning message when it detects non-unique PDU tags and BER or DER is in use.

↩Options Index


-valueRefTable

Instructs ASN-1Step to display a table of all value references in the input ASN.1 specification that are available for encoding. Each available value reference is listed along with the PDU number of its base type. Refer to section 3.1.2 for an example of how to use this option.

Default Behavior

The -valueRefTable option is turned off.

See Also

  • Example using the -valueRefTable option

↩Options Index


-verbose | -noVerbose

Specifies whether ASN-1Step should issue detailed status messages.

Remarks

These messages display information such as the current input filename and detailed ossinfo information.

Default Behavior

The -noVerbose option is enabled.

↩Options Index


-warningMessages | -noWarningMessages

Specifies whether ASN-1Step should issue warning and informatory messages.

Remarks

-warningMessages implies the -informatoryMessages option; -noWarningMessages implies the -noInformatoryMessages option.

When -norelaxedMode is used, the -warningMessages option is implied.

The order in which the -warningMessages/-noWarningMessages and -relaxedMode/-norelaxedMode options appear on the command line is important. The rightmost option takes precedence.

Default Behavior

The -noWarningMessages option is implied by the default -relaxedMode option. However, some significant warning messages are not suppressed in the default mode. To suppress all warnings, specify the -noWarningMessages option.

See Also

↩Options Index


-xsl

Allows you to generate multiple default stylesheet files, one for each PDU.

Remarks

Normally, separate stylesheets are not produced, even when the XER encoding rules are requested. Instead, you can use your own XML stylesheets or customize those previously generated.

Every stylesheet produced has an .xsl file extension and a filename prefix matching the generated name of its corresponding PDU. You can specify a different filename prefix and extension using the OSS.Stylesheet directive.

You can instruct ASN-1Step to generate a reference for your stylesheet when producing its XML output (i.e., -encodeValue is specified) for a particular PDU by passing the desired .xsl file on the ASN-1Step command line, for example,

asn1step bcas.asn -xer -encodeValue myValue ValueType.xsl

Only one .xsl file is allowed per invocation of ASN-1Step. When multiple -encodeValue options are used, the .xsl specified is used in the XER encoding of the last value reference.

Default Behavior

ASN-1Step does not generate XML stylesheets.

See Also

↩Options Index


This documentation applies to release 10.5 and later of ASN-1Step®.

Copyright © 2024 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 ASN-1Step is associated with a specific license and related unique license number. That license determines, among other things, what functions of ASN-1Step are available to you.