1 /*!
2 * ======== Main ========
3 * Tool for reading and decoding UIA data over ethernet.
4 */
5 metaonly module Main inherits xdc.tools.ICmd {
6
7 override config String usage[] = [
8 ' ',
9 'Usage',
10 '[-p] [-h] [-m] [-e executable] [-x RTA XML file] [-o output text file] [-c delimter character]',
11 '[--help]',
12 ' ',
13 ];
14
15 instance:
16
17 /*!
18 * ======== printToScreen ========
19 * Whether to print the decoded records to the console.
20 *
21 * You may use this tool to simply print the decoded records, or you
22 * may have them redirected to a file to be processed elsewhere.
23 */
24 @CommandOption('p')
25 config Bool printToScreen = false;
26
27 /*!
28 * ======== suppressHeader ========
29 * Don't print the header when printing the decoded records.
30 */
31 @CommandOption('h')
32 config Bool suppressHeader = false;
33
34 /*!
35 * ======== more ========
36 * Wait for the user to press enter before displaying the next packet.
37 *
38 * Without this flag, the tool will simply print all of the records in the
39 * data file to the screen. If this flag is set, then the tool will wait
40 * the user to press enter in between displaying each packet.
41 */
42 @CommandOption('m')
43 config Bool more = false;
44
45 /*!
46 * ======== executable ========
47 * Path to the executable which was used to generate the data file.
48 */
49 @CommandOption('e')
50 config String executable = "";
51
52 /*!
53 * ======== rtaXml ========
54 * Optional path to the RTA XML file.
55 */
56 @CommandOption('x')
57 config String rtaXml = "";
58
59 /*!
60 * ======== outputFile ========
61 * Optional path to an output file to write the decoded records to.
62 *
63 * The tool will write the decoded records out as text to the specified
64 * out file. The record properties will be separated with a delimeter
65 * character so that they can be imported into a spreadsheet such as
66 * Excel.
67 */
68 @CommandOption('o')
69 config String outputFile = "";
70
71 /*!
72 * ======== loadFile ========
73 * // TODO
74 * [-l output file for load data]
75 */
76
77 /*!
78 * ======== delimiter ========
79 * Delimiter character to use when writing out the file.
80 *
81 * The character specified here will be inserted between each of the
82 * record fields so that the file can be imported into a spreadsheet
83 * such as excel.
84 */
85 @CommandOption('c')
86 config String delimiter = "|";
87
88 }