Data Structures | Defines | Typedefs | Enumerations | Functions

FrameQ.h File Reference


Detailed Description

Defines for interfaces for FrameQ module.

#include <ti/syslink/FrameQDefs.h>
#include <ti/syslink/SysLink.h>
#include <ti/ipc/Notify.h>
Include dependency graph for FrameQ.h:

Go to the source code of this file.

Data Structures

struct  FrameQ_CreateParams_Tag
 Common parameters required to create FrameQ instance of any implementation. It should be the first element of the actual implementaton params structure . More...
struct  FrameQ_CommonOpenParams_Tag
 Common parameters required to open a FrameQ instance of any implementation. More...
struct  FrameQ_Params
 Common parameters required to create FrameQ instance of any implementation. It should be the first element of the actual implementaton params structure . More...
struct  FrameQ_NotifyParams_Tag
 Structure defining notification parameter structure. More...

Defines

#define FrameQ_S_ALREADYDESTROYED   2
 Indicates module has been already destroyed.
#define FrameQ_S_ALREADYSETUP   1
 Indicates module is already setup.
#define FrameQ_S_SUCCESS   0
 Operation successful.
#define FrameQ_E_FAIL   -1
 General Failure.
#define FrameQ_E_INVALIDARG   -2
 Argument passed to function is invalid.
#define FrameQ_E_NOTFOUND   -3
 FrameQ instance not found.
#define FrameQ_E_INST_EXISTS   -4
 FrameQ instance already exists.
#define FrameQ_E_WRITER_EXISTS   -5
 Writer client already exists.
#define FrameQ_E_ALLOC_FRAME   -6
 Failed to allocate frame header.
#define FrameQ_E_ALLOC_FRAMEBUF   -7
 Failed to allocate frame buffers.
#define FrameQ_E_MEMORY   -8
 Memory_alloc failed.
#define FrameQ_E_EMPTY   -9
 FrameQ is empty. Can not return frame.
#define FrameQ_E_CREATE_NAMESERVER   -10
 Name server create failed for the module.
#define FrameQ_E_CREATE_GATEMP   -11
 GateMP instance create failed.
#define FrameQ_E_OPEN_GATEMP   -12
 GateMP instance open failed.
#define FrameQ_E_FAIL_CLIENTN0TIFYMGR_CREATE   -13
 Failed to create Client NotifyMgr instance.
#define FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPEN   -14
 Failed to open Client NotifyMgr instance.
#define FrameQ_E_MAX_READERS   -15
 Max limit of readers for a FrameQ is reached.
#define FrameQ_E_ACCESSDENIED   -16
 Operation can not be permitted or not implemented.
#define FrameQ_E_INVALIDSTATE   -17
 Module is not initialized.
#define FrameQ_E_OSFAILURE   -18
 Failure in OS call.
#define FrameQ_E_FAIL_NAMESERVERADD   -19
 Adding FrameQ entry to name server instance failed.
#define FrameQ_E_INVALID_INTERFACE   -20
 Unsupported interface type.
#define FrameQ_E_NOTIMPLEMENTED   -21
 Called API is not implemented.
#define FrameQ_E_OPEN_NAMESERVER   -22
 NameServer open failed.
#define FrameQ_E_INVALID_FRAMEQBUFMGRID   -23
 Invalid FrameQbufMgr id.
#define FrameQ_E_INSUFFICENT_FRAMES   -24
 Reader client get this error in getv call if it is not able to get all the requested frames. API is able to get only few frames.
#define FrameQ_E_ALLOC_MEMORY   -25
 Failed to allocate memory.
#define FrameQ_E_FRAMEQBUFMGROPEN   -26
 Failed to open FrameQBufMgr.
#define FrameQ_E_LISTMPOPEN   -27
 Failed to open ListMP instance.
#define FrameQ_E_CLIENTNOTIFYMGRREGCLIENT   -28
 Failed to register with the clientNotifyMgr.
#define FrameQ_E_FRAMEQBUFMGRREGCLIENT   -29
 Failed to register with the FrameQBufMgr.
#define FrameQ_E_CLIENTNOTIFYMGRUNREGCLIENT   -30
 Failed to unregister with the clientNotifyMgr..
#define FrameQ_E_FRAMEQBUFMGRUNREGCLIENT   -31
 Failed to unregister with the FrameQBufMgr.
#define FrameQ_E_ALREADYREGISTERED   -32
 Call back function is already registered.
#define FrameQ_E_NAMESERVERADD   -33
 NameServer_add failed.
#define FrameQ_FrameBufInfo   Frame_FrameBufInfo
#define FrameQ_FrameHeader   Frame_FrameHeader
 Defines the frame header structure.
#define FrameQ_MAX_NAMELEN   (32u)
 Maximum length of the name string in bytes.
#define FrameQ_MAXFILLEDQUEUS_FOR_READER   (16)
 Max filled queues for a reader client of the FrameQ instance.
#define FrameQ_MAX_INST_READERS   (2u)
 Maximum number of reader clients supported by the instance.
