1YAZ-ASNCOMP(1)                     Commands                     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 DEFINITIONS 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
29           stages 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.
39           By 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
46           written.
47
48       -i idir
49           Specifies second part of directory in which header files are
50           written.
51
52       -m module
53           Specifies that ASN.1 compiler should only process the module given.
54           If this option is not specified, all modules in the ASN.1 file are
55           processed.
56

DEFINITIONS FILE

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

FILES

114       /usr/share/yaz/z39.50/z.tcl
115
116       /usr/share/yaz/z39.50/*.asn
117

SEE ALSO

119       yaz(7)
120
121       Section "The ODR Module" in the YAZ manual.
122

AUTHORS

124       Index Data
125
126
127
128YAZ 5.32.0                        05/30/2022                    YAZ-ASNCOMP(1)
Impressum