亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rs.c.bak

?? CVI例程
?? BAK
?? 第 1 頁 / 共 4 頁
字號:
#include <ansi_c.h>
/***************************************************************************** 
 *  Copyright 1998 National Instruments Corporation.  All Rights Reserved.   * 
 *****************************************************************************/

    /*=CHANGE:===============================================================*
                INSTRUCTIONS TO THE INSTRUMENT DRIVER DEVELOPER
                         READ THESE INSTRUCTIONS FIRST!
     *=======================================================================*
                                                                             
        Congratulations!  You have successfully created all the files needed
        for your instrument driver - *.c,  *.h, *.fp, and *.sub.  These     
        files give you a framework to build your complete instrument driver 
        with the following features:                                    
            - IVI compliance                                             
            - VXIplug&play compliance                                    
            - Attribute model                                           
            - State caching                                             
            - Simulation                                                
            - Multithread safety                                         
                                                                        
        Before you can begin using this driver, you must perform the following 
        manual changes.                                 
                                                                        
        - If you are developing a driver for a register-based device, 
          remove the function panels for the RS_WriteInstrData 
          and RS_ReadInstrData functions.  These functions
          are for use with message-based instruments.                                       
                                                                            
        - Device-specific changes are marked with the comment "CHANGE".      
          Search for all occurrences of the word "CHANGE" and make the changes 
          for your specific instrument.  Delete the comments after you complete 
          the changes.
          
        - The IVI wizard might not properly align the code it generates.
          Review the resulting *.h and *.c files and reformat them as necessary.
          
        - Read the help text for the functions and attributes to understand
          the functionality you must implement in this driver.  The easiest
          way to view the help text is by using the RS.fp 
          function panels in "operate" mode.  You can view the help text for
          the attributes in any of the RS_GetAttribute 
          function panels.

        - Many of the functions contain extensive code examples within 
          comment blocks.  These code examples contain embedded comments.
          The only way to embed comments is by using double slashes (//).  
          Some C compilers do not accept double slashes.  If you are developing 
          this driver for general use, convert the double slashes to 
          traditional C comment markers.
        
        - Edit the Function Panel help.  Pay close attention to the default
          values and valid ranges for each parameter.  If you change the 
          default value for a control, you also need to change the default
          value in the help for the control.  Also, search for the comment 
          "CHANGE" in the help text, and make the appropriate changes.
          
        - Edit the help for all attributes with the attribute editor.  Pay close
          attention to the valid range information.  The Set/Get/Check attribute
          function panels automatically display valid range information for 
          attributes that have range tables of type IVI_VAL_DISCRETE or 
          IVI_VAL_COERCED.  You must edit/create the valid range information 
          in the description of an attribute if any of the following conditions 
          is true:
            * The attribute does not have a range table.
            * The attribute has a range table of type IVI_VAL_RANGED.
            * The attribute uses multiple static range tables or a dynamic
              range table.
            
          Also, look for "CHANGE" comments in the help text, and make the 
          appropriate changes.
           
        - Verify that all values that the header file defines are valid for 
          your instrument.  Delete the values that your instrument does not 
          use.
            
        - Delete these instructions and save the modified program.         

     *============================================================END=CHANGE=*/

/*****************************************************************************
 *  RS232 Instrument Driver                               
 *  LabWindows/CVI 5.0 Instrument Driver                                     
 *  Original Release: 01-8-14                                  
 *  By: ,                               
 *      PH.    Fax                               
 *                                                                           
 *  Modification History:                                                    
 *                                                                           
 *       01-8-14 - Instrument Driver Created.                  
 *                                                                           
 *****************************************************************************/

#include <string.h>
#include <stdio.h>  
#include <formatio.h>
#include "RS.h"

/*****************************************************************************
 *--------------------- Hidden Attribute Declarations -----------------------*
 *****************************************************************************/

#define RS_ATTR_OPC_TIMEOUT      (IVI_SPECIFIC_PRIVATE_ATTR_BASE + 1L)   /* ViInt32 */

/*****************************************************************************
 *---------------------------- Useful Macros --------------------------------*
 *****************************************************************************/

    /*- I/O buffer size -----------------------------------------------------*/
#define BUFFER_SIZE                             512L        

    /*- 488.2 Event Status Register (ESR) Bits ------------------------------*/
