摘要
火灾监控系统需要实时获取来自接收机串口的检测数据和视频数据,对串口进行实时监控的同时还可以进行一些其他的操作。利用基于多线程的串口通信编程思想方法可以很好地解决这一问题。本文介绍多线程的基本概念和上位机C#串口通信编程技术,分析了火灾监控系统的基本功能和需求,着重阐述了采用基于多线程串口通信方法来获取和配置火灾检测参数,并且给出了C#SerialPort类的使用方法。经过最终调试,程序运行稳定,效果良好。
The fire monitoring system needs the test data and video data from the serial port of the receiver in real-time, and other opera- tions can also be carried out during the real-time monitoring period.The problem can he solvedusing the multithreading serial communi- cation programming.Firstly,the basic concepts of multithreading and the programming technology of c# serial port communication are introduced.Then,the basic functions and requirements of the fire monitoring system are analyzed.Specifically, the use of multithreading serial communication method to obtain and configure the fire detection parameters are focused on,and the use of C ~ SerialPort class is given.After the final debugging, the results prove the method effectively.
出处
《单片机与嵌入式系统应用》
2017年第9期55-58,共4页
Microcontrollers & Embedded Systems
基金
连云港市科技项目(SH1441)
关键词
多线程
串口通信
火灾监测
multithreading
serial communication
fire monitoring