visa.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2010, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00033 /*
00034  *  ======== visa.h ========
00035  */
00060 #ifndef ti_sdo_ce_VISA_
00061 #define ti_sdo_ce_VISA_
00062 
00063 #include <stddef.h>     /* for size_t */
00064 
00065 #include <ti/sdo/ce/node/node.h>
00066 #include <ti/xdais/ialg.h>
00067 #include <ti/sdo/ce/Engine.h>
00068 
00069 #ifdef __cplusplus
00070 extern "C" {
00071 #endif
00072 
00077 typedef Int VISA_Status;
00078 
00083 #define VISA_EOK        0
00084 
00089 #define VISA_ERUNTIME   -1
00090 
00095 #define VISA_EFAIL     -2
00096 
00101 #define VISA_ETIMEOUT  -100
00102 
00107 #define VISA_FOREVER Engine_FOREVER
00108 
00112 typedef struct VISA_Obj *VISA_Handle;
00113 
00121 typedef struct VISA_MsgHeader {
00122     NODE_MsgHeader  header;
00123     Int             cmd;        
00124     VISA_Status     status;     
00125 } VISA_MsgHeader;
00126 
00127 /*
00128  *  ======== VISA_Msg ========
00129  */
00130 typedef VISA_MsgHeader *VISA_Msg;
00131 
00132 /*
00133  *  ======== VISA_allocMsg ========
00134  */
00149 extern VISA_Msg VISA_allocMsg(VISA_Handle visa);
00150 
00151 /*
00152  *  ======== VISA_call ========
00153  */
00171 extern VISA_Status VISA_call(VISA_Handle visa, VISA_Msg *msg);
00172 
00173 /*
00174  *  ======== VISA_callAsync ========
00175  */
00194 extern VISA_Status VISA_callAsync(VISA_Handle visa, VISA_Msg *msg);
00195 
00196 /*
00197  *  ======== VISA_wait ========
00198  */
00219 extern VISA_Status VISA_wait(VISA_Handle visa, VISA_Msg *msg, UInt timeout);
00220 
00221 /*
00222  *  ======== VISA_freeMsg ========
00223  */
00240 extern Void VISA_freeMsg(VISA_Handle visa, VISA_Msg msg);
00241 
00242 
00245 
00246 /*
00247  *  ======== VISA_create ========
00248  */
00280 extern VISA_Handle VISA_create(Engine_Handle engine, String name,
00281     IALG_Params *params, size_t msgSize, String type);
00282 
00283 /*
00284  *  ======== VISA_delete ========
00285  */
00293 extern Void VISA_delete(VISA_Handle visa);
00294 
00295 
00296 /*
00297  *  ======== VISA_create2 ========
00298  */
00337 extern VISA_Handle VISA_create2(Engine_Handle engine, String name,
00338     IALG_Params *params, Int paramsSize, size_t msgSize, String type);
00339 
00340 
00341 /*
00342  *  ======== VISA_enter ========
00343  */
00356 extern Void VISA_enter(VISA_Handle visa);
00357 
00358 /*
00359  *  ======== VISA_exit ========
00360  */
00371 extern Void VISA_exit(VISA_Handle visa);
00372 
00373 /*
00374  *  ======== VISA_getAlgHandle ========
00375  */
00389 extern Ptr VISA_getAlgHandle(VISA_Handle visa);
00390 
00391 /*
00392  *  ======== VISA_getAlgorithmHandle ========
00393  */
00407 extern Ptr VISA_getAlgorithmHandle(VISA_Handle visa);
00408 
00409 /*
00410  *  ======== VISA_getAlgFxns ========
00411  */
00433 extern IALG_Fxns *VISA_getAlgFxns(VISA_Handle visa);
00434   /* ingroup */
00436 
00437 /*
00438  *  ======== VISA_getAlgMemRecs ========
00439  */
00470 extern VISA_Status VISA_getAlgMemRecs(VISA_Handle visa, IALG_MemRec *memTab,
00471         Int size, Int *numRecs);
00472 
00473 /*
00474  *  ======== VISA_getAlgNumRecs ========
00475  */
00503 extern VISA_Status VISA_getAlgNumRecs(VISA_Handle visa, Int *numRecs);
00504 
00505 
00506 /*
00507  *  ======== VISA_getContext ========
00508  */
00527 extern Void VISA_getContext(VISA_Handle visa, UInt32 * pContext);
00528 
00529 /*
00530  *  ======== VISA_getCodecClassConfig ========
00531  */
00548 extern Ptr VISA_getCodecClassConfig(VISA_Handle visa);
00549 
00550 
00551 /*
00552  *  ======== VISA_getMaxMsgSize ========
00553  */
00566 extern UInt VISA_getMaxMsgSize(VISA_Handle visa);
00567 
00568 
00569 /*
00570  *  ======== VISA_isChecked ========
00571  */
00585 static inline Bool VISA_isChecked(Void)
00586 {
00587     extern Bool VISA_checked;  /* generated by Settings.xdt based 'checked' */
00588 
00589     return (VISA_checked);
00590 }
00591 
00592 /*
00593  *  ======== VISA_setContext ========
00594  */
00611 extern Void VISA_setContext(VISA_Handle visa, UInt32 context);
00612 
00613 /*
00614  *  ======== VISA_isLocal ========
00615  */
00626 extern Bool VISA_isLocal(VISA_Handle visa);
00627 
00628 #ifdef __cplusplus
00629 }
00630 #endif
00631 
00632 #endif
00633 /*
00634  *  @(#) ti.sdo.ce; 1, 0, 6,432; 12-2-2010 21:19:09; /db/atree/library/trees/ce/ce-r11x/src/ xlibrary
00635 
00636  */
00637 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated