1    /* 
     2     * Copyright (c) 2012, Texas Instruments Incorporated
     3     * All rights reserved.
     4     *
     5     * Redistribution and use in source and binary forms, with or without
     6     * modification, are permitted provided that the following conditions
     7     * are met:
     8     *
     9     * *  Redistributions of source code must retain the above copyright
    10     *    notice, this list of conditions and the following disclaimer.
    11     *
    12     * *  Redistributions in binary form must reproduce the above copyright
    13     *    notice, this list of conditions and the following disclaimer in the
    14     *    documentation and/or other materials provided with the distribution.
    15     *
    16     * *  Neither the name of Texas Instruments Incorporated nor the names of
    17     *    its contributors may be used to endorse or promote products derived
    18     *    from this software without specific prior written permission.
    19     *
    20     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    21     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    22     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    23     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    24     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    25     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    26     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    27     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    28     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    29     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    30     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    31     * 
    32     */
    33    package ti.sdo.ce.views;
    34    import xdc.rov.ViewInfo;
    35    
    36    module CodecEngine {
    37    
    38            struct NODE_Uuid {
    39            UInt32 data;
    40            };
    41    
    42            enum Engine_CachedMemType {
    43                Engine_USECACHEDMEM_DEFAULT = -1,  /**< Use default cache setting */
    44                Engine_USECACHEDMEM_NONCACHED = 0, /**< Use non-cached memory */
    45                Engine_USECACHEDMEM_CACHED = 1     /**< Use cached memory */
    46            };
    47    
    48            struct Engine_AlgDesc {
    49                String      name;           /**< Name of algorithm. */
    50                NODE_Uuid   uuid;           /**< Fixed length perfect hash of name. */
    51                Ptr         fxns;          /**< If null, served by RMS. */
    52                Ptr         idmaFxns;       /**< DMA resource negotiation when not null. */
    53                String      *typeTab;       /**< inheritance hierarchy. */
    54                Bool        isLocal;        /**< if TRUE, run locally. */
    55                Int         groupId;        /**< Resource sharing group Id. */
    56                Int         rpcProtocolVersion; /**< Protocol version. */
    57                Ptr         iresFxns;       /**< IRES_Fxns when not null. */
    58                Ptr        codecClassConfig; /**< codec class config data, if any */
    59                Engine_CachedMemType memType;  /**< Memory type for alg's mem reqs. */
    60            };
    61    
    62            struct Engine_Desc {
    63                String          name;       /**< Name of this Engine. */
    64                Engine_AlgDesc  *algTab;    /**< Table of algs available in this Engine. */
    65                String          remoteName; /**< Optional name of Server image to load. */
    66                String          linkCfg;    /**< Optional Link config (when using LAD). */
    67                Int             numAlgs;    /**< Number of algorithms in algTab */
    68                Int             heapId;     /**< Heap ID for engine allocs. */
    69            };
    70    
    71            struct Engine_Config {
    72                Engine_Desc *engineTab;
    73                String      localEngine;
    74            };
    75    
    76            metaonly struct Engine_Meta {
    77            String algName;
    78            Bool   isLocal;
    79            Int    heapId;
    80        };
    81    
    82        @Facet
    83        metaonly config ViewInfo.Instance rovViewInfo =
    84            ViewInfo.create({
    85                viewMap: [
    86                    ['Basic', {type: ViewInfo.MODULE_DATA, viewInitFxn: 'viewInitBasic', structName: 'Engine_Meta'}],
    87                ]
    88            });
    89    
    90    
    91    }
    92    /*
    93     *  @(#) ti.sdo.ce.views; 1, 0, 0,1; 2-24-2012 19:32:16; /db/atree/library/trees/ce/ce-t06/src/ xlibrary
    94    
    95     */
    96