#define IEEE_488_2_QUERY_ERROR_BIT              0x04
#define IEEE_488_2_DEVICE_DEPENDENT_ERROR_BIT   0x08
#define IEEE_488_2_EXECUTION_ERROR_BIT          0x10
#define IEEE_488_2_COMMAND_ERROR_BIT            0x20

    /*- List of channels passed to the Ivi_BuildChannelTable function -------*/ 
#define CHANNEL_LIST                            "1"

static IviRangeTableEntry attrPressureRangeTableEntries[] =
	{
		{0.0, 50000.0, 0, "", 0},
		{IVI_RANGE_TABLE_LAST_ENTRY}
	};

static IviRangeTable attrPressureRangeTable =
	{
		IVI_VAL_RANGED,
        VI_TRUE,
        VI_TRUE,
        VI_NULL,
        attrPressureRangeTableEntries,
	};

static IviRangeTableEntry attrTempretureRangeTableEntries[] =
	{
		{-100.0, 150.0, 0, "", 0},
		{IVI_RANGE_TABLE_LAST_ENTRY}
	};

static IviRangeTable attrTempretureRangeTable =
	{
		IVI_VAL_RANGED,
        VI_TRUE,
        VI_TRUE,
        VI_NULL,
        attrTempretureRangeTableEntries,
	};

/*****************************************************************************
 *-------------- Utility Function Declarations (Non-Exported) ---------------*
 *****************************************************************************/
static ViStatus RS_InitAttributes (ViSession vi);
static ViStatus RS_DefaultInstrSetup (ViSession openInstrSession);
static ViStatus RS_CheckStatus (ViSession vi);
static ViStatus RS_WaitForOPC (ViSession vi, ViInt32 maxTime);

    /*- File I/O Utility Functions -*/
static ViStatus RS_ReadToFile (ViSession vi, ViConstString filename, 
                                     ViInt32 maxBytesToRead, ViInt32 fileAction, ViInt32 *totalBytesWritten);
static ViStatus RS_WriteFromFile (ViSession vi, ViConstString filename, 
                                        ViInt32 maxBytesToWrite, ViInt32 byteOffset, 
                                        ViInt32 *totalBytesWritten);

/*****************************************************************************
 *----------------- Callback Declarations (Non-Exported) --------------------*
 *****************************************************************************/

    /*- Global Session Callbacks --------------------------------------------*/
    
static ViStatus _VI_FUNC RS_CheckStatusCallback (ViSession vi, ViSession io);
static ViStatus _VI_FUNC RS_WaitForOPCCallback (ViSession vi, ViSession io);

    /*- Attribute callbacks -------------------------------------------------*/

static ViStatus _VI_FUNC RSAttrDriverRevision_ReadCallback (ViSession vi,
                                                                  ViSession io, 
                                                                  ViConstString channelName,
                                                                  ViAttr attributeId, 
                                                                  const ViConstString cacheValue);
static ViStatus _VI_FUNC RSAttrIdQueryResponse_ReadCallback (ViSession vi,
                                                                   ViSession io, 
                                                                   ViConstString channelName, 
                                                                   ViAttr attributeId, 
                                                                   const ViConstString cacheValue);


static ViStatus _VI_FUNC RSAttrPressure_ReadCallback (ViSession vi, ViSession io,
                                                      ViConstString channelName,
                                                      ViAttr attributeId,
                                                      ViReal64 *value);

static ViStatus _VI_FUNC RSAttrTempreture_ReadCallback (ViSession vi,
                                                        ViSession io,
                                                        ViConstString channelName,
                                                        ViAttr attributeId,
                                                        ViReal64 *value);



/*****************************************************************************
 *------------ User-Callable Functions (Exportable Functions) ---------------*
 *****************************************************************************/

/*****************************************************************************
 * Function: RS_init   
 * Purpose:  VXIplug&play required function.  Calls the   
 *           RS_InitWithOptions function.   
 *****************************************************************************/
ViStatus _VI_FUNC RS_init (ViRsrc resourceName, ViBoolean IDQuery,
                                 ViBoolean resetDevice, ViSession *newVi)
{   
    ViStatus    error = VI_SUCCESS;

    if (newVi == VI_NULL)
        {
        Ivi_SetErrorInfo (VI_NULL, VI_FALSE, IVI_ERROR_INVALID_PARAMETER, 
                          VI_ERROR_PARAMETER4, "Null address for Instrument Handle");
        checkErr( IVI_ERROR_INVALID_PARAMETER);
        }

    checkErr( RS_InitWithOptions (resourceName, IDQuery, resetDevice, 
                                        "", newVi));

Error:  
    return error;
}