#define FrameQ_MAX_INSTANCES   (64u)
 Maximum number of instances managed by FrameQ.
#define FrameQ_NOTIFY_RESERVED_EVENTNO   (1u)
 Notify Event Number to be used by FrameQ module.

Typedefs

typedef Frame_FrameHeaderFrameQ_Frame
 Defines the type for a frame pointer.
typedef UInt16 FrameQ_NotifyMsg
typedef struct FrameQ_Object * FrameQ_Handle
 Handle for the FrameQ instance.
typedef void(* FrameQ_NotifyFunc )(FrameQ_Handle, Ptr arg, FrameQ_NotifyMsg)
 Prototype of the FrameQ call back function.
typedef enum FrameQ_NotifyType_Tag FrameQ_NotifyType
 Enumerates the notification types for FrameQ.
typedef enum FrameQ_OpenMode_Tag FrameQ_OpenMode
 Enumerations to indicate FrameQ open modes.
typedef enum
FrameQ_CpuAccessFlags_Tag 
FrameQ_CpuAccessFlags
 Enumeration of CPU access flags for frame buffers. For frame headers CPUACCESS is assumed to be TRUE..
typedef enum FrameQ_Interface_Tag FrameQ_Interface
 Enumeration of FrameQ interface types.Denotes different implementation types.
typedef struct
FrameQ_CreateParams_Tag 
FrameQ_CreateParams
 Common parameters required to create FrameQ instance of any implementation. It should be the first element of the actual implementaton params structure .
typedef struct
FrameQ_CommonOpenParams_Tag 
FrameQ_CommonOpenParams
 Common parameters required to open a FrameQ instance of any implementation.
typedef struct FrameQ_Params FrameQ_Params
 Common parameters required to create FrameQ instance of any implementation. It should be the first element of the actual implementaton params structure .
typedef struct
FrameQ_NotifyParams_Tag 
FrameQ_NotifyParams
 Structure defining notification parameter structure.

Enumerations

enum  FrameQ_NotifyType_Tag {
  FrameQ_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
  FrameQ_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
  FrameQ_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
  FrameQ_NOTIFICATION_HDWRFIFO_ALWAYS,
  FrameQ_NOTIFICATION_HDWRFIFO_ONCE
}
 

Enumerates the notification types for FrameQ.

More...
enum  FrameQ_OpenMode_Tag {
  FrameQ_MODE_NONE,
  FrameQ_MODE_WRITER,
  FrameQ_MODE_READER
}
 

Enumerations to indicate FrameQ open modes.

More...
enum  FrameQ_CpuAccessFlags_Tag {
  FrameQ_FRAMEBUF0_CPUACCESS = 0x10000,
  FrameQ_FRAMEBUF1_CPUACCESS = 0x20000,
  FrameQ_FRAMEBUF2_CPUACCESS = 0x40000,
  FrameQ_FRAMEBUF3_CPUACCESS = 0x80000,
  FrameQ_FRAMEBUF4_CPUACCESS = 0x100000,
  FrameQ_FRAMEBUF5_CPUACCESS = 0x200000,
  FrameQ_FRAMEBUF6_CPUACCESS = 0x400000,
  FrameQ_FRAMEBUF7_CPUACCESS = 0x800000
}
 

Enumeration of CPU access flags for frame buffers. For frame headers CPUACCESS is assumed to be TRUE..

More...
enum  FrameQ_Interface_Tag {
  FrameQ_INTERFACE_SHAREDMEM = 0x0,
  FrameQ_INTERFACE_NONE = 0x1
}
 

Enumeration of FrameQ interface types.Denotes different implementation types.

More...

Functions

Int32 FrameQ_isSupportedInterface (UInt32 type)
 Function to know whether the give ctrlInterfaceType is supported.
FrameQ_Handle FrameQ_create (Ptr params)
 Creates a new instance of FrameQ .
Int32 FrameQ_delete (FrameQ_Handle *pHandle)
 Function to delete an instance of FrameQ.
Int32 FrameQ_open (Ptr openParams, FrameQ_Handle *handlePtr)
 Function to open the created FrameQ instance..
Int32 FrameQ_openByAddr (FrameQ_Handle *handlePtr, Ptr openParams)
 Function to open the created FrameQ instance if shared address is known.
Int32 FrameQ_close (FrameQ_Handle *pHandle)
 Function to close the opened FrameQ instance.
Int32 FrameQ_alloc (FrameQ_Handle handle, FrameQ_Frame *framePtr)
 Function to allocate frame.
Int32 FrameQ_allocv (FrameQ_Handle handle, FrameQ_Frame framePtr[], UInt32 freeQId[], UInt8 *numFrames)
 Function to allocate multiple frames.
Int32 FrameQ_free (FrameQ_Handle handle, FrameQ_Frame frame)
 Function to free frame.
Int32 FrameQ_freev (FrameQ_Handle handle, FrameQ_Frame framePtr[], UInt32 numFrames)
 Function to free multiple frames.
Int32 FrameQ_put (FrameQ_Handle handle, FrameQ_Frame frame)
 Function to insert frame in to FrameQ instance.
