tangxu
2022-10-26 295251bf072d48e9cdf7e3819eb0817708bbd842
Socket/IStation.DataDockingSocket4NT/helper/MsgDataHelper.cs
@@ -71,16 +71,7 @@
        }
        /// <summary>
        /// 获取控制指令(关机)
        /// </summary>
        /// <returns></returns>
        public static byte[] GetControlMsg关机()
        {
            return null;
        }
        /// <summary>
        /// 
        /// </summary>
@@ -95,31 +86,6 @@
            }
            return appParas.InstructionQuerys;
        }
        /// <summary>
        /// 获取控制指令(开机)
        /// </summary>
        /// <returns></returns>
        public static byte[] GetControlMsg开机()
        {
            return null;
        }
        /// <summary>
        /// 获取控制指令(调频)
        /// </summary>
        /// <returns></returns>
        public static byte[] GetControlMsg调频(double frequece)
        {
            var iFrequece = (int)(frequece * 10);
            byte[] commandSend = null;
            IStation.DataDockingSocket.ModBusRtuHelper.BuildSendMessage06(0x01, 20, 2, iFrequece, ref commandSend);
            return commandSend;
        }
        /// <summary>
        /// 获取查询指令(监控值)
@@ -127,6 +93,7 @@
        /// <returns></returns>
        public byte[] GetMonitorMsg监控值()
        {
            return new byte[] { 0x01, 0x03, 0x00, 0x19, 0x00, 0x19, 0x55, 0xC7 };
        }
@@ -140,6 +107,54 @@
        {
            return new byte[] { 0x01, 0x03, 0x00, 0x12, 0x00, 0x04, 0xE4, 0x0C };
        }
        /// <summary>
        /// 获取控制指令(开机)
        /// </summary>
        /// <returns></returns>
        public static byte[] GetControlMsg开机()
        {
            var appParas = GetAppParas();
            if (appParas == null || appParas.InstructionStartUp == null || appParas.InstructionStartUp.Content == null)
            {
                return BitTransfer.FromString("01-06-00-0F-00-01-78-09");
            }
            return BitTransfer.FromString(appParas.InstructionStartUp.Content);
        }
        /// <summary>
        /// 获取控制指令(关机)
        /// </summary>
        /// <returns></returns>
        public static byte[] GetControlMsg关机()
        {
            var appParas = GetAppParas();
            if (appParas == null || appParas.InstructionStartUp == null || appParas.InstructionStartUp.Content == null)
            {
                return BitTransfer.FromString("01-06-00-10-00-01-49-CF");
            }
            return BitTransfer.FromString(appParas.InstructionShutDown.Content);
        }
        /// <summary>
        /// 获取控制指令(调频)
        /// </summary>
        /// <returns></returns>
        public static byte[] GetControlMsg调频(double frequece)
        {
            var iFrequece = (int)(frequece * 10);
            byte[] commandSend = null;
            IStation.DataDockingSocket.ModBusRtuHelper.BuildSendMessage06(0x01, 20, 2,
                iFrequece, ref commandSend);
            return commandSend;
        }
        /// <summary>
@@ -456,7 +471,7 @@
        }
        #region MyRegion
        #region 数据转化
        private static int GetInt2Byte(byte[] byteMessage, int startPosition, out string info)
        {
            byte[] value = new byte[2];