1    /* --COPYRIGHT--,EPL
     2     *  Copyright (c) 2016-2018 Texas Instruments Incorporated
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     *
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     *
    11     * --/COPYRIGHT--*/
    12    
    13    /*!
    14     *  ======== Main.xdc ========
    15     *  The xdc.rov.testserver displays ROV views to clients on the command line.
    16     *  The server expects that a CCS debugger is already started and an application
    17     *  is loaded.
    18     *
    19     *  The DSlite port must be known at the time the server is started. Therefore,
    20     *  when starting CCS, the environment variable TI_DS_WEBSOCKET_PORT must be set
    21     *  and that same port number must be supplied to xdc.rov.testserver.
    22     *
    23     *  Commands:
    24     *
    25     *  Start the server -
    26     *      xs xdc.rov.testserver --exec <full path> --port <port_number>
    27     *
    28     *  Get a list of Modules and Tabs
    29     *      l
    30     *
    31     *  Get a Module's View
    32     *      v Module View
    33     *
    34     *  Issue the command "Run" to the debugger
    35     *      r
    36     *
    37     *  Issue the command "Pause" to the debugger
    38     *      p
    39     *
    40     *  Exit xdc.rov.testserver
    41     *      e
    42     *
    43     */
    44    metaonly module Main inherits xdc.tools.ICmd {
    45    
    46        override config String usage[] = [
    47            ' ',
    48            'Usage',
    49            '[--exec <executable>]',
    50            '[--port <DSLite Websocket port>]',
    51            '[-v <debug level>]',
    52            '[--help]',
    53            ' ',
    54        ];
    55    
    56    instance:
    57    
    58        /*!
    59         *  ======== exec ========
    60         *
    61         *  Executable to run ROV on
    62         *
    63         */
    64        @CommandOption('exec')
    65        config String executable = "";
    66    
    67        /*!
    68         *  ======== port ========
    69         *
    70         *  DSLite port
    71         *
    72         *  Corresponds to the value in the environment variable
    73         *  TI_DS_WEBSOCKET_PORT. The variable must be set at the time CCS is
    74         *  started.
    75         */
    76        @CommandOption('port')
    77        config UInt port;
    78    
    79        /*!
    80         *  ======== verbose ========
    81         *
    82         *  Defines the amount of debug info
    83         *
    84         */
    85        @CommandOption('v')
    86        config UInt verbose = 0;
    87    }