module ti.ipc.family.omapl138.VirtQueue
C synopsis target-domain sourced in ti/ipc/family/omapl138/VirtQueue.xdc
#include <ti/ipc/family/omapl138/VirtQueue.h>
Functions
Int 
Int 
VirtQueue_addUsedBuf// (VirtQueue_Handle handle, Int16 token, Int len);
Void
Void
Void
Int16 
VirtQueue_getAvailBuf// (VirtQueue_Handle handle, Void **buf, Int *len);
UInt16 
Void *
Bool 
Bool 
Void 
Void
Void 
Functions common to all target instances
Functions common to all target modules
Typedefs
typedef struct
typedef struct
typedef struct
Constants
extern const UInt 
extern const UInt 
extern const UInt 
extern const UInt 
 
 
config VirtQueue_PAGE_SIZE  // module-wide
C synopsis target-domain
extern const UInt VirtQueue_PAGE_SIZE;
 
 
config VirtQueue_RP_MSG_NUM_BUFS  // module-wide
C synopsis target-domain
extern const UInt VirtQueue_RP_MSG_NUM_BUFS;
 
 
config VirtQueue_RP_MSG_VRING_ALIGN  // module-wide
C synopsis target-domain
extern const UInt VirtQueue_RP_MSG_VRING_ALIGN;
 
 
config VirtQueue_VQ1_SIZE  // module-wide
C synopsis target-domain
extern const UInt VirtQueue_VQ1_SIZE;
 
 
VirtQueue_startup()  // module-wide

Plug interrupts, and if host, initialize vring memory and send startup sequence events to slave

C synopsis target-domain
Void VirtQueue_startup(UInt16 remoteProcId, Bool isHost);
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId VirtQueue_Module_id();
// Get this module's unique id
 
Bool VirtQueue_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle VirtQueue_Module_heap();
// The heap from which this module allocates memory
 
Bool VirtQueue_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 VirtQueue_Module_getMask();
// Returns the diagnostics mask for this module
 
Void VirtQueue_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct VirtQueue_Object VirtQueue_Object;
// Opaque internal representation of an instance object
 
typedef VirtQueue_Object *VirtQueue_Handle;
// Client reference to an instance object
 
typedef struct VirtQueue_Struct VirtQueue_Struct;
// Opaque client structure large enough to hold an instance object
 
