As explained in the following chapter, Type
Mappings and Data Conversion, the use of nested and
repeating data types can result in output files with large numbers of
columns and rows. The -minLevel
and -maxLevel
command-line options are used to create vertical slices from an input
data file.
The following example specification demonstrates how these options work to reduce the output:
A ::= SEQUENCE { a INTEGER, b SEQUENCE OF SEQUENCE { bb VisibleString, cc CHOICE { aaa INTEGER, bbb SEQUENCE OF BOOLEAN } } }
Without using any command-line filtering options, the output columns will look like this:
a,bb,aaa,bbb
The innermost SEQUENCE OF
type will cause a full tuple
to be added to the CSV file for each message. If the bbb
element were repeated ten times, the outer elements would be duplicated
ten times for each BOOLEAN
.
If, in the same message, the outer SEQUENCE OF
(that is,
the b
element) were repeated three times, the outer
INTEGER
, a
, would be repeated 30 times.
This kind of duplication may be unnecessary depending on the
content of interest, so the minLevel
and
maxLevel
options may be used to control the output.
The duplication of data at the outer level may be controlled using the
minLevel
option. If for example, the minimum level were
set to one (-minLevel 1
), the outer INTEGER
would be eliminated:
bb,aaa,bbb
The duplication of data in the inner levels may be controlled using the
maxLevel
option. If, for example, the maxLevel were set
to one (-maxLevel 1
), the inner CHOICE
would be eliminated:
a,bb
By combining the options, we can reduce the output to a single column
of data (-minLevel 1 -maxLevel 1
):
bb
In this way the data of interest may be isolated in the input messages and the output considerably reduced.