Data Structures | Defines | Typedefs | Functions

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.

#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)
 Operation successful.
#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 struct RingIOShm_Params_Tag RingIOShm_Params
 Structure defining parameters for creating the RingIOShm instances.
typedef struct 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_MODULEID   (0x3bff)

Unique module ID.

#define RingIOShm_STATUSCODEBASE   (RingIOShm_MODULEID << 12u)

Error code base for RingIO.

#define RingIOShm_MAKE_FAILURE (   x )
Value:
((Int32)  (  0x80000000            \
                                       + (RingIOShm_STATUSCODEBASE  \
                                       + (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)

Operation successful.

#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.


Typedef Documentation

Structure defining parameters for creating the RingIOShm instances.

Structure defining config parameters for the RingIOShm module.


Function Documentation

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:
paramsPointer to the RingIOShm instance params structure in which the default params is to be returned.
Return values:
None
See also:
RingIOShm_create
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:
cfgParamsPointer to the RingIOShm module configuration structure in which the default config is to be returned.
See also:
RingIOShm_setup
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:
cfgParamsOptional RingIOShm module configuration. If provided as NULL, default configuration is used.
Return values:
See also:
RingIOShm_destroy NameServer_create GateMutex_create Memory_alloc
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:
@saRingIOShm_setup, NameServer_delete, GateMutex_delete
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated