metaonly module xdc.rov.monserver.Main

Command implementation

Commands: [ more ... ]
Configuration settings sourced in xdc/rov/monserver/Main.xdc
var Main = xdc.useModule('xdc.rov.monserver.Main');
module-wide config parameters
        ' ',
        'Usage',
        '[-p]',
        '[--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.port// TCP port for the server = UInt 8888;
per-instance functions
    inst.run// Underlying implementation of the command(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
Commands:
Start the server - xs xdc.rov.monserver -p <port_number>
Load an executable exec:<full path>
Get a list of Modules and Tabs list
Get a Module's View view:Task,Basic
Unload the executable clear
 
config Main.usage  // module-wide

Usage for this command

Configuration settings
Main.usage = String[] [
    ' ',
    'Usage',
    '[-p]',
    '[--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.port = UInt 8888;
    // TCP port for the server
 
config Main.Params.port  // instance

TCP port for the server

Configuration settings
var params = new Main.Params;
  ...
params.port = UInt 8888;
 
DETAILS
Only values from 1025 to 65535 are accepted.
 
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 Wed, 09 Aug 2017 16:38:11 GMT