Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

FrameQ_ShMem.h

Go to the documentation of this file.
00001 /** 
00002  *  @file   FrameQ_ShMem.h
00003  *
00004  *  @brief  Header file for FrameQ on SharedMemory interface
00005  *
00006  *
00007  *  @ver        02.00.00.68_beta1
00008  *  
00009  *  ============================================================================
00010  *  
00011  *  Copyright (c) 2008-2009, Texas Instruments Incorporated
00012  *
00013  *  Redistribution and use in source and binary forms, with or without
00014  *  modification, are permitted provided that the following conditions
00015  *  are met:
00016  *  
00017  *  *  Redistributions of source code must retain the above copyright
00018  *     notice, this list of conditions and the following disclaimer.
00019  *  
00020  *  *  Redistributions in binary form must reproduce the above copyright
00021  *     notice, this list of conditions and the following disclaimer in the
00022  *     documentation and/or other materials provided with the distribution.
00023  *  
00024  *  *  Neither the name of Texas Instruments Incorporated nor the names of
00025  *     its contributors may be used to endorse or promote products derived
00026  *     from this software without specific prior written permission.
00027  *  
00028  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00029  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00030  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00031  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00032  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00033  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00034  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00035  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00036  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00037  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00038  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039  *  Contact information for paper mail:
00040  *  Texas Instruments
00041  *  Post Office Box 655303
00042  *  Dallas, Texas 75265
00043  *  Contact information: 
00044  *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
00045  *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
00046  *  ============================================================================
00047  *  
00048  */
00049 
00050 #ifndef FRAMEQ_SHMEM_H
00051 #define FRAMEQ_SHMEM_H
00052 
00053 #include <ti/ipc/GateMP.h>
00054 
00055 #if defined (__cplusplus)
00056 extern "C" {
00057 #endif
00058 
00059 /* =============================================================================
00060  * Macros & defines
00061  * =============================================================================
00062  */
00063 
00064 /* =============================================================================
00065  * Structures & Enums
00066  * =============================================================================
00067  */
00068 
00069 /*!
00070  *  @brief  Structure defining instance create parameters for the FrameQ on shared
00071  *          memory(inter core and intra core).
00072  */
00073 typedef struct FrameQ_ShMem_Params_tag {
00074     FrameQ_CreateParams commonCreateParams;
00075     /*!< Common create parameters .Same for all the implementations of FrameQ*/
00076 
00077     GateMP_Handle         gate;
00078     /*!<
00079      *  gate used for critical region management of the shared memory.
00080      *
00081      *  If it is  null, FrameQ  decides the gate based on the following
00082      *      1.  If module's  usedefaultgate is set to FALSE, It creates  a gate
00083      *          internally based on  the localProtect and remoteProtect flags
00084      *          provided  in this params.
00085      *      2.  If module's  usedefaultgate is set to TRUE, it uses the  module'
00086      *          s gloabl gate for the instance. if module's global gate does not
00087      *          exist FrameQ uses the GateMP's default gate for the instance.
00088      */
00089 
00090     GateMP_LocalProtect localProtect;
00091     /*!<
00092      *  local protection level for the instance. Will be used if gate passed is
00093      *  NULL.
00094      */
00095 
00096     GateMP_RemoteProtect remoteProtect;
00097     /*!<
00098      *  Multiprocessor protection for the module instances.Will be used
00099      *  if gate is passed as NULL to create gate internally.
00100      */
00101 
00102      Ptr                sharedAddr;
00103     /*!<
00104      *  Virtual Address of the shared memory.Must be mapped
00105      *  on other processors if instance needs to be accessible
00106      *  from other processors.
00107      *
00108      *  The creator must supply the shared memory that
00109      *  this will use to maintain shared state information.
00110      *  Required parameter if regionId is not specified.
00111      */
00112 
00113     UInt32              sharedAddrSize;
00114     /*!<
00115      *  Size of sharedAddr
00116      *
00117      *  Can use the #FrameQ_ShMem_sharedMemReq call to
00118      *  determine the required size.
00119      *
00120      *  Required parameter if regionId is not specified.
00121      */
00122 
00123     UInt32 regionId;
00124     /*!<
00125      *  Shared region ID
00126      *
00127      *  The ID corresponding to the shared region in which this shared instance
00128      *  is to be placed.
00129      */
00130 
00131     UInt32              numReaders;
00132     /*!<
00133      *  Number of readers that can use this instance.
00134      */
00135 
00136     UInt32              numQueues;
00137     /*!< Number of queues( Reader can retrieve frames from these queue by
00138      *  mentioning the queueId in getv calls.) supported for each reader.
00139      */
00140     UInt32              cpuAccessFlags;
00141     /*!<
00142      *  cpuAccessFlags flags denoting whether frame buffers are accessed through
00143      *  CPU or not. All the conrol structure  and header buffers cache flags will
00144      *  be derived internally based on shared region settings.
00145      */
00146 
00147     String frameQBufMgrName;
00148     /*!<
00149      *
00150      *  Name of FrameQ bufMgr that needs to be opened in FrameQ instance for use.
00151      *  Note: The FrameQBufMgr instance has to be created  prior to calling
00152      *  FrameQ_create API.
00153      */
00154 
00155     Ptr frameQBufMgrSharedAddr;
00156     /*!<
00157      *  Shared Address  of the FrameQBufMgr instance that needs to be used in
00158      *  FrameQ.Not required if FrameQ_ShMem_Params::frameQBufMgrName is provided.
00159      */
00160 } FrameQ_ShMem_Params;
00161 
00162 
00163 /*!
00164  *  @brief  Structure defining open parameters for the FrameQ instance on ShMem
00165  *          (shared memory interface).
00166  */
00167 typedef struct FrameQ_ShMem_OpenParams_tag {
00168     FrameQ_CommonOpenParams commonOpenParams;
00169     /*!< Open params common to all the implementations*/
00170 }FrameQ_ShMem_OpenParams;
00171 
00172 
00173 /* =============================================================================
00174  *  APIs
00175  * =============================================================================
00176  */
00177 
00178 /*!
00179  *  @brief      Function to initiallze the params with the default params.
00180  *
00181  *
00182  *  @param      params   pointer to FrameQ_ShMem_Params.
00183  *
00184  *
00185  *  @sa         FrameQ_create
00186  */
00187 void
00188 FrameQ_ShMem_Params_init(FrameQ_ShMem_Params * params);
00189 
00190 /*!
00191  *  @brief      Function to find out the shared memory requirements.
00192  *
00193  *              This function returns size of the shared memory required for the
00194  *              instance based on the params provided.
00195  *
00196  *  @param      params   pointer to FrameQ_ShMem_Params.
00197  *
00198  *  @retval     size    shared memory reqired for the instance
00199  *
00200  *  @sa         FrameQ_ShMem_Params_init(), FrameQ_create()
00201  */
00202 UInt32
00203 FrameQ_ShMem_sharedMemReq (const FrameQ_ShMem_Params * params);
00204 
00205 #if defined (__cplusplus)
00206 }
00207 #endif /* defined (__cplusplus) */
00208 
00209 
00210 #endif /* FRAMEQ_SHMEM_H */
00211 

Generated on Mon Mar 14 11:59:45 2011 for Syslink by  doxygen 1.4.4