An XML, JSON, Hex Dump, or AVN (Abstract Value Notation) may be imported using the File -> Import... menu option. The supported formats for each of these file types is as follows:
Type | Description |
---|---|
XML | XML must be in the form specified in the XML Encoding Rules (XER) format as described in standard ITU-T X.693. |
JSON | JSON must be in the form specified in the JSON Encoding Rules (JER) format as described in standard ITU-T X.697. |
Hex Dump | A hexadecimal dump must be in the form generated by the Linux 'od -t x1' command. In other words, each byte is individually displayed and surrounded with a space and there is a variable-length offset preceding each line. |
AVN | Abstract Value Notation as described in standard ITU-T X.680. |
To import an XML, JSON, Hex Dump, or AVN file and convert it to a binary encoding, select the Import... option from the File menu. A file dialog will be shown. The file import filter in the lower right corner will allow either an XML, JSON, Hex Dump, or AVN file to be chosen based on extension:
Navigate to and select an XML, JSON, Hex Dump, or AVN file to import and click Open. If an existing project is currently in use, ASN1VE will ask the user if they want to use existing project information. If yes, the import is done and the dialog is complete. If no, or no project is active at the time, ASN1VE will execute the ASN.1 assignment dialog to get information on encoding rules, headers, and ASN.1 schema files.
The first window will be for selecting the type of the file into which the data should be imported:
In most cases, this specifies the encoding rules into which the data should be translated. The exception is the 'cdr' option which specifies BER encoding rules, but also allows non-ASN.1 headers to be specified:
The next window allows the ASN.1 schema to be used to be selected:
At the top, two options are available, User schema files and Built-in schema files. User schema files allows the user to select their own ASN.1 schema files. Built-in schema files presents a list of available schemas built into ASN1VE.
If User schema files is selected, the wizard shows lists for schema files and include directories. ASN.1 schema files should be added to the list of schema files that define the type of message being created. Include directories can contain additional schema files that define types used by the schema.
Clicking Add... next to either list will bring up a file dialog. Navigate to the directory or file(s) to add, highlight them, and click Open.
To remove a listed file or directory, highlight it in the list and click the Remove button next to the list.
The "Search built-in ASN.1 specifications" checkbox is used to indicate if the built-in schema repository should be searched for imported schema files.
Below the schema files and include directories, Configuration File allows the user to apply settings from an Objective Systems configuration file. To select a configuration file, click the Browse... button. See the Configuration Files section for more information.
If Built-in schema files is selected at the top, the wizard will show a list of all the available built-in schemas in ASN1VE. Click to select a schema to use.