VirtQueue_Handle VirtQueue_handle(VirtQueue_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
VirtQueue_Struct *VirtQueue_struct(VirtQueue_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct VirtQueue_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
    Fxn callback;
    // 
    Int vqId;
    // 
} VirtQueue_Params;
 
Void VirtQueue_Params_init(VirtQueue_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
 
config VirtQueue_Params.callback  // instance
C synopsis target-domain
struct VirtQueue_Params {
      ...
    Fxn callback;
 
 
config VirtQueue_Params.vqId  // instance
C synopsis target-domain
struct VirtQueue_Params {
      ...
    Int vqId;
 
Runtime Instance Creation

C synopsis target-domain
VirtQueue_Handle VirtQueue_create(UInt16 remoteProcId, const VirtQueue_Params *params, Error_Block *eb);
// Allocate and initialize a new instance object and return its handle
 
Void VirtQueue_construct(VirtQueue_Struct *structP, UInt16 remoteProcId, const VirtQueue_Params *params, Error_Block *eb);
// Initialize a new instance object inside the provided structure
ARGUMENTS
— [in] remoteProcId Remote processor ID associated with this VirtQueue.
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
DETAILS
Maps to Instance_init function
BRIEF
Initialize at runtime the VirtQueue
RETURNS
Returns a handle to a new initialized VirtQueue.
Instance Deletion

C synopsis target-domain
Void VirtQueue_delete(VirtQueue_Handle *handleP);
// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
 
Void VirtQueue_destruct(VirtQueue_Struct *structP);
// Finalize the instance object inside the provided structure
 
VirtQueue_addAvailBuf()  // instance
C synopsis target-domain
Int VirtQueue_addAvailBuf(VirtQueue_Handle handle, Void *buf);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue. [in] buf the buffer to be processed by the slave.
BRIEF
Add available buffer to virtqueue's available buffer list. Only used by Host.
RETURN
Remaining capacity of queue or a negative error.
SA
VirtQueue_getUsedBuf
 
VirtQueue_addUsedBuf()  // instance
C synopsis target-domain
Int VirtQueue_addUsedBuf(VirtQueue_Handle handle, Int16 token, Int len);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue. [in] token token of the buffer added to vring used list. [in] len length of the message being added.
BRIEF
Add used buffer to virtqueue's used buffer list. Only used by Slave.
RETURN
Remaining capacity of queue or a negative error.
SA
VirtQueue_getAvailBuf
 
VirtQueue_getAvailBuf()  // instance
C synopsis target-domain
Int16 VirtQueue_getAvailBuf(VirtQueue_Handle handle, Void **buf, Int *len);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue. [out] buf Pointer to location of available buffer; [out] len Length of the available buffer message.
BRIEF
Get the next available buffer. Only used by Slave.
RETURN
Returns a token used to identify the available buffer, to be passed back into VirtQueue_addUsedBuf(); token is negative if failure to find an available buffer.
SA
VirtQueue_addUsedBuf
 
VirtQueue_getId()  // instance
C synopsis target-domain
UInt16 VirtQueue_getId(VirtQueue_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue.
DETAILS
Returns VirtQueue instance's queue ID.
BRIEF
VirtQueue instance returns queue ID
 
VirtQueue_getSwiHandle()  // instance
C synopsis target-domain
Swi_Handle VirtQueue_getSwiHandle(VirtQueue_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue.
DETAILS
Returns VirtQueue instance Swi handle
BRIEF
VirtQueue instance returns Swi handle
 
VirtQueue_getUsedBuf()  // instance
C synopsis target-domain
Void *VirtQueue_getUsedBuf(VirtQueue_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue.
BRIEF
Get the next used buffer. Only used by Host.
RETURN
Returns NULL or the processed buffer.
SA
VirtQueue_addAvailBuf
 
VirtQueue_isHost()  // instance
C synopsis target-domain
Bool VirtQueue_isHost(VirtQueue_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue.
DETAILS
Returns if this VirtQueue instance belongs to a host
BRIEF
VirtQueue instance returns host status
 
VirtQueue_isSlave()  // instance
C synopsis target-domain
Bool VirtQueue_isSlave(VirtQueue_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue.
DETAILS
Returns if this VirtQueue instance belongs to a slave
BRIEF
VirtQueue instance returns slave status
 
VirtQueue_kick()  // instance
C synopsis target-domain
Void VirtQueue_kick(VirtQueue_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created VirtQueue instance object
— [in] vq the VirtQueue.
DETAILS
After one or more add_buf calls, invoke this to kick the other side.
BRIEF
Notify other processor of new buffers in the queue.
SA
VirtQueue_addBuf
Instance Built-Ins

C synopsis target-domain
Int VirtQueue_Object_count();
// The number of statically-created instance objects
 
VirtQueue_Handle VirtQueue_Object_get(VirtQueue_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
VirtQueue_Handle VirtQueue_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
VirtQueue_Handle VirtQueue_Object_next(VirtQueue_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle VirtQueue_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *VirtQueue_Handle_label(VirtQueue_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String VirtQueue_Handle_name(VirtQueue_Handle handle);
// The name of this instance object
 
Configuration settings sourced in ti/ipc/family/omapl138/VirtQueue.xdc
var VirtQueue = xdc.useModule('ti.ipc.family.omapl138.VirtQueue');
module-wide config parameters
    VirtQueue.PAGE_SIZE//  = UInt 4096;
    VirtQueue.RP_MSG_VRING_ALIGN//  = UInt 4096;
    VirtQueue.VQ1_SIZE//  = UInt 256;
 
per-instance config parameters
    var params = new VirtQueue.Params// Instance config-params object;
        params.callback//  = Fxn null;
        params.vqId//  = Int 0;
per-instance creation
    var inst = VirtQueue.create// Create an instance-object(UInt16 remoteProcId, params);
 
 
config VirtQueue.PAGE_SIZE  // module-wide
Configuration settings
VirtQueue.PAGE_SIZE = UInt 4096;
 
C SYNOPSIS
 
config VirtQueue.RP_MSG_NUM_BUFS  // module-wide
Configuration settings
VirtQueue.RP_MSG_NUM_BUFS = UInt VirtQueue.VQ0_SIZE;
 
C SYNOPSIS
 
config VirtQueue.RP_MSG_VRING_ALIGN  // module-wide
Configuration settings
VirtQueue.RP_MSG_VRING_ALIGN = UInt 4096;
 
C SYNOPSIS
 
config VirtQueue.VQ1_SIZE  // module-wide
Configuration settings
VirtQueue.VQ1_SIZE = UInt 256;
 
C SYNOPSIS
 
metaonly config VirtQueue.common$  // module-wide

Common module configuration parameters

Configuration settings
VirtQueue.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
Instance Config Parameters

Configuration settings
var params = new VirtQueue.Params;
// Instance config-params object
    params.callback = Fxn null;
    // 
    params.vqId = Int 0;
    // 
 
config VirtQueue.Params.callback  // instance
Configuration settings
var params = new VirtQueue.Params;
  ...
params.callback = Fxn null;
 
C SYNOPSIS
 
config VirtQueue.Params.vqId  // instance
Configuration settings
var params = new VirtQueue.Params;
  ...
params.vqId = Int 0;
 
C SYNOPSIS
Static Instance Creation

Configuration settings
var params = new VirtQueue.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = VirtQueue.create(UInt16 remoteProcId, params);
// Create an instance-object
ARGUMENTS
— [in] remoteProcId Remote processor ID associated with this VirtQueue.
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
DETAILS
Maps to Instance_init function
BRIEF
Initialize at runtime the VirtQueue
RETURNS
Returns a handle to a new initialized VirtQueue.
generated on Fri, 21 Aug 2015 19:35:28 GMT