visa.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2012, 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_EUNSUPPORTED  -3
00102 
00107 #define VISA_ETIMEOUT  -100
00108 
00113 #define VISA_FOREVER Engine_FOREVER
00114 
00123 #define VISA_MODNAME "ti.sdo.ce.VISA"
00124 
00128 typedef struct VISA_Obj *VISA_Handle;
00129 
00137 typedef struct VISA_MsgHeader {
00138     NODE_MsgHeader  header;
00139     Int             cmd;        
00140     VISA_Status     status;     
00141 } VISA_MsgHeader;
00142 
00143 /*
00144  *  ======== VISA_Msg ========
00145  */
00146 typedef VISA_MsgHeader *VISA_Msg;
00147 
00148 /*
00149  *  ======== VISA_allocMsg ========
00150  */
00165 extern VISA_Msg VISA_allocMsg(VISA_Handle visa);
00166 
00167 /*
00168  *  ======== VISA_call ========
00169  */
00187 extern VISA_Status VISA_call(VISA_Handle visa, VISA_Msg *msg);
00188 
00189 /*
00190  *  ======== VISA_callAsync ========
00191  */
00210 extern VISA_Status VISA_callAsync(VISA_Handle visa, VISA_Msg *msg);
00211 
00212 /*
00213  *  ======== VISA_wait ========
00214  */
00235 extern VISA_Status VISA_wait(VISA_Handle visa, VISA_Msg *msg, UInt timeout);
00236 
00237 /*
00238  *  ======== VISA_freeMsg ========
00239  */
00256 extern Void VISA_freeMsg(VISA_Handle visa, VISA_Msg msg);
00257 
00258 
00261 
00262 /*
00263  *  ======== VISA_create ========
00264  */
00296 extern VISA_Handle VISA_create(Engine_Handle engine, String name,
00297     IALG_Params *params, size_t msgSize, String type);
00298 
00299 /*
00300  *  ======== VISA_delete ========
00301  */
00309 extern Void VISA_delete(VISA_Handle visa);
00310 
00311 
00312 /*
00313  *  ======== VISA_create2 ========
00314  */
00353 extern VISA_Handle VISA_create2(Engine_Handle engine, String name,
00354     IALG_Params *params, Int paramsSize, size_t msgSize, String type);
00355 
00356 
00357 /*
00358  *  ======== VISA_enter ========
00359  */
00372 extern Void VISA_enter(VISA_Handle visa);
00373 
00374 /*
00375  *  ======== VISA_exit ========
00376  */
00387 extern Void VISA_exit(VISA_Handle visa);
00388 
00389 /*
00390  *  ======== VISA_getAlgHandle ========
00391  */
00405 extern Ptr VISA_getAlgHandle(VISA_Handle visa);
00406 
00407 /*
00408  *  ======== VISA_getAlgorithmHandle ========
00409  */
00423 extern Ptr VISA_getAlgorithmHandle(VISA_Handle visa);
00424 
00425 /*
00426  *  ======== VISA_getAlgFxns ========
00427  */
00449 extern IALG_Fxns *VISA_getAlgFxns(VISA_Handle visa);
00450   /* ingroup */
00452 
00453 /*
00454  *  ======== VISA_getAlgMemRecs ========
00455  */
00486 extern VISA_Status VISA_getAlgMemRecs(VISA_Handle visa, IALG_MemRec *memTab,
00487         Int size, Int *numRecs);
00488 
00489 /*
00490  *  ======== VISA_getAlgNumRecs ========
00491  */
00519 extern VISA_Status VISA_getAlgNumRecs(VISA_Handle visa, Int *numRecs);
00520 
00521 
00522 /*
00523  *  ======== VISA_getContext ========
00524  */
00543 extern Void VISA_getContext(VISA_Handle visa, UInt32 * pContext);
00544 
00545 /*
00546  *  ======== VISA_getCodecClassConfig ========
00547  */
00564 extern Ptr VISA_getCodecClassConfig(VISA_Handle visa);
00565 
00566 
00567 /*
00568  *  ======== VISA_getMaxMsgSize ========
00569  */
00582 extern UInt VISA_getMaxMsgSize(VISA_Handle visa);
00583 
00584 /*
00585  *  ======== _VISA_init ========
00586  */
00596 extern Void _VISA_init(Void);
00597 
00598 /*
00599  *  ======== _VISA_exit ========
00600  */
00610 extern Void _VISA_exit(Void);
00611 
00612 
00613 /*
00614  * Semi-internal variable generatd by Settings.xdt - used in the following
00615  * inline
00616  */
00617 extern Bool VISA_checked;
00618 
00619 /*
00620  *  ======== VISA_isChecked ========
00621  */
00635 static inline Bool VISA_isChecked(Void)
00636 {
00637     return (VISA_checked);
00638 }
00639 
00640 /*
00641  *  ======== VISA_setContext ========
00642  */
00659 extern Void VISA_setContext(VISA_Handle visa, UInt32 context);
00660 
00661 /*
00662  *  ======== VISA_isLocal ========
00663  */
00674 extern Bool VISA_isLocal(VISA_Handle visa);
00675 
00676 #ifdef __cplusplus
00677 }
00678 #endif
00679 
00680 #endif
00681 /*
00682  *  @(#) ti.sdo.ce; 1, 0, 6,1; 1-17-2012 23:09:33; /db/atree/library/trees/ce/ce-t03/src/ xlibrary
00683 
00684  */
00685 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated