Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | .TH compiler 1 "October 2014" "Ericsson Telecom AB" "TTCN-3 Tools" |
2 | .SH NAME | |
3 | compiler \- TTCN-3 and ASN.1 to C++ translator | |
4 | .SH SYNOPSIS | |
5 | .B compiler | |
feade998 | 6 | .RB "[\| " \-abcdEfgijlLMpqrRsStuwxXyY " \|]" |
970ed795 EL |
7 | .RB "[\| " \-V |
8 | .IR " verb_level" " \|]" | |
9 | .RB "[\| " \-K | |
10 | .IR " file" " \|]" | |
a38c6d4c | 11 | .RB "[\| " \-z |
12 | .IR " file" " \|]" | |
970ed795 EL |
13 | .RB "[\| " \-o |
14 | .IR " dir" " \|]" | |
15 | .RB "[\| " \-P | |
16 | .IR " top_level_pdu" " \|] ..." | |
17 | .RB "[\| " \-Q | |
18 | .IR "n" " \|] " | |
19 | .RB "[\| " \-U | |
20 | .IR "none|type" " \|] " | |
21 | .RB "[\| " \-T " \|]" | |
22 | module.ttcn ... | |
23 | .RB "[\| " \-A " \|]" | |
24 | module.asn ... | |
25 | [\| \- module.ttcn ... module.asn ... \|] | |
26 | .br | |
27 | or | |
28 | .br | |
29 | .B compiler | |
30 | .B \-v | |
af710487 | 31 | .br |
32 | or | |
33 | .br | |
34 | .B compiler \-\-ttcn2json | |
35 | .RB "[\| " \-jf " \|]" | |
36 | .RB "[\| " \-T " \|]" | |
37 | module.ttcn ... | |
38 | .RB "[\| " \-A " \|]" | |
39 | module.asn ... | |
40 | .RB "[\| " \- | |
41 | schema.json | |
42 | .RB " \|]" | |
970ed795 | 43 | .SH DESCRIPTION |
af710487 | 44 | This manual page is a quick reference for the TTCN-3 and ASN.1 to C++ (or JSON schema) |
970ed795 EL |
45 | compiler of the TTCN-3 Test Executor. It only summarizes the meaning of |
46 | all command line options. For more details please consult the | |
47 | .B Programmer's Technical Reference for TITAN TTCN-3 Test Executor. | |
48 | .SH OPTIONS | |
49 | The following options are supported (in alphabetical order): | |
50 | .TP 10 | |
51 | .BI \-A " file" | |
52 | Forces the interpretation of | |
53 | .I file | |
54 | as an | |
55 | .I ASN.1 module. | |
56 | It is useful when automatic module type detection fails | |
57 | due to some strange language constructs. The option takes exactly one file | |
58 | name as argument. The option must be repeated when used with multiple files. | |
59 | See also: option | |
60 | .B \-T. | |
61 | .TP | |
62 | .B \-a | |
63 | Force | |
64 | .I XER | |
65 | in ASN.1 files | |
66 | .TP | |
67 | .B \-b | |
68 | Disables the generation of | |
69 | .I BER | |
70 | encoder/decoder routines for all ASN.1 types. | |
71 | .TP | |
66d5fa86 BB |
72 | .B \-B |
73 | Allows the selected field in a union value to be unbound, when setting module | |
74 | parameters (legacy behavior). A warning is displayed whenever a union value | |
75 | receives an unbound selected field and when a union with an unbound selected field | |
76 | is copied. | |
77 | .TP | |
970ed795 EL |
78 | .B \-c |
79 | Write out | |
80 | .I checksums | |
81 | in case of error | |
82 | .TP | |
83 | .B \-d | |
84 | Treat ASN.1 | |
85 | .I SEQUENCE/SET | |
86 | fields with DEFAULT values as | |
87 | .I omit | |
88 | in TTCN-3. | |
89 | .TP | |
feade998 | 90 | .B \-E |
91 | Instructs the variant attribute parser to display warnings instead of errors | |
92 | for unrecognized/erroneous attributes. | |
93 | .TP | |
970ed795 EL |
94 | .B \-f |
95 | Forces the compiler to | |
96 | .I overwrite | |
97 | the output files even if they exist or are unchanged. | |
98 | .TP | |
99 | .B \-g | |
100 | The compiler error/warning messages will contain only the starting | |
101 | line number and column, in a format compatible with th GNU compiler (gcc). | |
102 | .B \-g | |
103 | takes precedence over | |
104 | .B \-i | |
105 | if both are specified. | |
106 | .TP | |
107 | .B \-i | |
108 | The compiler error/warning messages | |
109 | will contain only the | |
110 | .I line numbers, | |
111 | the column numbers will remain hidden. This option provides backward | |
112 | compatibility with the error message format of earlier versions. | |
113 | .TP | |
114 | .B \-j | |
115 | Disables JSON encoder/decoder functions. | |
116 | .TP | |
117 | .BI \-K " file" | |
118 | Enables selective code coverage. | |
119 | .TP | |
120 | .B \-l | |
121 | Instructs the compiler to generate source file and line information (i.e. | |
122 | .I #line | |
123 | directives) into the output C++ code so that the C++ compiler error | |
124 | messages refer back to the lines of original TTCN-3 input module. | |
125 | .br | |
126 | This option is | |
127 | .I obsolete | |
128 | and will be removed in future versions as the | |
129 | compiler does not generate erroneous C++ code because of the full | |
130 | semantic analysis. | |
131 | .TP | |
132 | .B \-L | |
133 | Instructs the compiler to add source file and line | |
134 | .I source file | |
135 | and | |
136 | .I line number | |
137 | information into the generated code to be included in the | |
138 | .I log | |
139 | during execution. | |
140 | .br | |
141 | This option is only a prerequisite for logging the source code information. | |
142 | Options | |
143 | .I SourceInfoFormat | |
144 | and | |
145 | .I LogEntityName | |
146 | have also to be set appropriately in section | |
147 | .I [LOGGING] | |
148 | of the run-time configuration file. | |
149 | .br | |
150 | Usage of this option a bit enlarges the size of the generated code and slightly | |
151 | reduces execution speed. This flag is not recommended when the TTCN-3 test | |
152 | suite is used for load generation. | |
153 | .TP | |
3abe9331 | 154 | .B \-M |
155 | Allows the use of the value | |
156 | .B omit | |
157 | in template lists and complemented template lists (legacy behavior). | |
158 | If set, an omitted field will match a template list, if the value | |
159 | .B omit | |
160 | appears in the list, and it will match a complemented template list, if | |
161 | .B omit | |
162 | is not in the list (the | |
163 | .B ifpresent | |
164 | attribute can still be used for matching omitted fields). This also affects the | |
165 | .B ispresent | |
166 | operation and the | |
167 | .B present | |
168 | template restriction accordingly. | |
169 | .TP | |
970ed795 EL |
170 | .BI \-o " dir" |
171 | The output files (including Test Port skeletons) will be placed into | |
172 | the directory specified by | |
173 | .I dir. | |
174 | The current working directory is the default otherwise. | |
175 | .TP | |
176 | .B \-p | |
177 | Instructs the compiler only to | |
178 | .I parse | |
179 | the given TTCN-3 and ASN.1 modules. This will detect only the syntax errors | |
180 | because semantic checkings are | |
181 | .I not | |
182 | performed. The presence of all imported modules is not necessary thus it is | |
183 | allowed (and recommended) to parse the modules one-by-one. | |
184 | .br | |
185 | All options that influence the code generation are silently ignored when used | |
186 | together with | |
187 | .B \-p. | |
188 | .br | |
189 | .B Note: | |
190 | This option includes complete syntax checks for TTCN-3 modules, but in ASN.1 | |
191 | there are some special constructs (e.g. the user-defined syntaxes) that cannot | |
192 | be even parsed without semantic analysis. So there is no guarantee that an ASN.1 | |
193 | module is free of syntax errors if it was analyzed with compiler using the | |
194 | .B -p | |
195 | flag. | |
196 | .TP | |
197 | .BI \-P " top_level_pdu" ... | |
198 | Defines a top-level pdu. | |
199 | .I top_level_pdu | |
200 | must have the following format: | |
201 | .I modulename.identifier. | |
202 | If this switch is used, then only the defined top-level PDU(s) and the | |
203 | referenced assignments are checked and included in code generation, the | |
204 | other ASN.1 assignments are skipped. | |
205 | .TP | |
206 | .B \-q | |
207 | .I Quiet | |
208 | mode. Equivalent with | |
209 | .B \-V 0. | |
210 | .TP | |
211 | .B \-Qn | |
212 | .I Quits | |
213 | after | |
214 | .B n | |
215 | errors. | |
216 | .TP | |
217 | .B \-r | |
218 | Disables the generation of | |
219 | .I RAW | |
220 | encoder/decoder routines for all TTCN-3 types. | |
221 | .TP | |
222 | .B \-R | |
223 | Use function test runtime (TITAN_RUNTIME_2). The compiler will generate source | |
224 | code for use with function test runtime. | |
225 | .TP | |
226 | .B \-s | |
227 | Instructs the compiler to parse the given TTCN-3 and ASN.1 modules and perform | |
228 | .I semantic analysis | |
229 | on them, but | |
230 | .I not | |
231 | to generate C++ output. The list of given modules shall be complete so it is | |
232 | not allowed to import from a module that is not in the list. All options that | |
233 | influence the code generation are silently ignored when used together with | |
234 | .B \-s. | |
235 | .TP | |
236 | .B \-S | |
237 | .I Suppresses | |
238 | context information. | |
239 | .TP | |
240 | .B \-t | |
241 | Generates | |
242 | .I Test Port | |
243 | skeleton header and source files for all port types that can be found in | |
244 | TTCN-3 modules. Existing Test Port files will not be overwritten unless the | |
245 | .B \-f | |
246 | option is used. | |
247 | .TP | |
248 | .BI \-T " file" | |
249 | Forces the interpretation of | |
250 | .I file | |
251 | as a | |
252 | .I TTCN-3 module. | |
253 | See also: option | |
254 | .B \-A. | |
255 | .TP | |
256 | .B \-u | |
257 | Forces the compiler to do | |
258 | .I duplicate underscore | |
259 | characters in all output file names. This option turns on the | |
260 | compatibility mode with versions 1.1 or earlier. | |
261 | .TP | |
262 | .BI \-U " none|type" | |
263 | Selects code splitting mode for the generated C++ code. | |
264 | .TP | |
265 | .B \-v | |
266 | Prints | |
267 | .I version | |
268 | and license key information and exits. | |
269 | .TP | |
270 | .BI \-V " verb_level" | |
271 | Sets the verbosity bit-mask directly to | |
272 | .I verb_level | |
273 | (where | |
274 | .I verb_level | |
275 | is a decimal value between 0 and 65535). | |
276 | .br | |
277 | .sp 1 | |
278 | Meaning of bits: | |
279 | .P | |
280 | .RS 10 | |
281 | .PD 0 | |
282 | .TP 10 | |
283 | .B 1: | |
284 | "NOT SUPPORTED" messages. | |
285 | .TP | |
286 | .B 2: | |
287 | WARNING messages. | |
288 | .TP | |
289 | .B 4: | |
290 | NOTIFY messages. | |
291 | .TP | |
292 | .B 32|16|8: | |
293 | DEBUG messages. | |
294 | .br | |
295 | The debug-bits act like a 3-bits-length number, so the debug level has | |
296 | a value between 0 and 7. It is useful in case of abnormal program termination. | |
297 | .PD | |
298 | .RE | |
299 | .P | |
300 | .TP 10 | |
301 | .B \-w | |
302 | Suppresses all | |
303 | .I warning | |
304 | messages. Equivalent with | |
305 | .B \-V 4. | |
306 | .TP | |
307 | .B \-x | |
308 | Disables the generation of | |
309 | .I TEXT | |
310 | encoder/decoder routines for all TTCN-3 types. | |
311 | .TP | |
312 | .B \-X | |
313 | Disable | |
314 | .I XER | |
315 | encoder/decoder functions | |
316 | .TP | |
317 | .B \-y | |
318 | Disable | |
319 | .I subtype | |
320 | checking | |
321 | .TP | |
322 | .B \-Y | |
323 | Enforces legacy behaviour of the "out" function parameters (see refguide). | |
324 | .TP | |
a38c6d4c | 325 | .BI \-z " file" |
326 | Enables profiling and code coverage in the selected TTCN-3 files. The | |
327 | .I file | |
328 | argument contains a list of TTCN-3 files separated by new lines. Each TTCN-3 file must be among the compiler's TTCN-3 file arguments. | |
329 | .TP | |
970ed795 EL |
330 | .B \- |
331 | The single dash character as command line argument controls the | |
332 | .I selective code generation | |
333 | option. | |
334 | After the list of all TTCN-3 and ASN.1 modules a subset of these files can | |
335 | be given separated by a dash. This option instructs the compiler to parse all | |
336 | modules, perform the semantic analysis on the entire module hierarchy, but | |
337 | generate code | |
338 | .I only | |
339 | for those modules that are listed after the dash again. | |
340 | .br | |
341 | It is not allowed to specify a file name after the dash that was not present | |
342 | in the list before the dash. If the single dash is not present in the command | |
343 | line the compiler will generate code for | |
344 | .I all | |
345 | modules. | |
af710487 | 346 | .TP |
347 | .B \-\-ttcn2json | |
348 | Generates a JSON schema from the types defined in the specified TTCN-3 and ASN.1 modules. | |
349 | Must always be the first compiler option. From the previously listed options only | |
350 | .B \-T | |
351 | and | |
352 | .B \-A | |
353 | can be used, instead the JSON schema generator has options of its own: | |
354 | .TP | |
355 | .B \-j | |
356 | Only types that have JSON coding enabled are included in the schema. | |
357 | .TP | |
358 | .B \-f | |
359 | The schema only validates types that have a JSON encoding or decoding method declared. | |
360 | .TP | |
361 | .BI \- " file" | |
362 | The single dash character as command line argument specifies the name of the generated | |
363 | JSON schema file. If it is not present, then the schema file name is generated from | |
364 | the name of the first input file (by replacing its suffix with | |
365 | .I \.json | |
366 | or appending | |
367 | .I \.json | |
368 | to the end of the file). | |
970ed795 EL |
369 | .SH EXIT STATUS |
370 | The compiler exits with a status of zero when no errors were encountered | |
371 | during its operation. A status of one will be returned if syntax or | |
372 | semantic errors were detected in the input modules. | |
373 | .SH ENVIRONMENT VARIABLES | |
374 | .TP | |
375 | .SM | |
376 | TTCN3_DIR | |
377 | The installation directory where the uncompressed binary package of | |
378 | TTCN-3 Test Executor can be found. | |
379 | .TP | |
380 | .SM | |
381 | TTCN3_LICENSE_FILE | |
382 | It shall point to the | |
383 | .I file | |
384 | .RB ( NB: | |
385 | .I not | |
386 | to its directory) that contains the personalized license key for the | |
387 | current user or host. | |
388 | .SH BUGS | |
389 | The compiler does not support all constructs of TTCN-3 Core Language and ASN.1. | |
390 | It reports an error when encountering an unsupported language element. | |
391 | The detailed list of deficiencies and language extensions can be found in the | |
392 | referenced documentation. | |
393 | .LP | |
394 | For trouble reporting use the tool | |
395 | .BR "MHWEB" "." | |
396 | For TR writers guide please visit the web page: | |
397 | .I http://ttcn.ericsson.se. | |
398 | .SH SEE ALSO | |
399 | .TP | |
400 | .SM | |
401 | Ericsson document 2/198 17-CRL 113 200 Uen: | |
402 | .B Programmer's Technical Reference for TITAN TTCN-3 Test Executor | |
403 | .TP | |
404 | .SM | |
405 | ETSI Standard ES 201-873-1: | |
406 | .B Testing and Test Control Notation: TTCN-3 Core Language | |
407 | .TP | |
408 | .SM | |
409 | ITU-T Recommendations X.680-683: | |
410 | .B Abstract Syntax Notation One (ASN.1) | |
411 | .SH AUTHOR | |
412 | This manpage is written by Janos Zoltan Szabo, Ericsson Telecom AB | |
413 | .br | |
d44e3c4f | 414 | Copyright (c) 2000-2016 Ericsson Telecom AB |
970ed795 EL |
415 | .br |
416 | All rights reserved. This program and the accompanying materials | |
417 | are made available under the terms of the Eclipse Public License v1.0 | |
418 | which accompanies this distribution, and is available at | |
419 | .br | |
420 | http://www.eclipse.org/legal/epl-v10.html |