Int32 FrameQ_putv (FrameQ_Handle handle, FrameQ_Frame framePtr[], UInt32 filledQueueId[], UInt8 numFrames)
 Function to insert multiple frames in to queues of a FrameQ reader client.
Int32 FrameQ_get (FrameQ_Handle handle, FrameQ_Frame *framePtr)
 Function to retrieve frame from FrameQ instance by reader client.
Int32 FrameQ_getv (FrameQ_Handle handle, FrameQ_Frame pframe[], UInt32 filledQueueId[], UInt8 *numFrames)
 Function to retrieve frames from the given queues of a reader client.
Int32 FrameQ_dup (FrameQ_Handle handle, FrameQ_Frame frame, FrameQ_Frame *dupedFrame)
 Function to duplicate the given frame.
Int32 FrameQ_registerNotifier (FrameQ_Handle handle, FrameQ_NotifyParams *notifyParams)
 API to register a call back function.
Int32 FrameQ_unregisterNotifier (FrameQ_Handle handle)
 Function to un register call back function.
Int32 FrameQ_sendNotify (FrameQ_Handle handle, UInt16 msg)
 Function to send forced notification to the reader clients.
Int32 FrameQ_getNumFrames (FrameQ_Handle handle, UInt32 *numFrames)
 Function to find out the number of available frames in a FrameQ .
Int32 FrameQ_getvNumFrames (FrameQ_Handle handle, UInt32 numFrames[], UInt8 filledQId[], UInt8 numFilledQids)
 Function to find out the number of available frames in a FrameQ .
Int32 FrameQ_getNumFreeFrames (FrameQ_Handle handle, UInt32 *numFreeFrames)
 Function to get the number of free frames.
Int32 FrameQ_getvNumFreeFrames (FrameQ_Handle handle, UInt32 numFreeFrames[], UInt8 freeQId[], UInt8 numFreeQids)
 Function to get the number of free frames.
Int32 FrameQ_control (FrameQ_Handle handle, Int32 cmd, Ptr arg)
 Provides a hook to perform implementation dependent operation.
Ptr FrameQ_getExtendedHeaderPtr (FrameQ_Frame frame)
 API to get the pointer to the extended header.
UInt32 FrameQ_getNumFrameBuffers (FrameQ_Frame frame)
 Function to find out the number of frame buffers contained in a frame.
Ptr FrameQ_getFrameBuffer (FrameQ_Frame frame, UInt32 frameBufNum)
 Function to get the framebuffer.
UInt32 FrameQ_getFrameBufSize (FrameQ_Frame frame, UInt32 frameBufNum)
 Function to get size of frame buffer.
UInt32 FrameQ_getFrameBufValidSize (FrameQ_Frame frame, UInt32 frameBufNum)
 Function to get valid data size of a frame buffer.
UInt32 FrameQ_getFrameBufDataStartOffset (FrameQ_Frame frame, UInt32 frameBufNum)
 API to get the valid data start offset in framebuffer identified by frameBufNum in a given frame.
Int32 FrameQ_setFrameBufValidSize (FrameQ_Frame frame, UInt32 frameBufNum, UInt32 validDataSize)
 API to set the valid data size of a framebuffer identified by frameBufNum in given frame.
Int32 FrameQ_setFrameBufDataStartOffset (FrameQ_Frame frame, UInt32 frameBufNum, UInt32 dataStartOffset)
 API to set the valid data start offset of a framebuffer identified by frameBufNum in a given frame.

Define Documentation

#define FrameQ_S_ALREADYDESTROYED   2

Indicates module has been already destroyed.

#define FrameQ_S_ALREADYSETUP   1

Indicates module is already setup.

#define FrameQ_S_SUCCESS   0

Operation successful.

#define FrameQ_E_FAIL   -1

General Failure.

#define FrameQ_E_INVALIDARG   -2

Argument passed to function is invalid.

#define FrameQ_E_NOTFOUND   -3

FrameQ instance not found.

#define FrameQ_E_INST_EXISTS   -4

FrameQ instance already exists.

#define FrameQ_E_WRITER_EXISTS   -5

Writer client already exists.

#define FrameQ_E_ALLOC_FRAME   -6

Failed to allocate frame header.

#define FrameQ_E_ALLOC_FRAMEBUF   -7

Failed to allocate frame buffers.

#define FrameQ_E_MEMORY   -8

Memory_alloc failed.

#define FrameQ_E_EMPTY   -9

FrameQ is empty. Can not return frame.

#define FrameQ_E_CREATE_NAMESERVER   -10

Name server create failed for the module.

#define FrameQ_E_CREATE_GATEMP   -11

GateMP instance create failed.

#define FrameQ_E_OPEN_GATEMP   -12

GateMP instance open failed.

#define FrameQ_E_FAIL_CLIENTN0TIFYMGR_CREATE   -13

Failed to create Client NotifyMgr instance.

#define FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPEN   -14

Failed to open Client NotifyMgr instance.

#define FrameQ_E_MAX_READERS   -15

