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 
00117 #define VISA_MODNAME "ti.sdo.ce.VISA"
00118 
00122 typedef struct VISA_Obj *VISA_Handle;
00123 
00131 typedef struct VISA_MsgHeader {
00132     NODE_MsgHeader  header;
00133     Int             cmd;        
00134     VISA_Status     status;     
00135 } VISA_MsgHeader;
00136 
00137 /*
00138  *  ======== VISA_Msg ========
00139  */
00140 typedef VISA_MsgHeader *VISA_Msg;
00141 
00142 /*
00143  *  ======== VISA_allocMsg ========
00144  */
00159 extern VISA_Msg VISA_allocMsg(VISA_Handle visa);
00160 
00161 /*
00162  *  ======== VISA_call ========
00163  */
00181 extern VISA_Status VISA_call(VISA_Handle visa, VISA_Msg *msg);
00182 
00183 /*
00184  *  ======== VISA_callAsync ========
00185  */
00204 extern VISA_Status VISA_callAsync(VISA_Handle visa, VISA_Msg *msg);
00205 
00206 /*
00207  *  ======== VISA_wait ========
00208  */
00229 extern VISA_Status VISA_wait(VISA_Handle visa, VISA_Msg *msg, UInt timeout);
00230 
00231 /*
00232  *  ======== VISA_freeMsg ========
00233  */
00250 extern Void VISA_freeMsg(VISA_Handle visa, VISA_Msg msg);
00251 
00252 
00255 
00256 /*
00257  *  ======== VISA_create ========
00258  */
00290 extern VISA_Handle VISA_create(Engine_Handle engine, String name,
00291     IALG_Params *params, size_t msgSize, String type);
00292 
00293 /*
00294  *  ======== VISA_delete ========
00295  */
00303 extern Void VISA_delete(VISA_Handle visa);
00304 
00305 
00306 /*
00307  *  ======== VISA_create2 ========
00308  */
00347 extern VISA_Handle VISA_create2(Engine_Handle engine, String name,
00348     IALG_Params *params, Int paramsSize, size_t msgSize, String type);
00349 
00350 
00351 /*
00352  *  ======== VISA_enter ========
00353  */
00366 extern Void VISA_enter(VISA_Handle visa);
00367 
00368 /*
00369  *  ======== VISA_exit ========
00370  */
00381 extern Void VISA_exit(VISA_Handle visa);
00382 
00383 /*
00384  *  ======== VISA_getAlgHandle ========
00385  */
00399 extern Ptr VISA_getAlgHandle(VISA_Handle visa);
00400 
00401 /*
00402  *  ======== VISA_getAlgorithmHandle ========
00403  */
00417 extern Ptr VISA_getAlgorithmHandle(VISA_Handle visa);
00418 
00419 /*
00420  *  ======== VISA_getAlgFxns ========
00421  */
00443 extern IALG_Fxns *VISA_getAlgFxns(VISA_Handle visa);
00444   /* ingroup */
00446 
00447 /*
00448  *  ======== VISA_getAlgMemRecs ========
00449  */
00480 extern VISA_Status VISA_getAlgMemRecs(VISA_Handle visa, IALG_MemRec *memTab,
00481         Int size, Int *numRecs);
00482 
00483 /*
00484  *  ======== VISA_getAlgNumRecs ========
00485  */
00513 extern VISA_Status VISA_getAlgNumRecs(VISA_Handle visa, Int *numRecs);
00514 
00515 
00516 /*
00517  *  ======== VISA_getContext ========
00518  */
00537 extern Void VISA_getContext(VISA_Handle visa, UInt32 * pContext);
00538 
00539 /*
00540  *  ======== VISA_getCodecClassConfig ========
00541  */
00558 extern Ptr VISA_getCodecClassConfig(VISA_Handle visa);
00559 
00560 
00561 /*
00562  *  ======== VISA_getMaxMsgSize ========
00563  */
00576 extern UInt VISA_getMaxMsgSize(VISA_Handle visa);
00577 
00578 
00579 /*
00580  *  ======== VISA_isChecked ========
00581  */
00595 static inline Bool VISA_isChecked(Void)
00596 {
00597     extern Bool VISA_checked;  /* generated by Settings.xdt based 'checked' */
00598 
00599     return (VISA_checked);
00600 }
00601 
00602 /*
00603  *  ======== VISA_setContext ========
00604  */
00621 extern Void VISA_setContext(VISA_Handle visa, UInt32 context);
00622 
00623 /*
00624  *  ======== VISA_isLocal ========
00625  */
00636 extern Bool VISA_isLocal(VISA_Handle visa);
00637 
00638 #ifdef __cplusplus
00639 }
00640 #endif
00641 
00642 #endif
00643 /*
00644  *  @(#) ti.sdo.ce; 1, 0, 6,429; 11-3-2010 22:18:35; /db/atree/library/trees/ce/ce-q16x/src/ xlibrary
00645 
00646  */
00647 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2010, Texas Instruments Incorporated