hutongqing
2024-11-20 70233af5426b0d1c343ebe87183303a34a9aaa58
WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/DeviceBase/DeviceCommand.cs
@@ -26,6 +26,9 @@
namespace WIDESEAWCS_QuartzJob.DeviceBase
{
    /// <summary>
    /// 西门子
    /// </summary>
    public class DeviceCommand : IDataTransfer
    {
        #region <Const>
@@ -55,7 +58,7 @@
                    case TypeCode.Byte:
                    case TypeCode.SByte:
                    case TypeCode.Char:
                        readCount += 1;
                        readCount += sizeof(byte);
                        break;
                    case TypeCode.Int16:
                    case TypeCode.UInt16:
@@ -224,7 +227,7 @@
                            bytes.Add(Convert.ToByte(dataLength));
                            bytes.Add(Convert.ToByte(obj.ToString().Length));
                            bytes.AddRange(bytesString);
                            for (int i = 0; i < dataLength - obj.ToString().Length; i++)
                            for (int i = 0; i < dataLength - obj.ToString().Length - 2; i++)
                            {
                                bytes.Add(0);
                            }