Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

yaz-asncomp(1) [debian man page]

YAZ-ASNCOMP(1)							     Commands							    YAZ-ASNCOMP(1)

NAME
yaz-asncomp - YAZ ASN.1 compiler SYNOPSIS
yaz-asncomp [-v] [-c cfile] [-h hfile] [-p pfile] [-d config] [-I includeout] [-i includedir] [-m module] [filename] DESCRIPTION
yaz-asncomp is an ASN.1 compiler that reads an ASN.1 specification in filename and produces C/C++ definitions and BER encoders/decoders for it. The produced C/C++ code and header files uses the ODR module of YAZ which is a library that encodes/decodes/prints BER packages. yaz-asncomp allows you to specify name of resulting source via options. Alternatively, you can specify a DEFINISIONS file, which provides customized output to many output files - if the ASN.1 specification file consists of many modules. This utility is written in Tcl. Any version of Tcl should work. OPTIONS
-v Makes the ASN.1 compiler print more verbose about the various stages of operations. -c cfile Specifies the name of the C/C++ file with encoders/decoders. -h hfile Specifies the name of header file with definitions. -p pfile Specifies the name of the a private header file with definitions. By default all definitions are put in header file (option -h). -d dfile Specifies the name of a definitions file. -I iout Specifies first part of directory in which header files are written. -i idir Specifies second part of directory in which header files are written. -m module Specifies that ASN.1 compiler should only process the module given. If this option is not specified, all modules in the ASN.1 file are processed. DEFINITIONS FILE
The definitions file is really a Tcl script but follows traditional rules for Shell like configuration files. That is # denotes the beginning of a comment. Definitions are line oriented. The definitions files usually consists of a series of variable assignments of the form: set name value Available variables are: default-prefix Sets prefix for names in the produced output. The value consists of three tokens: C function prefix, C typedef prefix and preprocessor prefix respectively. prefix(module) This value sets prefix values for module module. The value has same form as default-prefix. filename(module) Specifies filename for C/header file for module module. init(module,h) Code fragment to be put in first part of public header for module module. body(module,h) Code fragment to be put in last part of public header for module module (trailer). init(module,c) Code fragment to be put in first part of C based encoder/decoder for module module. body(module,c) Code fragment to be put in last part of C based encoder/decoder for module module (trailer). map(module,name) Maps ASN.1 type in module module of name to value. membermap(module,name,member) Maps member member in SEQUENCE/CHOICE of name in module module to value. The value consists of one or two tokens. First token is name of C preprocessor part. Second token is resulting C member name. If second token is omitted the value (one token) is both preprocessor part and C struct,union. unionmap(module,name,member) Maps member member in CHOICE of name in module module to value. Value consists of to or three tokens. The first token is name of the integer in the union that is used as selector for the union itself. The second token is name of the union. The third token overrides the name of the CHOICE member; if omitted the member name is used. FILES
/usr/share/yaz/z39.50/z.tcl /usr/share/yaz/z39.50/*.asn SEE ALSO
yaz(7) Section "The ODR Module" in the YAZ manual. YAZ 4.2.30 04/16/2012 YAZ-ASNCOMP(1)

Check Out this Related Man Page

ASNTOOL(1)						     NCBI Tools User's Manual							ASNTOOL(1)

NAME
asntool - process ASN.1 module specifications SYNOPSIS
asntool [-] [-B filename] [-D N] [-G] [-I str] [-J type] [-K str] [-L str] [-M filename,...] [-P str] [-Q] [-S filename] [-T filename] [-V] [-X filename] [-Z] [-b N] [-d filename] [-e filename] [-f filename] [-l filename] -m filename [-o filename] [-p filename] [-t str] [-v filename] [-w N] [-x filename] DESCRIPTION
asntool reads, validates, and displays ASN.1 module specifications. OPTIONS
A summary of options is included below. - Print usage message -B filename Generate objects and code in files named filename.* -D N Debugging level for code generation: 0 No debugging (default) 1 Shallow debugging 2 Deep debugging 3-9 Same as 2 -G Generate object loader .c and .h files -I str Put "#include str" in generated .c file -J type Register type type with object manager -K str In generated .c, force name of #included asn header to str -L str Label registered type as str -M filename,... Search the ASN.1 modules in filename,... for external references -P str XML module prefix for DOCTYPE -Q Use quoted syntax form for generated include files -S filename Send debugging output to filename rather than stderr -T filename Dump ASN.1 tree to filename -V Force CHOICE objects to use custom structures rather than ValNodePtrs, for compatibility with some old hand-coded object loaders. -X filename Write XML DTD to filename. If filename is "m", print each module to a separate file. -Z Bit twiddle for optional zero value base slots -b N Use N-byte buffers (default = 1024; anything between 512 and 10000 is legal) -d filename Read binary values from filename (requires -t) -e filename Write binary values to filename -f filename Write ASN.1 module to filename -l filename Write ASN.1 loader to filename -m filename Read ASN.1 module from filename -o filename Write header to filename -p filename Write print values to filename -t str Expect binary values to have type str -v filename Read print values from filename -w N Limit values in #defines to N bits (default = 31; anything between 31 and 128 is legal) -x filename Write XML data to filename AUTHOR
The National Center for Biotechnology Information. NCBI
2010-09-01 ASNTOOL(1)
Man Page