/*****************************************************************************
 * Function: RS_InitWithOptions                                       
 * Purpose:  This function creates a new IVI session and calls the 
 *           IviInit function.                                     
 *****************************************************************************/
ViStatus _VI_FUNC RS_InitWithOptions (ViRsrc resourceName, ViBoolean IDQuery,
                                            ViBoolean resetDevice, ViString optionString, 
                                            ViSession *newVi)
{   
    ViStatus    error = VI_SUCCESS;
    ViSession   vi = VI_NULL;
    
    if (newVi == VI_NULL)
        {
        Ivi_SetErrorInfo (VI_NULL, VI_FALSE, IVI_ERROR_INVALID_PARAMETER, 
                          VI_ERROR_PARAMETER5, "Null address for Instrument Handle");
        checkErr( IVI_ERROR_INVALID_PARAMETER);
        }

    *newVi = VI_NULL;
    
        /* create a new interchangeable driver */
    checkErr( Ivi_SpecificDriverNew ("RS", optionString, &vi));  
    
        /* init the driver */
    checkErr( RS_IviInit (resourceName, IDQuery, resetDevice, vi)); 
    *newVi = vi;
    
Error:
    if (error < VI_SUCCESS) 
        Ivi_Dispose (vi);
        
    return error;
}

/*****************************************************************************
 * Function: RS_IviInit                                                       
 * Purpose:  This function is called by RS_InitWithOptions  
 *           or by an IVI class driver.  This function initializes the I/O 
 *           interface, optionally resets the device, optionally performs an
 *           ID query, and sends a default setup to the instrument.                
 *****************************************************************************/
