1 Star 2 Fork 0

武汉中科能慧 / nhCore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
NhbAnalyer.cs 794 Bytes
一键复制 编辑 原始数据 按行查看 历史
周学京 提交于 2023-05-15 16:52 . V2.0.2 2023-5-15
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nhCore
{
public class NhbAnalyer
{
public static List<DbConfig> DeCodeNhb(string path)
{
FileStream fs = File.OpenRead(path);
byte[] buffer = new byte[32];
List<DbConfig> ls = new List<DbConfig>();
Dictionary<byte, List<DbConfig>> cfgs;
while (fs.Read(buffer, 0, buffer.Length) != 0)
{
cfgs = Modbus.ConfigAnalyzer.BytesToDbConfig(buffer, 0);
foreach (var cf in cfgs[0])
{
ls.Add(cf);
}
}
fs.Close();
return ls;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/whzknh/nhCore.git
git@gitee.com:whzknh/nhCore.git
whzknh
nhCore
nhCore
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891