@ -8,6 +8,12 @@ public static class ModbusDecoder
{
private static readonly ILog Log = LogManager.GetLogger(typeof(ModbusDecoder));
public static T Decode<T>(byte[] bytes) where T : class, new()
T t = new T();
return Decode<T>(bytes, t);
}
public static T Decode<T>(byte[] bytes, T t) where T : class, new()
var fields = t.GetType().GetProperties()