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

RingIOShm.h File Reference


Detailed Description

RingIOShm shared memory based physical transport for communication with the remote processor.

This file contains the declarations of types and APIs as part of interface of the RingIOShm shared memory transport.

02.00.00.68_beta1

============================================================================

Copyright (c) 2008-2009, Texas Instruments Incorporated

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Contact information for paper mail: Texas Instruments Post Office Box 655303 Dallas, Texas 75265 Contact information: http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact ============================================================================

Definition in file RingIOShm.h.

#include <ti/ipc/GateMP.h>

Include dependency graph for RingIOShm.h:

Go to the source code of this file.

Data Structures

struct  RingIOShm_Params_Tag
 Structure defining parameters for creating the RingIOShm instances. More...
struct  RingIOShm_Config_Tag
 Structure defining config parameters for the RingIOShm module. More...

Defines

#define RingIOShm_MODULEID   (0x3bff)
 Unique module ID.
#define RingIOShm_STATUSCODEBASE   (RingIOShm_MODULEID << 12u)
 Error code base for RingIO.
#define RingIOShm_MAKE_FAILURE(x)
 Macro to make error code.
#define RingIOShm_MAKE_SUCCESS(x)   (RingIOShm_STATUSCODEBASE + (x))
 Macro to make success code.
#define RingIOShm_E_INVALIDARG   RingIOShm_MAKE_FAILURE(-1)
 Argument passed to a function is invalid.
#define RingIOShm_E_INVALIDSIZE   RingIOShm_MAKE_FAILURE(-2)
 Invalid shared address size.
#define RingIOShm_E_INVALIDSTATE   RingIOShm_MAKE_FAILURE(-3)
 Module is not initialized.
#define RingIOShm_E_BADVERSION   RingIOShm_MAKE_FAILURE(-4)
 Versions don't match.
#define RingIOShm_E_FAIL   RingIOShm_MAKE_FAILURE(-5)
 General Failure.
#define RingIOShm_E_MEMORY   RingIOShm_MAKE_FAILURE(-6)
 Memory allocation failed.
#define RingIOShm_E_OSFAILURE   RingIOShm_MAKE_FAILURE(-7)
 Failure in OS call.
#define RingIOShm_E_HANDLE   RingIOShm_MAKE_FAILURE(-8)
 Invalid handle specified.
#define RingIOShm_E_BUFWRAP   RingIOShm_MAKE_FAILURE(-9)
 Indicates that the amount of data requested could not be serviced due to the ring buffer getting wrapped.
#define RingIOShm_E_BUFEMPTY   RingIOShm_MAKE_FAILURE(-10)
 Indicates that there is no data in the buffer for reading.
#define RingIOShm_E_BUFFULL   RingIOShm_MAKE_FAILURE(-11)
 Indicates that the buffer is full.
#define RingIOShm_E_PENDINGDATA   RingIOShm_MAKE_FAILURE(-12)
 Indicates that there is no attribute at the current, but attributes are present at a future offset.
#define RingIOShm_E_VARIABLEATTRIBUTE   RingIOShm_MAKE_FAILURE(-13)
 Indicates that attibute get() failed, need to extract variable length message getv().
#define RingIOShm_E_NOTCONTIGUOUSDATA   RingIOShm_MAKE_FAILURE(-14)
 Indicates that Valid data is present in the buffer but is not contiguous as data has been copied from top to footer area.
#define RingIOShm_E_WRONGSTATE   RingIOShm_MAKE_FAILURE(-15)
 Indicates that the RingIO is in a wrong state.
#define RingIOShm_E_INVALIDPROCID   RingIOShm_MAKE_FAILURE(-16)
 Indicates that an invalid proc id has been specified.
#define RingIOShm_E_INVALIDCONTEXT   RingIOShm_MAKE_FAILURE(-17)
 Indicates that the api is called with wrong handle.
#define RingIOShm_S_SUCCESS   RingIOShm_MAKE_SUCCESS(0)
#define RingIOShm_S_ALREADYSETUP   RingIOShm_MAKE_SUCCESS(1)
 The MESSAGETRANSPORTSHM module has already been setup in this process.
