基于SWIG的Python仪器驱动封装技术  被引量:2

Instrument Driver Wrapping in Python Based on SWIG

在线阅读下载全文

作  者:马宇 叶卫东[1] MA Yu;YE Weidong(Beihang University,Beijing 100191,China)

机构地区:[1]北京航空航天大学,北京100191

出  处:《计测技术》2018年第2期54-58,共5页Metrology & Measurement Technology

摘  要:Python是交互式的高级脚本语言,语法简单,开发效率高。但Python不支持内存指针,不便于仪器编程。首先对比了Python调用仪器驱动的主要方案,之后以某多功能数据采集模块为例,介绍了用SWIG(Simple Wrapper and Interface Generator)开源工具将其驱动封装为Python拓展模块的主要步骤,并实现了远程、跨平台调用。最后设计性能对比测试,定量分析了Python程序中调用仪器驱动的运行效率。Python is an interactive high-level scripting language with simple syntax and high development efficiency. But Python does not support memory pointers,and is not convenient for instrument programming. This paper introduces and compares several methods to invoke instrument driver in Python,and takes one multi-function data acquisition card as an example to show how to wrap customized instrument driver into Python's extension module utilizing SWIG( Simple Wrapper and Interface Generator). Remote and cross-platform API calling is also achieved in the process. Finally,the efficiency of invoking instrument driver in Python is quantitatively analyzed through a performance benchmark test.

关 键 词:PYTHON SWIG 仪器驱动 自动测试系统 虚拟仪器 

分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象