diff --git a/Modbus.Net/Modbus.Net/Configuration/MachineReader.cs b/Modbus.Net/Modbus.Net/Configuration/MachineReader.cs
new file mode 100644
index 0000000..774ac53
--- /dev/null
+++ b/Modbus.Net/Modbus.Net/Configuration/MachineReader.cs
@@ -0,0 +1,131 @@
+using Microsoft.Extensions.Configuration;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+
+namespace Modbus.Net
+{
+ ///
+ /// 从配置文件读取设备列表
+ ///
+ public class MachineReader
+ {
+ private static readonly IConfigurationRoot configuration = new ConfigurationBuilder()
+ .SetBasePath(Directory.GetCurrentDirectory())
+ .AddJsonFile("appsettings.default.json")
+ .AddJsonFile("appsettings.json")
+ .AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT") ?? Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", true)
+ .Build();
+
+ ///
+ /// 读取设备列表
+ ///
+ /// 设备的列表
+ public static List> ReadMachines()
+ {
+ var ans = new List>();
+ var root = configuration.GetSection("Modbus.Net").GetSection("Machine").GetChildren();
+ foreach (var machine in root)
+ {
+ List> kv = new List>();
+ Dictionary dic = new Dictionary();
+ foreach (var paramO in machine.GetChildren())
+ {
+ foreach (var param in paramO.GetChildren())
+ {
+ kv.Add(new KeyValuePair(param.Key, param.Value));
+ dic[param.Key] = param.Value;
+ }
+ }
+
+ List