1    /* 
     2     *  Copyright (c) 2008 Texas Instruments and others.
     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     * */
    12    /*
    13     *  ======== ViewInfo ========
    14     */
    15    package xdc.rov
    16    
    17    /*!
    18     *  ======== ViewInfo ========
    19     *  Describes the ROV views supported by a particular module.
    20     */
    21    @Facet metaonly module ViewInfo {
    22        /*!
    23         *  ======== ViewType ========
    24         *  ROV view type
    25         *
    26         *  @p(dlist)
    27         *      - INSTANCE
    28         *          basic instance information (one row per instance).  The view
    29         *          init function is passed two arguments: (1) an instance of the
    30         *          view structure, and (2) the instance state structure of the
    31         *          instance to view.
    32         *
    33         *      - INSTANCE_DATA
    34         *          instance-specific data tables (many rows per instance).  The
    35         *          view init function is passed two arguments:(1) an instance of
    36         *          the xdc.rov.Program.InstDataView structure, and (2) an instance
    37         *          state structure for the instance to view.
    38         *
    39         *      - MODULE
    40         *          basic module information (one row per module).  The view
    41         *          init function is passed two arguments: (1) an instance of the
    42         *          view structure, and (2) the module state structure of the
    43         *          module to view.
    44         *
    45         *      - MODULE_DATA
    46         *          module-specific data tables (many rows per module).  The
    47         *          view init function is passed one argument: a
    48         *          Program.ModDataView structure.
    49         *
    50         *      - RAW
    51         *         This is a reserved view type used by ROV to display raw data.
    52         *
    53         *      - TREE_TABLE
    54         *         The view init function is passed no arguments and is expected
    55         *         to return a new initialized xdc.rov.Program.TreeNode structure
    56         *         or `null` in the event that there is nothing to display.
    57         *
    58         *      - TREE
    59         *         The view init function is passed no arguments and is expected
    60         *         to return a new initialized JavaScript hash table or `null`
    61         *         in the event that there is nothing to display.
    62         *  @p
    63         */
    64        metaonly enum ViewType {
    65            INSTANCE,
    66            MODULE,
    67            INSTANCE_DATA,
    68            MODULE_DATA,
    69            RAW,
    70            TREE_TABLE,
    71            TREE
    72        }
    73        
    74        /*!
    75         *  ======== View ========
    76         *  ROV View descriptor
    77         *
    78         *  @field(type)          the view type which control the type of arguments
    79         *                        passed to the `viewInitFxn`
    80         *  @field(viewInitFxn)   the name of a function that converts raw target
    81         *                        data into a human readable "view structure".
    82         *                        This name is the name of a metaonly function
    83         *                        defined in the module's `.xs` file.
    84         *  @field(structName)    the name of the view structure populated by
    85         *                        the `viewInitFxn`.  This name is a name defined
    86         *                        the module's `.xdc` file.
    87         */
    88        metaonly struct View {
    89            ViewType type;
    90            String   viewInitFxn;
    91            String   structName;
    92        }
    93        
    94    instance:
    95        
    96        /*!
    97         *  ======== viewMap ========
    98         *  Specifies all of the ROV views for the module
    99         *
   100         *  Maps module-specific view names to an appropriate View descriptor.
   101         */
   102        metaonly config View viewMap[string];
   103    
   104        /*!
   105         *  ======== showRawTab ========
   106         *  Control whether the "raw view" is available
   107         */
   108        metaonly config Bool showRawTab = true;
   109    
   110    }
   111    /*
   112     *  @(#) xdc.rov; 1, 0, 1,472; 3-20-2014 17:05:37; /db/ztree/library/trees/xdc/xdc-A32x/src/packages/
   113     */
   114