OSS CDR Assistant Technical Details
The CDR Assistant consists of two components - a generic decoding engine, and a shared library. The shared library is custom created by OSS based on the ASN.1 specification for your BER encoded data - CDR/TAP/RAP.
The shared library is created from the ASN.1 specification of your CDR/TAP/RAP data. If in the future, the ASN.1 specification is upgraded or changed, only a new shared library is required - no new decoding engine is needed.
The CDR Assistant is a command line utility (bin2xml), providing a number of command line options to customize its behavior. It can be used in scripts or in batch files. A brief description of the command line options is provided below:
bin2xml <ctltbl>.so <input-file> [-help] [-ascii] [-conv [<output-file>] |
-noConv] [-fixup [<fixed-file>]] [-diagnostic 0 | 1 | 2 | 3] [-genErrFiles]
[-pad <byte>]
ctltbl.so is a shared library that contains an OSS description of the CDR, TAP or RAP records. This file is created by OSS from the ASN.1 description of the records. This argument is mandatory.
input-file is an input file with BER-encoded (binary) CDR, TAP or RAP records. This argument is mandatory.
-ascii specifies that the content of the input-file should be converted to ASCII instead of XML. Conversion to XML is the default.
-conv specifies that the content of the input-file should be converted to ASCII if -ascii is specified; otherwise it will be converted to XML. If output-file is specified, the converted output will be written to it. If output-file is not specified, the output will be written to input-file.xml or input-file.txt, depending on whether -ascii was specified. The default is -conv without output-file.
-noConv causes the suppression of the generation of an XML or ASCII file. It is useful if you wish to fix the records in the input file without doing any conversion.
-fixup specifies that an attempt should be made to fix any invalid BER encodings in the input file. If fixed-file is specified then the contents of input-file will be copied to fixed-file, with any invalid BER encodings that could be corrected, fixed, and any that could not be corrected being written to the directory input-file.err/, if -genErrFile was specified and -noConv was not specified.
-diagnostic controls the amount of diagnostic information that is to be generated when decoding the data that has gone through the fixup process (see -fixup). The argument 1 is the default and produces a single error message if an error remains in the input. 2 results in error messages being generated for all errors that were detected. 3 results in error messages and detailed trace messages being generated. All diagnostic messages are written to a report file. The argument 0 results in error and trace messages not being generated (e.g., the report file is not created).
-genErrFiles specifies that invalidly encoded records in the input that were not fixed (see -fixup) should be written to files in the error file directory. The files are named input-file.N.err, where N is the number of the erroneous record in the input file. If invalidly encoded messages are detected, a report file (see -diagnostic) will be created identifying the cause of the error, identifying the location of the record within the input file, identifying the number of bytes skipped over to get to the next record, and identifying the name of the file that contains the erroneously encoded record. The name of the error file directory is output-file.err/ if output-file was specified with the conv option, and is input-file.err/ otherwise.
-pad defines how to handle pad bytes that may appear at the end of records. When -pad is specified, represents a hexadecimal number (e.g., 0x00 for hex 00, 0xff for hex ff) that bin2xml is to silently skip whenever one or more of this character appears consecutively immediately after a record. The hexadecimal digits are case insensitive. Decimal or octal values are also accepted (e.g., 255 or 0377).
To learn more about CDR Assistant, and how OSS products and services can help, contact us at cdr@oss.com.
Copyright © 2010 OSS Nokalva, Inc. All Rights Reserved.