metaonly module ti.uia.scripts.ndk.Main

Tool for reading and decoding UIA data over ethernet

Configuration settings sourced in ti/uia/scripts/ndk/Main.xdc
var Main = xdc.useModule('ti.uia.scripts.ndk.Main');
module-wide config parameters
        ' ',
        'Usage',
        '[-p] [-h] [-m] [-e executable] [-x RTA XML file] [-o output text file] [-c delimter character]',
        '[--help]',
        ' '
    ];
module-wide functions
    Main.exec// xs script entry point(Any args) returns Any
    Main.main// xs shell entry point(Any args) returns Any
per-instance config parameters
    var params = new Main.Params// Instance config-params object;
        params.delimiter// // TODO [-l output file for load data] = String "|";
        params.rtaXml// Optional path to the RTA XML file = String "";
per-instance functions
    inst.run// Underlying implementation of the command(Cmdr.Instance cmdr, String[] args) returns Any
 
 
config Main.usage  // module-wide

Usage for this command

Configuration settings
Main.usage = String[] [
    ' ',
    'Usage',
    '[-p] [-h] [-m] [-e executable] [-x RTA XML file] [-o output text file] [-c delimter character]',
    '[--help]',
    ' '
];
 
 
Main.exec()  // module-wide

xs script entry point

Configuration settings
Main.exec(Any args) returns Any
 
DETAILS
This function is called from within other XDCscript scripts and performs the same operations as main() except that, rather than output the return value of inst.run(), this value is simply returned to the caller of exec().
 
Main.main()  // module-wide

xs shell entry point

Configuration settings
Main.main(Any args) returns Any
 
DETAILS
This function
  • creates a no-arg instance, inst, of the module inheriting this interface;
  • parses command line arguments placing all options in the config params of the inheriting module;
  • creates a xdc.tools.Cmdr instance, cmdr;
  • calls inst.run() with the cmdr and any command line command line arguments not parsed as options; and
  • outputs the return result from inst.run()
Instance Config Parameters

Configuration settings
var params = new Main.Params;
// Instance config-params object
    params.delimiter = String "|";
    // // TODO [-l output file for load data]
    params.executable = String "";
    // Path to the executable which was used to generate the data file
    params.more = Bool false;
    // Wait for the user to press enter before displaying the next packet
    params.outputFile = String "";
    // Optional path to an output file to write the decoded records to
    params.printToScreen = Bool false;
    // Whether to print the decoded records to the console
    params.rtaXml = String "";
    // Optional path to the RTA XML file
    params.suppressHeader = Bool false;
    // Don't print the header when printing the decoded records
 
config Main.Params.delimiter  // instance

// TODO [-l output file for load data]

Configuration settings
var params = new Main.Params;
  ...
params.delimiter = String "|";
 
DETAILS
Delimiter character to use when writing out the file.
The character specified here will be inserted between each of the record fields so that the file can be imported into a spreadsheet such as excel.
 
config Main.Params.executable  // instance

Path to the executable which was used to generate the data file

Configuration settings
var params = new Main.Params;
  ...
params.executable = String "";
 
 
config Main.Params.more  // instance

Wait for the user to press enter before displaying the next packet

Configuration settings
var params = new Main.Params;
  ...
params.more = Bool false;
 
DETAILS
Without this flag, the tool will simply print all of the records in the data file to the screen. If this flag is set, then the tool will wait the user to press enter in between displaying each packet.
 
config Main.Params.outputFile  // instance

Optional path to an output file to write the decoded records to

Configuration settings
var params = new Main.Params;
  ...
params.outputFile = String "";
 
DETAILS
The tool will write the decoded records out as text to the specified out file. The record properties will be separated with a delimeter character so that they can be imported into a spreadsheet such as Excel.
 
config Main.Params.printToScreen  // instance

Whether to print the decoded records to the console

Configuration settings
var params = new Main.Params;
  ...
params.printToScreen = Bool false;
 
DETAILS
You may use this tool to simply print the decoded records, or you may have them redirected to a file to be processed elsewhere.
 
config Main.Params.rtaXml  // instance

Optional path to the RTA XML file

Configuration settings
var params = new Main.Params;
  ...
params.rtaXml = String "";
 
 
config Main.Params.suppressHeader  // instance

Don't print the header when printing the decoded records

Configuration settings
var params = new Main.Params;
  ...
params.suppressHeader = Bool false;
 
 
Main.run()  // instance

Underlying implementation of the command

Configuration settings
inst.run(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
Since this method is used to support both command line tools and other XDCscript scripts, it is important to avoid explicit termination of the JVM via java.lang.System.exit(); doing so precludes callers from handling failures.
Implementations should instead call
generated on Tue, 14 Feb 2017 00:15:17 GMT