Max limit of readers for a FrameQ is reached.

#define FrameQ_E_ACCESSDENIED   -16

Operation can not be permitted or not implemented.

#define FrameQ_E_INVALIDSTATE   -17

Module is not initialized.

#define FrameQ_E_OSFAILURE   -18

Failure in OS call.

#define FrameQ_E_FAIL_NAMESERVERADD   -19

Adding FrameQ entry to name server instance failed.

#define FrameQ_E_INVALID_INTERFACE   -20

Unsupported interface type.

#define FrameQ_E_NOTIMPLEMENTED   -21

Called API is not implemented.

#define FrameQ_E_OPEN_NAMESERVER   -22

NameServer open failed.

#define FrameQ_E_INVALID_FRAMEQBUFMGRID   -23

Invalid FrameQbufMgr id.

#define FrameQ_E_INSUFFICENT_FRAMES   -24

Reader client get this error in getv call if it is not able to get all the requested frames. API is able to get only few frames.

#define FrameQ_E_ALLOC_MEMORY   -25

Failed to allocate memory.

#define FrameQ_E_FRAMEQBUFMGROPEN   -26

Failed to open FrameQBufMgr.

#define FrameQ_E_LISTMPOPEN   -27

Failed to open ListMP instance.

#define FrameQ_E_CLIENTNOTIFYMGRREGCLIENT   -28

Failed to register with the clientNotifyMgr.

#define FrameQ_E_FRAMEQBUFMGRREGCLIENT   -29

Failed to register with the FrameQBufMgr.

#define FrameQ_E_CLIENTNOTIFYMGRUNREGCLIENT   -30

Failed to unregister with the clientNotifyMgr..

#define FrameQ_E_FRAMEQBUFMGRUNREGCLIENT   -31

Failed to unregister with the FrameQBufMgr.

#define FrameQ_E_ALREADYREGISTERED   -32

Call back function is already registered.

#define FrameQ_E_NAMESERVERADD   -33

NameServer_add failed.

#define FrameQ_FrameBufInfo   Frame_FrameBufInfo
#define FrameQ_FrameHeader   Frame_FrameHeader

Defines the frame header structure.

#define FrameQ_MAX_NAMELEN   (32u)

Maximum length of the name string in bytes.

#define FrameQ_MAXFILLEDQUEUS_FOR_READER   (16)

Max filled queues for a reader client of the FrameQ instance.

#define FrameQ_MAX_INST_READERS   (2u)

Maximum number of reader clients supported by the instance.

#define FrameQ_MAX_INSTANCES   (64u)

Maximum number of instances managed by FrameQ.

#define FrameQ_NOTIFY_RESERVED_EVENTNO   (1u)

Notify Event Number to be used by FrameQ module.


Typedef Documentation

Defines the type for a frame pointer.

typedef struct FrameQ_Object* FrameQ_Handle

Handle for the FrameQ instance.

Prototype of the FrameQ call back function.

Enumerates the notification types for FrameQ.

Enumerations to indicate FrameQ open modes.

Enumeration of CPU access flags for frame buffers. For frame headers CPUACCESS is assumed to be TRUE..

Enumeration of FrameQ interface types.Denotes different implementation types.

Common parameters required to create FrameQ instance of any implementation. It should be the first element of the actual implementaton params structure .

Common parameters required to open a FrameQ instance of any implementation.

typedef struct FrameQ_Params FrameQ_Params

Common parameters required to create FrameQ instance of any implementation. It should be the first element of the actual implementaton params structure .

Structure defining notification parameter structure.


Enumeration Type Documentation

Enumerates the notification types for FrameQ.

Enumerator:
FrameQ_NOTIFICATION_NONE 

No notification is required.

FrameQ_NOTIFICATION_ALWAYS 

Notify whenever the other client sends data/frees up space.

FrameQ_NOTIFICATION_ONCE 

Notify when the other side sends data/frees up space. Once the notification is done, the notification is disabled until it is enabled again.

FrameQ_NOTIFICATION_HDWRFIFO_ALWAYS 

Notify whenever the other side sends data/frees up space. This notification is never disabled.

FrameQ_NOTIFICATION_HDWRFIFO_ONCE 

Notify when the other side sends data/frees up space. Once the notification is done, the notification is disabled until it is enabled again. The notification is enabled once the watermark is crossed and does not require buffer to get full/empty.

Enumerations to indicate FrameQ open modes.

Enumerator:
FrameQ_MODE_NONE 

Mode is not reader/writer.Apps should not use this as open mode

FrameQ_MODE_WRITER 

FrameQ mode is writer.

FrameQ_MODE_READER 

FrameQ mode is reader.

Enumeration of CPU access flags for frame buffers. For frame headers CPUACCESS is assumed to be TRUE..

Enumerator:
FrameQ_FRAMEBUF0_CPUACCESS 

If specified first frame buffer is accessed through CPU (direct memory access).

FrameQ_FRAMEBUF1_CPUACCESS 

If specified second frame buffer is accessed through CPU (direct memory access).

