海底示踪气体原位自动检测系统远程控制软件的设计与实现
发布时间:2018-01-08 07:27
本文关键词:海底示踪气体原位自动检测系统远程控制软件的设计与实现 出处:《湖南师范大学》2014年硕士论文 论文类型:学位论文
更多相关文章: 海底示踪气体 海底观测网 远程控制软件 通信协议 多线程
【摘要】:作为地球观测系统的第三个平台,海底观测网络由岸基站部分、海底接驳盒、海底光电缆以及科学仪器组成。为了接收海底观测网科学仪器采集的数据,控制科学仪器的运行,需要为每类科学仪器研制远程控制软件。本文研究的远程控制软件作为同济大学海洋与地球科学学院主持研究的“海底示踪气体原位自动检测系统”的上位机,位于岸基/船基端,主要功能是远程操作海底示踪气体原位自动检测系统水下装置和接收各种监测数据。 本文完成的主要工作有: (1)通过海底示踪气体原位自动检测系统的远程控制软件、水下中央控制单元、水下气体分析装置等三个组成部分之间数据通信的研究,设计了这三个部分之间的通信协议。提出了一种将所有数据包抽象成一个抽象类,让继承类去重写该类发送函数和处理函数的方法,极大的提高了通信协议的可扩展性以及稳定性。 (2)实现了与水下中央控制单元的数据交互。通过Winsock网络通信技术,采用WSAAsySelect(异步选择)模型将远程控制软件以客户端的方式与水下中央控制单元连接,接收状态监测数据、电源检测数据、GC采样信息,同时发送仪器控制指令。 (3)由于远程控制软件完成的功能负载包括接收网络数据、存储数据、心跳图动态监测数据等操作,为了让主线程更从容地接收数据,采用多线程设计。主线程一旦接收到数据,立即将数据存入接收链表中,然后将数据处理等耗时操作交给后台线程处理。 (4)实现了海底上传信息的存储,这些采集的信息包括状态监测数据、电源检测数据、GC采样信息。为了保持数据格式的通用性,使资料更方便地用于科学研究,直接将数据存入Excel文件中。操作Excel文件的方法有多种,程序中使用ADO操作Excel,提高数据存储与读取的速度。 (5)内存池设计。在将接受的数据存入链表中时,程序每1~2秒就需要向操作系统申请一块20~70kb的内存,这样的内存申请频率过快,会导致内存块产生过多的碎片,逐渐蚕食内存。为避免这一问题,设计了一个内存池用于管理内存的分配。内存池首先向操作系统申请一块较大的内存,然后用SMemoryChunks类型的链表管理这些申请的内存。当程序需要内存时,只需从较大的内存中分配一块可用的即可。这样减少了内存碎片的产生,同时提高了内存分配释放的效率。
[Abstract]:As the third platform of the Earth observation system, the submarine observation network consists of a base station section, a submarine connection box, a submarine optical cable and scientific instruments to receive the data collected by the scientific instruments of the submarine observation network. Control the operation of scientific instruments. It is necessary to develop remote control software for each kind of scientific instruments. The remote control software studied in this paper is used as the host computer of "submarine tracer gas in-situ automatic detection system", which is developed by the School of Marine and Geoscience of Tongji University. Located at the shore / ship base, the main function is to remotely operate the underwater automatic detection system of submarine tracer gas and receive various monitoring data. The main work accomplished in this paper is as follows: 1) the research of data communication between the three components of submarine tracer gas in-situ automatic detection system, such as remote control software, underwater central control unit and underwater gas analysis device. The communication protocol between the three parts is designed, and a method of abstracting all packets into an abstract class is proposed, which allows the inheritance class to override the sending function and the processing function of the class. It greatly improves the scalability and stability of the communication protocol. (2) the data interaction with the underwater central control unit is realized, and the communication technology is realized through the Winsock network. WSAAsySelectModel is used to connect the remote control software with the underwater central control unit in the way of client, to receive the state monitoring data, and to detect the data of power supply. GC sampling information and sending instrument control instructions. Because the function load of remote control software includes receiving network data, storing data and monitoring data dynamically, so that the main thread can receive the data more calmly. As soon as the main thread receives the data, it stores the data in the receiving list, and then hands over the time-consuming operation such as data processing to the background thread for processing. In order to keep the generality of the data format, the storage of the submarine upload information is realized, which includes the status monitoring data, the power detection data and the GC sampling information. Make the data more convenient for scientific research, directly save the data in the Excel file. There are a variety of methods to manipulate Excel files, and ADO is used to operate Excel in the program. Improve the speed of data storage and reading. Memory pool design. When the accepted data is stored in the list, the program needs to apply to the operating system for a memory of 20 ~ 70kb every 1 ~ 2 seconds, so the memory request frequency is too fast. In order to avoid this problem, a memory pool is designed to manage the allocation of memory. The memory pool first applies a large block of memory to the operating system. The requested memory is then managed with a list of SMemoryChunks types. When the program needs memory. It only needs to allocate a piece of available memory from the larger memory. This reduces the generation of memory fragmentation and improves the efficiency of memory allocation release.
【学位授予单位】:湖南师范大学
【学位级别】:硕士
【学位授予年份】:2014
【分类号】:P715;TP311.52
【参考文献】
相关期刊论文 前10条
1 马伟锋;崔维成;刘涛;胡震;;海底电缆观测系统的研究现状与发展趋势[J];海岸工程;2009年03期
2 熊英;程玉;李军;;远程控制程序设计[J];湖北工业大学学报;2006年04期
3 李萍萍,姚娟,刘勇强;在VC中使用ADO开发数据库应用程序[J];河南机电高等专科学校学报;2004年04期
4 罗续业;李彦;;海王星海底长期观测系统的技术分析[J];海洋技术;2006年03期
5 王项南;马丽珊;熊焰;高艳波;张静;;深海观测平台技术[J];海洋技术;2007年03期
6 赵吉浩;高艳波;朱光文;葛运国;;海洋观测技术进展[J];海洋技术;2008年04期
7 刘骏,颜钢锋;基于Socket的网络编程技术及其实现[J];江南大学学报;2004年03期
8 程远忠,杜平安;Winsock中的I/O模型探讨[J];计算机工程;2001年01期
9 郭虹,薄云飞,林冬;VC++与MATLAB混合编程技术研究[J];计算机工程;2002年09期
10 郭丙轩;张京莉;张志超;;基于内存池的空间数据调度算法[J];计算机工程;2008年06期
相关博士学位论文 前1条
1 黄霞;海底原位地球化学传感器的研制与应用[D];浙江大学;2008年
,本文编号:1396174
本文链接:https://www.wllwen.com/kejilunwen/haiyang/1396174.html