File: yaz-asncomp.1

package info (click to toggle)
yaz 5.27.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,184 kB
  • sloc: xml: 123,414; ansic: 72,530; sh: 5,007; tcl: 2,169; makefile: 1,321; yacc: 382
file content (190 lines) | stat: -rw-r--r-- 5,534 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
'\" t
.\"     Title: yaz-asncomp
.\"    Author: Index Data
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 12/03/2018
.\"    Manual: Commands
.\"    Source: YAZ 5.27.1
.\"  Language: English
.\"
.TH "YAZ\-ASNCOMP" "1" "12/03/2018" "YAZ 5.27.1" "Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
yaz-asncomp \- YAZ ASN\&.1 compiler
.SH "SYNOPSIS"
.HP \w'\fByaz\-asncomp\fR\ 'u
\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 DEFINITIONS 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"
.PP
\-v
.RS 4
Makes the ASN\&.1 compiler print more verbose about the various stages of operations\&.
.RE
.PP
\-c \fIcfile\fR
.RS 4
Specifies the name of the C/C++ file with encoders/decoders\&.
.RE
.PP
\-h \fIhfile\fR
.RS 4
Specifies the name of header file with definitions\&.
.RE
.PP
\-p \fIpfile\fR
.RS 4
Specifies the name of the a private header file with definitions\&. By default all definitions are put in header file (option \-h)\&.
.RE
.PP
\-d \fIdfile\fR
.RS 4
Specifies the name of a definitions file\&.
.RE
.PP
\-I \fIiout\fR
.RS 4
Specifies first part of directory in which header files are written\&.
.RE
.PP
\-i \fIidir\fR
.RS 4
Specifies second part of directory in which header files are written\&.
.RE
.PP
\-m \fImodule\fR
.RS 4
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\&.
.RE
.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 consist of a series of variable assignments of the form:
.PP
set
\fIname\fR
\fIvalue\fR
.PP
Available variables are:
.PP
default\-prefix
.RS 4
Sets prefix for names in the produced output\&. The value consists of three tokens: C function prefix, C typedef prefix and preprocessor prefix respectively\&.
.RE
.PP
prefix(\fImodule\fR)
.RS 4
This value sets prefix values for module
\fImodule\fR\&. The value has same form as
default\-prefix\&.
.RE
.PP
filename(\fImodule\fR)
.RS 4
Specifies filename for C/header file for module
\fImodule\fR\&.
.RE
.PP
init(\fImodule\fR,h)
.RS 4
Code fragment to be put in first part of public header for module
\fImodule\fR\&.
.RE
.PP
body(\fImodule\fR,h)
.RS 4
Code fragment to be put in last part of public header for module
\fImodule\fR
(trailer)\&.
.RE
.PP
init(\fImodule\fR,c)
.RS 4
Code fragment to be put in first part of C based encoder/decoder for module
\fImodule\fR\&.
.RE
.PP
body(\fImodule\fR,c)
.RS 4
Code fragment to be put in last part of C based encoder/decoder for module
\fImodule\fR
(trailer)\&.
.RE
.PP
map(\fImodule\fR,\fIname\fR)
.RS 4
Maps ASN\&.1 type in module
\fImodule\fR
of
\fIname\fR
to value\&.
.RE
.PP
membermap(\fImodule\fR,\fIname\fR,\fImember\fR)
.RS 4
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\&.
.RE
.PP
unionmap(\fImodule\fR,\fIname\fR,\fImember\fR)
.RS 4
Maps member
\fImember\fR
in CHOICE of
\fIname\fR
in module
\fImodule\fR
to value\&. Value consists of two 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\&.
.RE
.SH "FILES"
.PP
/usr/share/yaz/z39\&.50/z\&.tcl
.PP
/usr/share/yaz/z39\&.50/*\&.asn
.SH "SEE ALSO"
.PP
\fByaz\fR(7)
.PP
Section "The ODR Module" in the YAZ manual\&.
.SH "AUTHORS"
.PP
\fBIndex Data\fR