FrameQ_FRAMEBUF2_CPUACCESS 

If specified third frame buffer is accessed through CPU (direct memory access).

FrameQ_FRAMEBUF3_CPUACCESS 

If specified fourth frame buffer is accessed through CPU (direct memory access).

FrameQ_FRAMEBUF4_CPUACCESS 

If specified fifth frame buffer is accessed through CPU (direct memory access).

FrameQ_FRAMEBUF5_CPUACCESS 

If specified sixth frame buffer is accessed through CPU (direct memory access).

FrameQ_FRAMEBUF6_CPUACCESS 

If specified seventh frame buffer is accessed through CPU (direct memory access).

FrameQ_FRAMEBUF7_CPUACCESS 

If specified eighth frame buffer is accessed through CPU (direct memory access).

Enumeration of FrameQ interface types.Denotes different implementation types.

Enumerator:
FrameQ_INTERFACE_SHAREDMEM 

Denotes FrameQ implementation (FrameQ_ShMem Implementation) on shared memory.

FrameQ_INTERFACE_NONE 

Function Documentation

Int32 FrameQ_isSupportedInterface ( UInt32  type )

Function to know whether the give ctrlInterfaceType is supported.

This function returns TRUE if the interface provide is supported other wise returns FALSE.

Parameters:
typetype of interface see enum FrameQ_Interface for details.
Return values:
TRUEGiven interface is supported.
FALSEGiven interface is no supported.
See also:
Enum FrameQ_Interface.
FrameQ_Handle FrameQ_create ( Ptr  params )

Creates a new instance of FrameQ .

This function create a new instance of FrameQ. It creates a frameQ based on the params specific to implementations.

Parameters:
paramspointer to implementation specific params.
Return values:
HandleInstance handle.
NULLCreate failed.
See also:
FrameQ_Shmem_params.FrameQ_delete(), FrameQ_open() and FrameQ_close.
Int32 FrameQ_delete ( FrameQ_Handle pHandle )

Function to delete an instance of FrameQ.

This function delets FrameQ instance that created.

Parameters:
pHandlePointer to the created frameQ instance handle.
Return values:
FrameQ_S_SUCCESSDelete successful.
FrameQ_E_FAILDelete failed.
FrameQ_E_INVALIDARGPoiinter to Handle passed is null.
FrameQ_E_INVALIDARGHandle passed is null.
See also:
FrameQ_create(), FrameQ_open() and FrameQ_close.
Int32 FrameQ_open ( Ptr  openParams,
FrameQ_Handle handlePtr 
)

Function to open the created FrameQ instance..

This function opens the FrameQ instance in reader or writer mode depending upon the open params passed to it.

Parameters:
openParamsPointer to implementation specific open params.
handlePtrReturn parameter.Instance opened in given mode.
Return values:
FrameQ_S_SUCCESSopen successful.
FrameQ_E_INVALIDARGInvalid parameter specified.
FrameQ_E_INVALIDSTATEModule is not initialized.
FrameQ_E_MEMORYMemory_alloc failed.
FrameQ_E_ALLOC_MEMORYMemory_alloc failed.
FrameQ_E_FRAMEQBUFMGROPENFrameQBufMge instance open failed.
FrameQ_E_OPEN_GATEMPGateMP open failed.
FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPENClientNotifyMgr open failed.
FrameQ_E_LISTMPOPENInternal ListMP instance open failed.
FrameQ_E_NOTFOUNDInstance not found in FrameQ Nameserver.
See also:
FrameQ_ShMem_openParams, FrameQ_create(), FrameQ_delete() and FrameQ_close.
Int32 FrameQ_openByAddr ( FrameQ_Handle handlePtr,
Ptr  openParams 
)

Function to open the created FrameQ instance if shared address is known.

This function opens the FrameQ instance in reader or writer mode depending upon the open params passed to it. Apps should pass the valid shared addr of the created instance.

Parameters:
openParamsPointer to implementation specific open params.
handlePtrReturn parameter.Instance opened in given mode.
Return values:
FrameQ_S_SUCCESSopen successful.
FrameQ_E_INVALIDARGInvalid parameter specified.
FrameQ_E_INVALIDSTATEModule is not initialized.
FrameQ_E_MEMORYMemory_alloc failed.
FrameQ_E_ALLOC_MEMORYMemory_alloc failed.
FrameQ_E_FRAMEQBUFMGROPENFrameQBufMge instance open failed.
FrameQ_E_OPEN_GATEMPGateMP open failed.
FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPENClientNotifyMgr open failed.
FrameQ_E_LISTMPOPENInternal ListMP instance open failed.
FrameQ_E_NOTFOUNDInstance not found in FrameQ Nameserver.
See also:
FrameQ_ShMem_openParams, FrameQ_create(), FrameQ_delete() and FrameQ_close.
Int32 FrameQ_close ( FrameQ_Handle pHandle )

Function to close the opened FrameQ instance.

This function closes FrameQ instance that is opened.

