![]() |
![]() |
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 <ti/syslink/RingIO.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_E_INVALIDARG RingIO_E_INVALIDARG |
Argument passed to a function is invalid. | |
#define | RingIOShm_E_INVALIDSTATE RingIO_E_INVALIDSTATE |
Module is not initialized. | |
#define | RingIOShm_E_BADVERSION RingIO_E_BADVERSION |
Versions don't match. | |
#define | RingIOShm_E_FAIL RingIO_E_FAIL |
General Failure. | |
#define | RingIOShm_E_MEMORY RingIO_E_MEMORY |
Memory allocation failed. | |
#define | RingIOShm_E_OSFAILURE RingIO_E_OSFAILURE |
Failure in OS call. | |
#define | RingIOShm_E_BUFWRAP RingIO_E_BUFWRAP |
Indicates that the amount of data requested could not be serviced due to the ring buffer getting wrapped. | |
#define | RingIOShm_E_BUFEMPTY RingIO_E_BUFEMPTY |
Indicates that there is no data in the buffer for reading. | |
#define | RingIOShm_E_BUFFULL RingIO_E_BUFFULL |
Indicates that the buffer is full. | |
#define | RingIOShm_E_PENDINGDATA RingIO_E_PENDINGDATA |
Indicates that there is no attribute at the current, but attributes are present at a future offset. | |
#define | RingIOShm_E_VARIABLEATTRIBUTE RingIO_E_VARIABLEATTRIBUTE |
Indicates that attibute get() failed, need to extract variable length message getv() | |
#define | RingIOShm_E_WRONGSTATE RingIO_E_WRONGSTATE |
Indicates that the RingIO is in a wrong state. | |
#define | RingIOShm_E_INVALIDPROCID RingIO_E_INVALIDPROCID |
Indicates that an invalid proc id has been specified. | |
#define | RingIOShm_E_INVALIDCONTEXT RingIO_E_INVALIDCONTEXT |
Indicates that the api is called with wrong handle. | |
#define | RingIOShm_S_SUCCESS RingIO_S_SUCCESS |
Operation successful. | |
#define | RingIOShm_S_ALREADYSETUP RingIO_S_ALREADYSETUP |
The module has been already setup. | |
#define | RingIOShm_S_PENDINGATTRIBUTE RingIO_S_PENDINGATTRIBUTE |
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 RingIOShm_MODULEID (0x3bff) |
Unique module ID.
#define RingIOShm_E_INVALIDARG RingIO_E_INVALIDARG |
Argument passed to a function is invalid.
#define RingIOShm_E_INVALIDSTATE RingIO_E_INVALIDSTATE |
Module is not initialized.
#define RingIOShm_E_BADVERSION RingIO_E_BADVERSION |
Versions don't match.
#define RingIOShm_E_FAIL RingIO_E_FAIL |
General Failure.
#define RingIOShm_E_MEMORY RingIO_E_MEMORY |
Memory allocation failed.
#define RingIOShm_E_OSFAILURE RingIO_E_OSFAILURE |
Failure in OS call.
#define RingIOShm_E_BUFWRAP RingIO_E_BUFWRAP |
Indicates that the amount of data requested could not be serviced due to the ring buffer getting wrapped.
#define RingIOShm_E_BUFEMPTY RingIO_E_BUFEMPTY |
Indicates that there is no data in the buffer for reading.
#define RingIOShm_E_BUFFULL RingIO_E_BUFFULL |
Indicates that the buffer is full.
#define RingIOShm_E_PENDINGDATA RingIO_E_PENDINGDATA |
Indicates that there is no attribute at the current, but attributes are present at a future offset.
#define RingIOShm_E_VARIABLEATTRIBUTE RingIO_E_VARIABLEATTRIBUTE |
Indicates that attibute get() failed, need to extract variable length message getv()
#define RingIOShm_E_WRONGSTATE RingIO_E_WRONGSTATE |
Indicates that the RingIO is in a wrong state.
#define RingIOShm_E_INVALIDPROCID RingIO_E_INVALIDPROCID |
Indicates that an invalid proc id has been specified.
#define RingIOShm_E_INVALIDCONTEXT RingIO_E_INVALIDCONTEXT |
Indicates that the api is called with wrong handle.
#define RingIOShm_S_SUCCESS RingIO_S_SUCCESS |
Operation successful.
#define RingIOShm_S_ALREADYSETUP RingIO_S_ALREADYSETUP |
The module has been already setup.
#define RingIOShm_S_PENDINGATTRIBUTE RingIO_S_PENDINGATTRIBUTE |
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 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.
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.
params | Pointer to the RingIOShm instance params structure in which the default params is to be returned. |
None |
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.
cfgParams | Pointer to the RingIOShm module configuration structure in which the default config is to be returned. |
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.
cfgParams | Optional RingIOShm module configuration. If provided as NULL, default configuration is used. |
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.