Defines for interfaces for FrameQ module.
#include <ti/syslink/FrameQDefs.h>
#include <ti/syslink/SysLink.h>
#include <ti/ipc/Notify.h>
Go to the source code of this file.
Data Structures | |
struct | FrameQ_Config_Tag |
Structure defining config parameters for the FrameQ module. More... | |
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 |
Defines the frame buffer information. | |
#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_FrameHeader * | FrameQ_Frame |
Defines the type for a frame pointer. | |
typedef UInt16 | FrameQ_NotifyMsg |
This type is used for the notification message. This is a 16 bit payload which can be sent to the remote processor in a notification call. | |
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_Config_Tag | FrameQ_Config |
Structure defining config parameters for the FrameQ module. | |
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 given interface type is supported. | |
FrameQ_Handle | FrameQ_create (Ptr params) |
Create a FrameQ instance. | |
Int32 | FrameQ_delete (FrameQ_Handle *pHandle) |
Delete a FrameQ instance. | |
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) |
Determine the number of frame buffers in a frame. | |
Ptr | FrameQ_getFrameBuffer (FrameQ_Frame frame, UInt32 frameBufNum) |
Function to get the framebuffer. | |
UInt32 | FrameQ_getFrameBufSize (FrameQ_Frame frame, UInt32 frameBufNum) |
Determine the 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) |
Function 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) |
Function 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. | |
Void | FrameQ_getConfig (FrameQ_Config *cfg) |
Get the default configuration for the FrameQ module. | |
Int32 | FrameQ_setup (FrameQ_Config *cfg) |
Setup the FrameQ module. | |
Int32 | FrameQ_destroy (Void) |
Finalize the FrameQ module. |
#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 |
Defines the frame buffer information.
#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 Frame_FrameHeader* FrameQ_Frame |
Defines the type for a frame pointer.
typedef UInt16 FrameQ_NotifyMsg |
This type is used for the notification message. This is a 16 bit payload which can be sent to the remote processor in a notification call.
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_Config_Tag FrameQ_Config |
Structure defining config parameters for the FrameQ module.
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.
Enumerates the notification types for FrameQ.
enum FrameQ_OpenMode_Tag |
Enumeration of CPU access flags for frame buffers. For frame headers CPUACCESS is assumed to be TRUE..
enum FrameQ_Interface_Tag |
Function to know whether the given interface type is supported.
This function returns TRUE if the interface provide is supported other wise returns FALSE.
type | type of interface see enum FrameQ_Interface for details. |
TRUE | Given interface is supported. |
FALSE | Given interface is no supported. |
FrameQ_Handle FrameQ_create | ( | Ptr | params ) |
Create a FrameQ instance.
This function create a new instance of FrameQ. It creates a frameQ based on the params specific to implementations.
params | pointer to implementation specific params. |
Handle | Instance handle. |
NULL | Create failed. |
Int32 FrameQ_delete | ( | FrameQ_Handle * | pHandle ) |
Delete a FrameQ instance.
This function deletes FrameQ instance that created.
pHandle | Pointer to the created frameQ instance handle. |
FrameQ_S_SUCCESS | Delete successful. |
FrameQ_E_FAIL | Delete failed. |
FrameQ_E_INVALIDARG | Poiinter to Handle passed is null. |
FrameQ_E_INVALIDARG | Handle passed is null. |
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.
openParams | Pointer to implementation specific open params. |
handlePtr | Return parameter.Instance opened in given mode. |
FrameQ_S_SUCCESS | open successful. |
FrameQ_E_INVALIDARG | Invalid parameter specified. |
FrameQ_E_INVALIDSTATE | Module is not initialized. |
FrameQ_E_MEMORY | Memory_alloc failed. |
FrameQ_E_ALLOC_MEMORY | Memory_alloc failed. |
FrameQ_E_FRAMEQBUFMGROPEN | FrameQBufMge instance open failed. |
FrameQ_E_OPEN_GATEMP | GateMP open failed. |
FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPEN | ClientNotifyMgr open failed. |
FrameQ_E_LISTMPOPEN | Internal ListMP instance open failed. |
FrameQ_E_NOTFOUND | Instance not found in FrameQ Nameserver. |
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.
openParams | Pointer to implementation specific open params. |
handlePtr | Return parameter.Instance opened in given mode. |
FrameQ_S_SUCCESS | open successful. |
FrameQ_E_INVALIDARG | Invalid parameter specified. |
FrameQ_E_INVALIDSTATE | Module is not initialized. |
FrameQ_E_MEMORY | Memory_alloc failed. |
FrameQ_E_ALLOC_MEMORY | Memory_alloc failed. |
FrameQ_E_FRAMEQBUFMGROPEN | FrameQBufMge instance open failed. |
FrameQ_E_OPEN_GATEMP | GateMP open failed. |
FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPEN | ClientNotifyMgr open failed. |
FrameQ_E_LISTMPOPEN | Internal ListMP instance open failed. |
FrameQ_E_NOTFOUND | Instance not found in FrameQ Nameserver. |
Int32 FrameQ_close | ( | FrameQ_Handle * | pHandle ) |
Function to close the opened FrameQ instance.
This function closes FrameQ instance that is opened.
pHandle | Pointer to the opened frameQ instance handle. |
FrameQ_S_SUCCESS | Close successful. |
FrameQ_E_FAIL | Close failed. |
FrameQ_E_INVALIDARG | Poiinter to Handle passed is null. |
FrameQ_E_INVALIDARG | Handle passed is null. |
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.
handle | FrameQ writer handle. |
framePtr | Location to receive the allocated frame. |
FrameQ_S_SUCCESS | Successfully allocated frame. |
FrameQ_E_FAIL | Internal FrameQBufMgr_alloc failed. |
FrameQ_E_INVALIDARG | framePtr paased is null. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not allocate frames. Only writer can allocate frames. |
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.
handle | FrameQ writer handle. |
framePtr | Array to receive pointers to allocated frames. |
freeQId | Array of free frame pool nos of the plugged in FrameQBufMgrfrom from which this API needs to allocate frames actual size of that is allocated. |
numFrames | Number of frames that needs to be allocated. |
FrameQ_S_SUCCESS | Successfully allocated frames. |
FrameQ_E_FAIL | Internal FrameQBufMgr_allocv failed. |
FrameQ_E_INVALIDARG | framePtr passed is null. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDARG | freeQId passed is null. |
FrameQ_E_INVALIDARG | numFrames passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not allocate frames. Only writer can allocate frames. Only writer can allocate frames. |
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.
handle | Opened FrameQ instance handle. |
frame | Frame to be freed. |
FrameQ_S_SUCCESS | Successfully freed frame. |
FrameQ_E_FAIL | Internal FrameQBufMgr_free failed. |
FrameQ_E_INVALIDARG | frame passed is null. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not free frames. Only writer or reader can free frames. |
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.
handle | Opened FrameQ instance handle. |
framePtr | Array of frames to be freed. |
numFrames | Number of Frames to be freed. |
FrameQ_S_SUCCESS | Successfully freed frames. |
FrameQ_E_FAIL | Internal FrameQBufMgr_freev failed. |
FrameQ_E_INVALIDARG | frame passed is null. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not free frames. Only writer or reader can free frames. |
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.
handle | Opened FrameQ instance handle. |
frame | Frame to be inserted. |
FrameQ_S_SUCCESS | Successfully freed frames. |
FrameQ_E_FAIL | Failed to put frame. |
FrameQ_E_INVALIDARG | frame passed is null. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not free frames. Only writer or reader can put frames. |
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.
handle | Instance handle. |
framePtr | Array of frames to be inserted. |
filledQueueId | Array of filled queues of reader. |
numFrames | Number of frames. |
FrameQ_S_SUCCESS | Successfully inserted frames. |
FrameQ_E_FAIL | Failed to put frames. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDARG | framePtr passed is null. |
FrameQ_E_INVALIDARG | filledQueueId passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not put frames. Only writer or reader can put frames. |
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.
handle | Instance handle. |
framePtr | Location to receive frame. |
FrameQ_S_SUCCESS | Successfully retrieved frame. |
FrameQ_E_FAIL | Failed to get frame. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDARG | framePtr passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not retrieve frame. Only reader client can retrieve frame. |
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.
handle | Instance handle. |
pframe | Location to receive frames the queues specified in filledQueueId array argument. |
filledQueueId | Array of queue ids from which frames. |
numFrames | Denotes 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. |
FrameQ_S_SUCCESS | Successfully retrieved frames. |
FrameQ_E_FAIL | Failed to get frames. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDARG | pframe passed is null. |
FrameQ_E_INVALIDARG | filledQueueId passed is null. |
FrameQ_E_INVALIDARG | numFrames passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not retrieve frames. Only reader client can retrieve frames. |
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.
handle | Instance handle. |
frame | frame to be duplicated. |
dupedFrame | Location to receive the duplicated frame. |
FrameQ_S_SUCCESS | Successfully retrieved frames. |
FrameQ_E_FAIL | Failed to get frames. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDARG | frame passed is null. |
FrameQ_E_INVALIDARG | dupedFrame passed is null. |
FrameQ_E_ACCESSDENIED | Provided handle can not dup frames. Only writer/reader client can dup frame. |
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.
handle | Instance handle. |
notifyParams | Pointer to notifyParams. |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDARG | notifyParams passed is null. |
FrameQ_E_INVALIDSTATE | Module is not initialized. |
FrameQ_E_FAIL | Failed to register notification. |
Int32 FrameQ_unregisterNotifier | ( | FrameQ_Handle | handle ) |
Function to un register call back function.
handle | Reader/writer client Handle. |
FrameQ_S_SUCCESS | Successfully duped frame. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDARG | notifyParams passed is null. |
FrameQ_E_INVALIDSTATE | Module is not initialized. |
FrameQ_E_FAIL | Failed to register notification. |
Int32 FrameQ_sendNotify | ( | FrameQ_Handle | handle, |
UInt16 | msg | ||
) |
Function to send forced notification to the reader clients.
handle | writer client Handle. |
msg | payload that needs to be send to reader. |
FrameQ_S_SUCCESS | Successfully sent notification. |
FrameQ_E_INVALIDARG | handle passed is null. |
FrameQ_E_INVALIDSTATE | Module is not initialized. |
FrameQ_E_FAIL | Failed to send notification. |
FrameQ_E_ACCESSDENIED | handle is not a writer handle.can not send notification. |
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.
handle | Reader client Handle. |
numFrames | Location to recieve the number of frames. |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_FAIL | API failed. |
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).
handle | Writer/Reader client handle. |
numFrames | Location to recieve the number of frames. |
filledQId | Array of filled queues. |
numFilledQids | Number of queues specified in filledQId array. |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_FAIL | API failed. |
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.
handle | Instance handle. |
numFreeFrames | out parameter that denotes the number of free frames available |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_FAIL | API failed. |
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.
handle | Instance handle. |
numFreeFrames | out parameter that denotes the number of free frames available |
freeQId | Array of free queues. |
numFreeQids | Number of queues specified in freeQId array. |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_FAIL | API failed. |
Int32 FrameQ_control | ( | FrameQ_Handle | handle, |
Int32 | cmd, | ||
Ptr | arg | ||
) |
Provides a hook to perform implementation dependent operation.
handle | Instance handle. |
cmd | Command to perform. |
arg | void * argument. |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_FAIL | API failed. |
Ptr FrameQ_getExtendedHeaderPtr | ( | FrameQ_Frame | frame ) |
API to get the pointer to the extended header.
frame | pointer to frame |
pointer | Pointer to extended header pointer in frame header. |
UInt32 FrameQ_getNumFrameBuffers | ( | FrameQ_Frame | frame ) |
Determine the number of frame buffers in a frame.
frame | pointer to frame |
number | of frame buffers. |
Ptr FrameQ_getFrameBuffer | ( | FrameQ_Frame | frame, |
UInt32 | frameBufNum | ||
) |
Function to get the framebuffer.
frame | pointer to frame |
frameBufNum | frame buffer index in the given frame |
Pointer | to frame buffer. |
UInt32 FrameQ_getFrameBufSize | ( | FrameQ_Frame | frame, |
UInt32 | frameBufNum | ||
) |
Determine the size of frame buffer.
frame | pointer to frame |
frameBufNum | frame buffer index in the given frame |
size | frame buffer size. |
UInt32 FrameQ_getFrameBufValidSize | ( | FrameQ_Frame | frame, |
UInt32 | frameBufNum | ||
) |
Function to get valid data size of a frame buffer.
frame | pointer to frame |
frameBufNum | frame buffer index in the given frame |
size | valid size of the frame buffer. |
UInt32 FrameQ_getFrameBufDataStartOffset | ( | FrameQ_Frame | frame, |
UInt32 | frameBufNum | ||
) |
Function to get the valid data start offset in framebuffer identified by frameBufNum in a given frame.
frame | pointer to frame |
frameBufNum | frame buffer index in the given frame |
offset | valid data offset in the frame buffer. |
Int32 FrameQ_setFrameBufValidSize | ( | FrameQ_Frame | frame, |
UInt32 | frameBufNum, | ||
UInt32 | validDataSize | ||
) |
Function to set the valid data size of a framebuffer identified by frameBufNum in given frame.
frame | pointer to frame |
frameBufNum | frame buffer index in the given frame |
validDataSize | size of the valid data |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_FAIL | API 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.
frame | pointer to frame |
frameBufNum | frame buffer index in the given frame |
dataStartOffset | valid data startoffset that needs to set for the frame buffer. |
FrameQ_S_SUCCESS | Operation successful. |
FrameQ_E_FAIL | API failed. |
Void FrameQ_getConfig | ( | FrameQ_Config * | cfg ) |
Get the default configuration for the FrameQ module.
This function can be called by the application to get their configuration parameter to FrameQ_setup filled in by the FrameQ 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.
cfg | Pointer to the FrameQ module configuration structure in which the default config is to be returned. |
Int32 FrameQ_setup | ( | FrameQ_Config * | cfg ) |
Setup the FrameQ module.
This function sets up the FrameQ 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 FrameQ_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 FrameQ_setup with NULL parameters. The default parameters would get automatically used.
cfg | Optional FrameQ module configuration. If provided as NULL, default configuration is used. |