#define RingIOShm_S_PENDINGATTRIBUTE   RingIOShm_MAKE_SUCCESS(1)
 Indicates that either: 1) The amount of data requested could not be serviced due to the presence of an attribute 2) During an attribute read if another is also present at the same offset.

Typedefs

typedef RingIOShm_Params_Tag RingIOShm_Params
 Structure defining parameters for creating the RingIOShm instances.
typedef RingIOShm_Config_Tag RingIOShm_Config
 Structure defining config parameters for the RingIOShm module.

Functions

Void RingIOShm_Params_init (Void *params)
 Function to initialize the parameters for the RingIOShm instance.
Void RingIOShm_getConfig (RingIOShm_Config *cfgParams)
 Function to get the default configuration for the RingIOShm module.
Int RingIOShm_setup (const RingIOShm_Config *cfgParams)
 Function to setup the RingIOShm module.
Int RingIOShm_destroy (Void)
 Function to destroy the RingIOShm module.


Define Documentation

#define RingIOShm_E_BADVERSION   RingIOShm_MAKE_FAILURE(-4)
 

Versions don't match.

Definition at line 123 of file RingIOShm.h.

#define RingIOShm_E_BUFEMPTY   RingIOShm_MAKE_FAILURE(-10)
 

Indicates that there is no data in the buffer for reading.

Definition at line 160 of file RingIOShm.h.

#define RingIOShm_E_BUFFULL   RingIOShm_MAKE_FAILURE(-11)
 

Indicates that the buffer is full.

Definition at line 166 of file RingIOShm.h.

#define RingIOShm_E_BUFWRAP   RingIOShm_MAKE_FAILURE(-9)
 

Indicates that the amount of data requested could not be serviced due to the ring buffer getting wrapped.

Definition at line 154 of file RingIOShm.h.

#define RingIOShm_E_FAIL   RingIOShm_MAKE_FAILURE(-5)
 

General Failure.

Definition at line 129 of file RingIOShm.h.

#define RingIOShm_E_HANDLE   RingIOShm_MAKE_FAILURE(-8)
 

Invalid handle specified.

Definition at line 147 of file RingIOShm.h.

#define RingIOShm_E_INVALIDARG   RingIOShm_MAKE_FAILURE(-1)
 

Argument passed to a function is invalid.

Definition at line 105 of file RingIOShm.h.

#define RingIOShm_E_INVALIDCONTEXT   RingIOShm_MAKE_FAILURE(-17)
 

Indicates that the api is called with wrong handle.

Definition at line 204 of file RingIOShm.h.

#define RingIOShm_E_INVALIDPROCID   RingIOShm_MAKE_FAILURE(-16)
 

Indicates that an invalid proc id has been specified.

Definition at line 199 of file RingIOShm.h.

#define RingIOShm_E_INVALIDSIZE   RingIOShm_MAKE_FAILURE(-2)
 

Invalid shared address size.

Definition at line 111 of file RingIOShm.h.

#define RingIOShm_E_INVALIDSTATE   RingIOShm_MAKE_FAILURE(-3)
 

Module is not initialized.

Definition at line 117 of file RingIOShm.h.

#define RingIOShm_E_MEMORY   RingIOShm_MAKE_FAILURE(-6)
 

Memory allocation failed.

Definition at line 135 of file RingIOShm.h.

#define RingIOShm_E_NOTCONTIGUOUSDATA   RingIOShm_MAKE_FAILURE(-14)
 

Indicates that Valid data is present in the buffer but is not contiguous as data has been copied from top to footer area.

Definition at line 187 of file RingIOShm.h.

#define RingIOShm_E_OSFAILURE   RingIOShm_MAKE_FAILURE(-7)
 

Failure in OS call.

Definition at line 141 of file RingIOShm.h.

#define RingIOShm_E_PENDINGDATA   RingIOShm_MAKE_FAILURE(-12)
 

Indicates that there is no attribute at the current, but attributes are present at a future offset.

Definition at line 173 of file RingIOShm.h.

