1YAZ-ASNCOMP(1)                                                  YAZ-ASNCOMP(1)
2
3
4

NAME

6       yaz-asncomp - YAZ ASN.1 compiler
7

SYNOPSIS

9       yaz-asncomp [-v] [-c cfile] [-h hfile] [-p pfile] [-d config]
10                   [-I includeout] [-i includedir] [-m module] [filename]
11

DESCRIPTION

13       yaz-asncomp is an ASN.1 compiler that reads an ASN.1 specification in
14       filename and produces C/C++ definitions and BER encoders/decoders for
15       it.
16
17       The produced C/C++ code and header files uses the ODR module of YAZ
18       which is a library that encodes/decodes/prints BER packages.
19       yaz-asncomp allows you to specify name of resulting source via options.
20       Alternatively, you can specify a DEFINISIONS file, which provides
21       customized output to many output files - if the ASN.1 specification
22       file consists of many modules.
23
24       This utility is written in Tcl. Any version of Tcl should work.
25

OPTIONS

27       -v
28          Makes the ASN.1 compiler print more verbose about the various stages
29          of operations.
30
31       -c cfile
32          Specifies the name of the C/C++ file with encoders/decoders.
33
34       -h hfile
35          Specifies the name of header file with definitions.
36
37       -p pfile
38          Specifies the name of the a private header file with definitions. By
39          default all definitions are put in header file (option -h).
40
41       -d dfile
42          Specifies the name of a definitions file.
43
44       -I iout
45          Specifies first part of directory in which header files are written.
46
47       -i idir
48          Specifies second part of directory in which header files are
49          written.
50
51       -m module
52          Specifies that ASN.1 compiler should only process the module given.
53          If this option is not specified, all modules in the ASN.1 file are
54          processed.
55

DEFINITIONS FILE

57       The definitions file is really a Tcl script but follows traditional
58       rules for Shell like configuration files. That is # denotes the
59       beginning of a comment. Definitions are line oriented. The definitions
60       files usually consists of a series of variable assignments of the form:
61
62       set name value
63
64       Available variables are:
65
66       default-prefix
67          Sets prefix for names in the produced output. The value consists of
68          three tokens: C function prefix, C typedef prefix and preprocessor
69          prefix respectively.
70
71       prefix(module)
72          This value sets prefix values for module module. The value has same
73          form as default-prefix.
74
75       filename(module)
76          Specifies filename for C/header file for module module.
77
78       init(module,h)
79          Code fragment to be put in first part of public header for module
80          module.
81
82       body(module,h)
83          Code fragment to be put in last part of public header for module
84          module (trailer).
85
86       init(module,c)
87          Code fragment to be put in first part of C based encoder/decoder for
88          module module.
89
90       body(module,c)
91          Code fragment to be put in last part of C based encoder/decoder for
92          module module (trailer).
93
94       map(module,name)
95          Maps ASN.1 type in module module of name to value.
96
97       membermap(module,name,member)
98          Maps member member in SEQUENCE/CHOICE of name in module module to
99          value. The value consists of one or two tokens. First token is name
100          of C preprocessor part. Second token is resulting C member name. If
101          second token is omitted the value (one token) is both preprocessor
102          part and C struct,union.
103
104       unionmap(module,name,member)
105          Maps member member in CHOICE of name in module module to value.
106          Value consists of to or three tokens. The first token is name of the
107          integer in the union that is used as selector for the union itself.
108          The second token is name of the union. The third token overrides the
109          name of the CHOICE member; if omitted the member name is used.
110

FILES

112       /usr/share/yaz/z39.50/z.tcl
113
114       /usr/share/yaz/z39.50/*.asn
115

SEE ALSO

117       yaz(7)
118
119       Section "The ODR Module" in the YAZ manual.
120
121
122
123YAZ 2.1.54                        03/16/2007                    YAZ-ASNCOMP(1)
Impressum