.\" Title: yaz\-asncomp .\" Author: .\" Generator: DocBook XSL Stylesheets v1.70.1 .\" Date: 09/04/2006 .\" Manual: .\" Source: YAZ 2.1.28 .\" .TH "YAZ\-ASNCOMP" "1" "09/04/2006" "YAZ 2.1.28" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" yaz\-asncomp \- YAZ ASN.1 compiler .SH "SYNOPSIS" .HP 12 \fByaz\-asncomp\fR [\fB\-v\fR] [\fB\-c\ \fR\fB\fIcfile\fR\fR] [\fB\-h\ \fR\fB\fIhfile\fR\fR] [\fB\-p\ \fR\fB\fIpfile\fR\fR] [\fB\-d\ \fR\fB\fIconfig\fR\fR] [\fB\-I\ \fR\fB\fIincludeout\fR\fR] [\fB\-i\ \fR\fB\fIincludedir\fR\fR] [\fB\-m\ \fR\fB\fImodule\fR\fR] [filename] .SH "DESCRIPTION" .PP \fByaz\-asncomp\fR is an ASN.1 compiler that reads an ASN.1 specification in \fIfilename\fR and produces C/C++ definitions and BER encoders/decoders for it. .PP The produced C/C++ code and header files uses the ODR module of YAZ which is a library that encodes/decodes/prints BER packages. \fByaz\-asncomp\fR 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. .PP This utility is written in Tcl. Any version of Tcl should work. .SH "OPTIONS" .TP 3n \-v Makes the ASN.1 compiler print more verbose about the various stages of operations. .TP 3n \-c \fIcfile\fR Specifies the name of the C/C++ file with encoders/decoders. .TP 3n \-h \fIhfile\fR Specifies the name of header file with definitions. .TP 3n \-p \fIpfile\fR Specifies the name of the a private header file with definitions. By default all definitions are put in header file (option \-h). .TP 3n \-d \fIdfile\fR Specifies the name of a definitions file. .TP 3n \-I \fIiout\fR Specifies first part of directory in which header files are written. .TP 3n \-i \fIidir\fR Specifies second part of directory in which header files are written. .TP 3n \-m \fImodule\fR 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. .SH "DEFINITIONS FILE" .PP 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: .PP set \fIname\fR \fIvalue\fR .PP Available variables are: .TP 3n 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. .TP 3n prefix(\fImodule\fR) This value sets prefix values for module \fImodule\fR. The value has same form as default\-prefix. .TP 3n filename(\fImodule\fR) Specifies filename for C/header file for module \fImodule\fR. .TP 3n init(\fImodule\fR,h) Code fragment to be put in first part of public header for module \fImodule\fR. .TP 3n body(\fImodule\fR,h) Code fragment to be put in last part of public header for module \fImodule\fR (trailer). .TP 3n init(\fImodule\fR,c) Code fragment to be put in first part of C based encoder/decoder for module \fImodule\fR. .TP 3n body(\fImodule\fR,c) Code fragment to be put in last part of C based encoder/decoder for module \fImodule\fR (trailer). .TP 3n map(\fImodule\fR,\fIname\fR) Maps ASN.1 type in module \fImodule\fR of \fIname\fR to value. .TP 3n membermap(\fImodule\fR,\fIname\fR,\fImember\fR) Maps member \fImember\fR in SEQUENCE/CHOICE of \fIname\fR in module \fImodule\fR 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. .TP 3n unionmap(\fImodule\fR,\fIname\fR,\fImember\fR) Maps member \fImember\fR in CHOICE of \fIname\fR in module \fImodule\fR 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. .SH "FILES" .PP \fI/usr/share/yaz/z39.50/z.tcl\fR .PP \fI/usr/share/yaz/z39.50/*.asn\fR .SH "SEE ALSO" .PP \fByaz\fR(7) .PP Section "The ODR Module" in the YAZ manual.