摘要
针对船舶能效管理系统软件在串口数据采集和数据解析环节的紧密耦合,导致代码固化调整不便等问题,提出基于配置化的串口数据采集改进方法,将串口基于不同的通讯协议和数据解析方法提炼为配置化信息。软件可读取配置信息自动对串口进行初始化和解析,实现在不修改代码的前提下,用户可以根据需求修改、增加或删除配置信息调整软件处理方式,实现软件功能的扩展性。该成果目前已经运用到船舶能效系统中,效果显著。
Aiming at the problems of tight coupling between serial data acquisition and data analysis in ship energy efficiency management system software,which leads to code solidification and adjustment invariable,an improved method of serial data acquisition based on configuration was proposed.The serial port was refined into configuration information based on different communication protocols and data analysis methods.The software can read the configuration information to initialize and parse the serial port automatically,so that the user can modify,add or delete the configuration information to adjust the software processing mode without modifying the code,and realize the expansibility of the software function.
作者
童大鹏
李鹏蕾
刘杰
杨永康
TONG Da-peng;LI Peng-lei;LIU Jie;Yang Yong-kang(Naval Petty Officer Academy,Bengbu Anhui 233012,China;School of Naval Architecture,Ocean and Energy Power Engineering,Wuhan University of Technology,Wuhan 430063,China)
出处
《船海工程》
北大核心
2025年第1期76-80,共5页
Ship & Ocean Engineering
基金
国家自然科学基金(U2341284)。
关键词
串口解析
数据自动采集
配置信息
serial port parsing
automatic data acquisition
configuration information