@ -53,7 +53,7 @@ public static class BitUtls
if (propertyType == STRING)
{
return Convert.ChangeType(Encoding.ASCII.GetString(bytes, start, length), propertyType);
return Convert.ChangeType(Encoding.ASCII.GetString(bytes, start, length/8), propertyType);
}
if (propertyType == BYTEARRAY)
@ -31,6 +31,13 @@ public static class ClientMgr
return o;
/// <summary>
/// 通过channel获取client
/// </summary>
/// <param name="channel"></param>
/// <param name="sn"></param>
/// <param name="client">获取不到,client则为空</param>
/// <returns></returns>
public static bool TryGetClient(IChannel channel, out string sn, out ChargerClient? client)
string? snt = ChannelUtils.GetAttr(channel, ChargerConst.ChargerSn);