Parameters:
pHandlePointer to the opened frameQ instance handle.
Return values:
FrameQ_S_SUCCESSClose successful.
FrameQ_E_FAILClose failed.
FrameQ_E_INVALIDARGPoiinter to Handle passed is null.
FrameQ_E_INVALIDARGHandle passed is null.
See also:
FrameQ_create(), FrameQ_open() and FrameQ_delete.
Int32 FrameQ_alloc ( FrameQ_Handle  handle,
FrameQ_Frame framePtr 
)

Function to allocate frame.

This function allocates a frame when called by FrameQ writer. This API internally makes a call to configured FrameQbufMgr to allocate a free frame.

Parameters:
handleFrameQ writer handle.
framePtrLocation to receive the allocated frame.
Return values:
FrameQ_S_SUCCESSSuccessfully allocated frame.
FrameQ_E_FAILInternal FrameQBufMgr_alloc failed.
FrameQ_E_INVALIDARGframePtr paased is null.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not allocate frames. Only writer can allocate frames.
See also:
FrameQ_open(), FrameQ_free(), FrameQ_put() and FrameQ_get().
Int32 FrameQ_allocv ( FrameQ_Handle  handle,
FrameQ_Frame  framePtr[],
UInt32  freeQId[],
UInt8 numFrames 
)

Function to allocate multiple frames.

This function allocates frames from multiple free pools of plugged in FrameQBufMgr.After API returns, numframes will denotes the number of successfully allocated frames.The max size of framePtr and freeQId array is defined by macro FrameQ_MAX_FRAMESINVAPI.

Parameters:
handleFrameQ writer handle.
framePtrArray to receive pointers to allocated frames.
freeQIdArray of free frame pool nos of the plugged in FrameQBufMgrfrom from which this API needs to allocate frames actual size of that is allocated.
numFramesNumber of frames that needs to be allocated.
Return values:
FrameQ_S_SUCCESSSuccessfully allocated frames.
FrameQ_E_FAILInternal FrameQBufMgr_allocv failed.
FrameQ_E_INVALIDARGframePtr passed is null.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDARGfreeQId passed is null.
FrameQ_E_INVALIDARGnumFrames passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not allocate frames. Only writer can allocate frames. Only writer can allocate frames.
See also:
FrameQ_open(), FrameQ_freev(), FrameQ_putv() and FrameQ_getv().
Int32 FrameQ_free ( FrameQ_Handle  handle,
FrameQ_Frame  frame 
)

Function to free frame.

This function frees a frame when called by FrameQ writer or reader. This API internally makes a call to configured FrameQbufMgr to free the frame.

Parameters:
handleOpened FrameQ instance handle.
frameFrame to be freed.
Return values:
FrameQ_S_SUCCESSSuccessfully freed frame.
FrameQ_E_FAILInternal FrameQBufMgr_free failed.
FrameQ_E_INVALIDARGframe passed is null.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not free frames. Only writer or reader can free frames.
See also:
FrameQ_open(), FrameQ_alloc(), FrameQ_put() and FrameQ_get().
Int32 FrameQ_freev ( FrameQ_Handle  handle,
FrameQ_Frame  framePtr[],
UInt32  numFrames 
)

Function to free multiple frames.

This function frees multiple frames when called by FrameQ writer or writer. This API internally makes a call to configured FrameQbufMgr to free frames.

Parameters:
handleOpened FrameQ instance handle.
framePtrArray of frames to be freed.
numFramesNumber of Frames to be freed.
Return values:
FrameQ_S_SUCCESSSuccessfully freed frames.
FrameQ_E_FAILInternal FrameQBufMgr_freev failed.
FrameQ_E_INVALIDARGframe passed is null.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not free frames. Only writer or reader can free frames.
See also:
FrameQ_open(), FrameQ_allocv(), FrameQ_putv() and FrameQ_getv().
Int32 FrameQ_put ( FrameQ_Handle  handle,
FrameQ_Frame  frame 
)

Function to insert frame in to FrameQ instance.

This function inserts frame in to FrameQ. It inserts frame in to filled frame queue 0 of FrameQ reader clients. If multiple readers exist, 1.FrameQ inserts the original gien frame into first reader's queue 0. 2.FrameQ duplicates the original frame and inserts duplicated frames in to rest of the reader's queue 0.

Parameters:
handleOpened FrameQ instance handle.
frameFrame to be inserted.
Return values:
FrameQ_S_SUCCESSSuccessfully freed frames.
FrameQ_E_FAILFailed to put frame.
FrameQ_E_INVALIDARGframe passed is null.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not free frames. Only writer or reader can put frames.
See also:
FrameQ_get().
Int32 FrameQ_putv ( FrameQ_Handle  handle,
FrameQ_Frame  framePtr[],
UInt32  filledQueueId[],
UInt8  numFrames 
)

Function to insert multiple frames in to queues of a FrameQ reader client.

If multiple readers exist, It dups the given frames and inserts in to other readers' queues.The Size of framePtr and filledQueueId should be atleast equal to numFrames. The max size of framePtr and filledQueueId array is defined by macro FrameQ_MAX_FRAMESINVAPI.

