NAME

mavcod

SYNOPSIS

mavcod [ asn1_file] [ \-srce asn1_file][ \-load asn1_files][ \-head header_file][ \-mvr mvr_file][ \-init C_file][ \-macros text_file][ \-static] [ \-compat] [ \-iapl_V1] [ \-iapl_transview] [ \-seqofsize number][ \-octetsize number][ \-nochars] [ \-noflags] [ \-keep] [ \-ser] [ \-windows] [ \-indent string ][ \-asn1 pretty_file][ \-umac asn1_file][ \-check] [ \-ll lisp_file]

DESCRIPTION

MAVCOD is the first pass of the ASN.1 compiler, MAVROS. It takes as input a file containing the description of an ASN.1 module, and produces: Optionnally, MAVCOD can be used as an ASN.1 pretty printer, or to remove "MACRO" definitions from an ASN.1 source.

OPTIONS

Several command line arguments enable the users to parametrize the actions of MAVCOD. They fall in the following categories: The name of the input file can be either: Note that MAVCOD suppose that the input files: If these conditions are not verified, MAVCOD will signal an error.

ASN.1 is a modular language. A module may contain reference to types, values and macros defined in other modules. In order to compile properly the input module, MAVCOD must be able to read the specifications contained in the "imported" modules. This can be achieved by using the "-load asn1_files"option, as in:

If this option is specified, MAVCOD will load in memory the content of the imported modules before loading the input file itself. If the input file refers to a module that is not explicitely loaded, e.g. if the first lines of the input file contain:
Module DEFINITIONS ::= BEGIN
IMPORTS
Type-1 FROM Imported-1
Type-2 FROM Imported-2
Type-3 FROM Imported-3;
and we have only loaded the first two imported modules, MAVCOD will build a file name by appending the "asn1" suffix to the required module name, as e.g. "Imported-3.asn1" and try to find that file in the current working directory. It will signal an error if the file cannot be found, and will then try to take default actions for handling the imported types and values. In some cases, e.g. if the imported type is used to produce a local value, the default actions cannot be applied succesfully and an error will be reported.

Note that if a module imports a MACRO definition, which by definition alters the regular ASN.1 syntax, the corresponding module must be explicitely loaded. Failure to do so would result in various "syntax error" reports.

By default, the names of the output files are constructed from the name of the module defined in the input file, e.g. "Module." The following options can be used to override this default behaviour:

The following options can be requested to perform special editions, or to parametrize the editions: The option -ll can be used to generate a "LISP" description of the ASN.1 data types and values.

The MAVCOD program also supports a -check option, that is used for test programs. It produces on the standard output a concatenation of several pretty printings of the input at various stages of the analysis, of the header file, of the MAVROS input file, of the initialization file and of macro knowledge file.

"SEE ALSO"

mavros (9x),
C. Huitema, "General Presentation of the MAVROS Compiler" ,INRIA, 1990

DIAGNOSTIC

The diagnostics produced by MAVCOD are intended to be self explanatory.

BUGS

The cross referencing of modules is hasardous: it supposes that exactly the same "C parametrization", e.g. that -static or -noflags were used in the different modules. One should be able to look at the definitions in the MAVROS inputs for these modules (*.mvr files), in order to extract the correct typing of the attributes.

Please report the other bugs to the authors..