#define RingIOShm_E_VARIABLEATTRIBUTE   RingIOShm_MAKE_FAILURE(-13)
 

Indicates that attibute get() failed, need to extract variable length message getv().

Definition at line 180 of file RingIOShm.h.

#define RingIOShm_E_WRONGSTATE   RingIOShm_MAKE_FAILURE(-15)
 

Indicates that the RingIO is in a wrong state.

Definition at line 193 of file RingIOShm.h.

#define RingIOShm_MAKE_FAILURE  ) 
 

Value:

((Int32)  (  0x80000000            \
                                       + (RingIOShm_STATUSCODEBASE  \
                                       + (x))))
Macro to make error code.

Definition at line 90 of file RingIOShm.h.

#define RingIOShm_MAKE_SUCCESS  )     (RingIOShm_STATUSCODEBASE + (x))
 

Macro to make success code.

Definition at line 98 of file RingIOShm.h.

#define RingIOShm_MODULEID   (0x3bff)
 

Unique module ID.

Definition at line 73 of file RingIOShm.h.

#define RingIOShm_S_ALREADYSETUP   RingIOShm_MAKE_SUCCESS(1)
 

The MESSAGETRANSPORTSHM module has already been setup in this process.

Definition at line 217 of file RingIOShm.h.

#define RingIOShm_S_PENDINGATTRIBUTE   RingIOShm_MAKE_SUCCESS(1)
 

Indicates that either: 1) The amount of data requested could not be serviced due to the presence of an attribute 2) During an attribute read if another is also present at the same offset.

Definition at line 227 of file RingIOShm.h.

#define RingIOShm_S_SUCCESS   RingIOShm_MAKE_SUCCESS(0)
 

Definition at line 210 of file RingIOShm.h.

#define RingIOShm_STATUSCODEBASE   (RingIOShm_MODULEID << 12u)
 

Error code base for RingIO.

Definition at line 83 of file RingIOShm.h.


Typedef Documentation

typedef struct RingIOShm_Config_Tag RingIOShm_Config
 

Structure defining config parameters for the RingIOShm module.

typedef struct RingIOShm_Params_Tag RingIOShm_Params
 

Structure defining parameters for creating the RingIOShm instances.


Function Documentation

Int RingIOShm_destroy Void   ) 
 

Function to destroy the RingIOShm module.

Once this function is called, other RingIOShm module APIs, except for the RingIOShm_getConfig API cannot be called anymore.

Return values:
@sa RingIOShm_setup, NameServer_delete, GateMutex_delete

Void RingIOShm_getConfig RingIOShm_Config cfgParams  ) 
 

Function to get the default configuration for the RingIOShm module.

This function can be called by the application to get their configuration parameter to RingIOShm_setup filled in by the RingIOShm module with the default parameters. If the user does not wish to make any change in the default parameters, this API is not required to be called.

Parameters:
cfgParams Pointer to the RingIOShm module configuration structure in which the default config is to be returned.
See also:
RingIOShm_setup

Void RingIOShm_Params_init Void params  ) 
 

Function to initialize the parameters for the RingIOShm instance.

This function can be called by the application to get their configuration parameter to RingIOShm_create filled in by the RingIOShm module with the default parameters.

Parameters:
params Pointer to the RingIOShm instance params structure in which the default params is to be returned.
Return values:
None 
See also:
RingIOShm_create

Int RingIOShm_setup const RingIOShm_Config cfgParams  ) 
 

Function to setup the RingIOShm module.

This function sets up the RingIOShm module. This function must be called before any other instance-level APIs can be invoked. Module-level configuration needs to be provided to this function. If the user wishes to change some specific config parameters, then RingIOShm_getConfig can be called to get the configuration filled with the default values. After this, only the required configuration values can be changed. If the user does not wish to make any change in the default parameters, the application can simply call RingIOShm with NULL parameters. The default parameters would get automatically used.

Parameters:
cfgParams Optional RingIOShm module configuration. If provided as NULL, default configuration is used.
Return values:
@sa RingIOShm_destroy NameServer_create GateMutex_create Memory_alloc


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