Parameters:
handleInstance handle.
framePtrArray of frames to be inserted.
filledQueueIdArray of filled queues of reader.
numFramesNumber of frames.
Return values:
FrameQ_S_SUCCESSSuccessfully inserted frames.
FrameQ_E_FAILFailed to put frames.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDARGframePtr passed is null.
FrameQ_E_INVALIDARGfilledQueueId passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not put frames. Only writer or reader can put frames.
See also:
FrameQ_getv().
Int32 FrameQ_get ( FrameQ_Handle  handle,
FrameQ_Frame framePtr 
)

Function to retrieve frame from FrameQ instance by reader client.

This Function retrieves frame from the queue 0 of caller client. Only readers are allowed to call this API.

Parameters:
handleInstance handle.
framePtrLocation to receive frame.
Return values:
FrameQ_S_SUCCESSSuccessfully retrieved frame.
FrameQ_E_FAILFailed to get frame.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDARGframePtr passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not retrieve frame. Only reader client can retrieve frame.
See also:
FrameQ_put().
Int32 FrameQ_getv ( FrameQ_Handle  handle,
FrameQ_Frame  pframe[],
UInt32  filledQueueId[],
UInt8 numFrames 
)

Function to retrieve frames from the given queues of a reader client.

This Function retrieves frames from the queues of caller client. Only readers are allowed to call this API.It returns frames if all the required frames are available in the FrameQ.The Size of pframe and filledQueueId should be atleast equal to numFrames. The max size of framePtr and filledQueueId array is defined by macro FrameQ_MAX_FRAMESINVAPI.

Parameters:
handleInstance handle.
pframeLocation to receive frames the queues specified in filledQueueId array argument.
filledQueueIdArray of queue ids from which frames.
numFramesDenotes number of frames that needs to retrieved from the filled Queues ids specified by filledQueueId. The Size of pframe and filledQueueId should be atleast equal to number of frames specified in numFrames value can be max FrameQ_MAX_FRAMESINVAPI.
Return values:
FrameQ_S_SUCCESSSuccessfully retrieved frames.
FrameQ_E_FAILFailed to get frames.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDARGpframe passed is null.
FrameQ_E_INVALIDARGfilledQueueId passed is null.
FrameQ_E_INVALIDARGnumFrames passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not retrieve frames. Only reader client can retrieve frames.
See also:
FrameQ_putv().
Int32 FrameQ_dup ( FrameQ_Handle  handle,
FrameQ_Frame  frame,
FrameQ_Frame dupedFrame 
)

Function to duplicate the given frame.

This Function duplicates the given frame.It allocates one frame header buffer and copies the header information given in original frame and returns it.

Parameters:
handleInstance handle.
frameframe to be duplicated.
dupedFrameLocation to receive the duplicated frame.
Return values:
FrameQ_S_SUCCESSSuccessfully retrieved frames.
FrameQ_E_FAILFailed to get frames.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDARGframe passed is null.
FrameQ_E_INVALIDARGdupedFrame passed is null.
FrameQ_E_ACCESSDENIEDProvided handle can not dup frames. Only writer/reader client can dup frame.
See also:
FrameQ_alloc().
Int32 FrameQ_registerNotifier ( FrameQ_Handle  handle,
FrameQ_NotifyParams notifyParams 
)

API to register a call back function.

For reader : It registers notification function to notify about available frames in the FrameQ. For writer : It registers notification function to notify about available free frames in the Plugged in FrameQBufMgr.

Parameters:
handleInstance handle.
notifyParamsPointer to notifyParams.
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDARGnotifyParams passed is null.
FrameQ_E_INVALIDSTATEModule is not initialized.
FrameQ_E_FAILFailed to register notification.
See also:
FrameQ_unregisterNotifier
Int32 FrameQ_unregisterNotifier ( FrameQ_Handle  handle )

Function to un register call back function.

Parameters:
handleReader/writer client Handle.
Return values:
FrameQ_S_SUCCESSSuccessfully duped frame.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDARGnotifyParams passed is null.
FrameQ_E_INVALIDSTATEModule is not initialized.
FrameQ_E_FAILFailed to register notification.
See also:
FrameQ_registerNotifier
Int32 FrameQ_sendNotify ( FrameQ_Handle  handle,
UInt16  msg 
)

Function to send forced notification to the reader clients.

Parameters:
handlewriter client Handle.
msgpayload that needs to be send to reader.
Return values:
FrameQ_S_SUCCESSSuccessfully sent notification.
FrameQ_E_INVALIDARGhandle passed is null.
FrameQ_E_INVALIDSTATEModule is not initialized.
FrameQ_E_FAILFailed to send notification.
FrameQ_E_ACCESSDENIEDhandle is not a writer handle.can not send notification.
See also:
FrameQ_registerNotifier
Int32 FrameQ_getNumFrames ( FrameQ_Handle  handle,
UInt32 numFrames 
)

Function to find out the number of available frames in a FrameQ .