ViStatus _VI_FUNC RS_IviInit (ViRsrc resourceName, ViBoolean IDQuery,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品影音先锋| 亚洲精品国产精华液| 亚洲男同性视频| 日韩 欧美一区二区三区| 成人午夜精品在线| 日韩欧美综合在线| 亚洲永久免费视频| 成人激情免费电影网址| 欧美一区二区久久久| 亚洲色图.com| 国产精品99久久不卡二区| 91精品在线免费| 一区二区三区中文在线| 欧美熟乱第一页| 最新中文字幕一区二区三区| 精品制服美女久久| 8x8x8国产精品| 一区二区在线免费观看| 不卡视频一二三| 国产精品美女久久久久久2018 | 亚洲色图在线看| 国产麻豆日韩欧美久久| 精品国产91亚洲一区二区三区婷婷| 亚洲一区二区精品视频| 色欧美片视频在线观看在线视频| 中文字幕免费一区| 成人一区二区三区在线观看| 国产日韩欧美a| 成人av一区二区三区| 国产欧美日韩亚州综合| 国产91在线观看| 国产精品日产欧美久久久久| 国产成人av一区二区三区在线| 欧美精品一区男女天堂| 国产一区二区女| 26uuu欧美| 粉嫩av一区二区三区在线播放 | 欧美日韩一区二区三区在线| 一区二区三区四区精品在线视频| 91免费国产视频网站| 自拍偷拍国产亚洲| 色悠悠久久综合| 亚洲成av人片在线| 日韩一区二区三| 国产乱码精品一区二区三区五月婷 | 一区二区三区中文字幕精品精品| 成人毛片视频在线观看| 亚洲美女精品一区| 国产精品久久网站| 91色porny| 日韩中文欧美在线| 26uuu亚洲| av在线不卡网| 日本不卡一区二区| 国产欧美一区二区精品性色 | 日韩av高清在线观看| 日韩一区二区在线免费观看| 久久99久久99精品免视看婷婷 | 在线观看欧美日本| 免费人成精品欧美精品| 国产日韩欧美综合一区| 99re这里都是精品| 日韩在线卡一卡二| 国产女同性恋一区二区| 日本高清不卡aⅴ免费网站| 亚洲电影中文字幕在线观看| 日韩欧美二区三区| 成人精品一区二区三区四区| 亚洲永久精品国产| 26uuu亚洲综合色| 成人短视频下载| 视频一区视频二区中文| 国产欧美精品在线观看| 欧美日韩黄色影视| 国产精品白丝jk黑袜喷水| 亚洲高清视频的网址| 国产欧美精品一区| 日韩一区二区三区在线观看| 成人av网站大全| 麻豆91在线播放免费| 亚洲精品美国一| 久久久久久电影| 欧美日韩一区国产| 成人午夜激情视频| 捆绑紧缚一区二区三区视频| 亚洲精品乱码久久久久久久久| 日韩免费看的电影| 欧美午夜一区二区三区| www.性欧美| 国产精品白丝jk黑袜喷水| 秋霞成人午夜伦在线观看| 一区二区三区在线视频观看58| 久久久国产精品麻豆| 日韩视频免费观看高清完整版在线观看| 成人一区二区三区在线观看| 在线成人免费观看| 99久久99久久精品国产片果冻| 九色|91porny| 日韩在线观看一区二区| 一区二区三区蜜桃网| 国产精品理论片| 国产欧美一区二区精品婷婷| 亚洲精品在线电影| 日韩美女天天操| 欧美三级电影精品| 欧美亚洲图片小说| 色国产精品一区在线观看| 国产91精品欧美| 国产成人免费网站| 极品尤物av久久免费看| 免费黄网站欧美| 美日韩一级片在线观看| 青青国产91久久久久久| 日韩av高清在线观看| 轻轻草成人在线| 美美哒免费高清在线观看视频一区二区| 午夜精品久久久久久久蜜桃app| 亚洲一区二区精品3399| 亚洲免费在线观看| 亚洲精品乱码久久久久久久久| 亚洲精品成人悠悠色影视| 亚洲美女免费在线| 亚洲电影第三页| 免费精品99久久国产综合精品| 麻豆91精品视频| 国产成人午夜99999| 99久久国产综合精品色伊| 日本高清不卡aⅴ免费网站| 欧美性欧美巨大黑白大战| 欧美丰满少妇xxxxx高潮对白| 日韩写真欧美这视频| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲成人777| 在线观看一区二区精品视频| 欧美亚洲自拍偷拍| 欧美一激情一区二区三区| 337p日本欧洲亚洲大胆精品 | av亚洲精华国产精华| 色婷婷激情一区二区三区| 欧美日韩一区二区三区四区| 日韩视频免费观看高清在线视频| 久久综合九色综合欧美98| 欧美激情一区三区| 一区二区三区.www| 欧美a一区二区| 成人小视频在线| 欧美性色综合网| 久久亚洲一区二区三区明星换脸 | 久久综合九色综合欧美就去吻 | 国产亚洲女人久久久久毛片| 国产精品初高中害羞小美女文| 亚洲国产精品尤物yw在线观看| 韩国一区二区在线观看| 成av人片一区二区| 日韩欧美专区在线| 一区二区三区免费在线观看| 黑人精品欧美一区二区蜜桃| 色综合久久中文综合久久97| 91精品国产麻豆国产自产在线 | 国产视频视频一区| 亚洲一区二区三区影院| 狠狠色丁香久久婷婷综合丁香| 99国产欧美久久久精品| 日韩精品一区二区三区中文不卡| 中文字幕一区二区三区色视频| 日韩精品国产欧美| 97久久精品人人做人人爽| 欧美电影免费提供在线观看| 一区二区三区在线免费| 国产电影一区二区三区| 555夜色666亚洲国产免| 亚洲天堂免费看| 国产大陆a不卡| 日韩午夜激情电影| 亚洲一区二区三区视频在线 | 在线播放视频一区| 亚洲欧美另类在线| 国产成人精品亚洲午夜麻豆| 欧美一区日韩一区| 亚洲国产精品麻豆| 99这里都是精品| 久久精品亚洲国产奇米99| 日韩高清中文字幕一区| 91视频xxxx| 国产精品成人午夜| 国产乱色国产精品免费视频| 欧美大片拔萝卜| 天天影视网天天综合色在线播放| 91蜜桃网址入口| 亚洲国产精品二十页| 国产综合久久久久影院| 欧美一级欧美三级在线观看| 亚洲妇女屁股眼交7| 欧美在线小视频| 一区二区三区在线视频免费 | 成人av在线观| 中文字幕中文乱码欧美一区二区| 国产精品一二三区| 国产色综合一区| 成人性生交大合|