c语言串口通信编程
介绍 (Introduction)
尽管这是一项旧技术,但许多硬件制造商仍在使用串行端口。If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports. I needed to work on many clinical instruments as a job requirement to parse, extract patient test results and send them to a database backend for reporting. This means there are many serial ports attached to the computer. I developed different C# applications for each instrument. However, whenever I needed to make any changes, I had to open source code of the application, compile and deploy over and over again. It was very time consuming and a headache.
如果您使用C#开发应用程序,则Microsoft .NET框架具有SerialPort类以与串行端口进行通信。 作为一项工作要求,我需要处理许多临床仪器,以解析,提取患者测试结果并将其发送到数据库后端进行报告。 这意味着有许多串行端口连接到计算机。 我为每种仪器开发了不同的C#应用程序。 但是,每当需要进行任何更改时,都必须打开应用程序的源代码,反复编译和部署。 这非常耗时并且令人头疼。
This is why I developed a serial port programming language: To reduce development time. I have made the tool available as project on SourceForge. In this article, I'll discuss some of its features and give you an idea of how to use it.
这就是为什么我开发串行端口编程语言的原因:减少开发时间。 我已经将该工具作为SourceForge上的项目提供。 在本文中,我将讨论其某些功能,并为您提供如何使用它的想法。
应用功能
(Application Features
)
这是一个方便,简单的应用程序,专门设计用于简化基于RS232的应用程序的开发。 它不仅使与串行端口通信变得容易,而且使数据解析和提取变得容易。
It requires .NET Framework 3.5 or above and supports all major Windows platforms including Windows XP, Windows Vista and Windows 7.
它需要.NET Framework 3.5或更高版本,并支持所有主要的Windows平台,包括Windows XP,Windows Vista和Windo