For Writer: It returns the number of frames in the primary reader's filled queue 0. For Reader: It returns the number of frames in the Reader's(caller)filledqueue 0.

Parameters:
handleReader client Handle.
numFramesLocation to recieve the number of frames.
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_FAILAPI failed.
See also:
Int32 FrameQ_getvNumFrames ( FrameQ_Handle  handle,
UInt32  numFrames[],
UInt8  filledQId[],
UInt8  numFilledQids 
)

Function to find out the number of available frames in a FrameQ .

For Reader this function is to get the available frames from the queues associated with it. For writer this function is to get the available frames from the queues associated with the primary Reader(first reader).

Parameters:
handleWriter/Reader client handle.
numFramesLocation to recieve the number of frames.
filledQIdArray of filled queues.
numFilledQidsNumber of queues specified in filledQId array.
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_FAILAPI failed.
See also:
Int32 FrameQ_getNumFreeFrames ( FrameQ_Handle  handle,
UInt32 numFreeFrames 
)

Function to get the number of free frames.

Function to get the number of free frames available in the plugged in FrameQbufMgr's FreeFramePool 0 The returned number free frames may not exist in the frameQbufMgr after this call. This is because if allocs can be done by the other FrameQ writers on the same FrameQBufMgr.If frames are freed by other frameQ writers then the free Frames would be even more than the value that this API returns.

Parameters:
handleInstance handle.
numFreeFramesout parameter that denotes the number of free frames available
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_FAILAPI failed.
See also:
Int32 FrameQ_getvNumFreeFrames ( FrameQ_Handle  handle,
UInt32  numFreeFrames[],
UInt8  freeQId[],
UInt8  numFreeQids 
)

Function to get the number of free frames.

Function to get the number of free frames available in the plugged in FrameQbufMgr's FreeFramePools The returned number free frames may not exist in the frameQbufMgr after this call. This is because if allocs can be done by the other FrameQ writers on the same FrameQBufMgr.If frames are freed by other frameQ writers then the free Frames would be even more than the value that this API returns.

Parameters:
handleInstance handle.
numFreeFramesout parameter that denotes the number of free frames available
freeQIdArray of free queues.
numFreeQidsNumber of queues specified in freeQId array.
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_FAILAPI failed.
See also:
Int32 FrameQ_control ( FrameQ_Handle  handle,
Int32  cmd,
Ptr  arg 
)

Provides a hook to perform implementation dependent operation.

Parameters:
handleInstance handle.
cmdCommand to perform.
argvoid * argument.
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_FAILAPI failed.
Ptr FrameQ_getExtendedHeaderPtr ( FrameQ_Frame  frame )

API to get the pointer to the extended header.

Parameters:
framepointer to frame
Return values:
pointerPointer to extended header pointer in frame header.
UInt32 FrameQ_getNumFrameBuffers ( FrameQ_Frame  frame )

Function to find out the number of frame buffers contained in a frame.

Parameters:
framepointer to frame
Return values:
numberof frame buffers.
Ptr FrameQ_getFrameBuffer ( FrameQ_Frame  frame,
UInt32  frameBufNum 
)

Function to get the framebuffer.

Parameters:
framepointer to frame
frameBufNumframe buffer index in the given frame
Return values:
Pointerto frame buffer.
UInt32 FrameQ_getFrameBufSize ( FrameQ_Frame  frame,
UInt32  frameBufNum 
)

Function to get size of frame buffer.

Parameters:
framepointer to frame
frameBufNumframe buffer index in the given frame
Return values:
sizeframe buffer size.
UInt32 FrameQ_getFrameBufValidSize ( FrameQ_Frame  frame,
UInt32  frameBufNum 
)

Function to get valid data size of a frame buffer.

Parameters:
framepointer to frame
frameBufNumframe buffer index in the given frame
Return values:
sizevalid size of the frame buffer.
UInt32 FrameQ_getFrameBufDataStartOffset ( FrameQ_Frame  frame,
UInt32  frameBufNum 
)

API to get the valid data start offset in framebuffer identified by frameBufNum in a given frame.

Parameters:
framepointer to frame
frameBufNumframe buffer index in the given frame
Return values:
offsetvalid data offset in the frame buffer.
Int32 FrameQ_setFrameBufValidSize ( FrameQ_Frame  frame,
UInt32  frameBufNum,
UInt32  validDataSize 
)

API to set the valid data size of a framebuffer identified by frameBufNum in given frame.

Parameters:
framepointer to frame
frameBufNumframe buffer index in the given frame
validDataSizesize of the valid data
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_FAILAPI failed.
Int32 FrameQ_setFrameBufDataStartOffset ( FrameQ_Frame  frame,
UInt32  frameBufNum,
UInt32  dataStartOffset 
)

API to set the valid data start offset of a framebuffer identified by frameBufNum in a given frame.

Parameters:
framepointer to frame
frameBufNumframe buffer index in the given frame
dataStartOffsetvalid data startoffset that needs to set for the frame buffer.
Return values:
FrameQ_S_SUCCESSOperation successful.
FrameQ_E_FAILAPI failed.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated