Пример #1
0
        /// <summary>
        /// 上锁
        /// </summary>
        /// <returns></returns>
        public byte[] Send_ShangShuo()
        {
            WatchHouseDataPack_Send_CommandEnmu vCommand  = WatchHouseDataPack_Send_CommandEnmu.ShangShuo;
            WatchHouseDataPack_SendData_Main    vSendData = new WatchHouseDataPack_SendData_Main()
            {
                ID_H = (byte)((int)vCommand >> 24),
                ID_L = (byte)((int)vCommand >> 16),
                CMD  = (byte)((int)vCommand >> 8),
                SUB  = (byte)(int)vCommand
            };

            return(NetHelper.StructureToByte(vSendData));
        }
Пример #2
0
        /// <summary>
        /// 调节室温
        /// </summary>
        /// <param name="WenDu"></param>
        /// <returns></returns>
        public byte[] Send_TiaoJieSW(byte WenDu)
        {
            WatchHouseDataPack_Send_CommandEnmu vCommand  = WatchHouseDataPack_Send_CommandEnmu.TiaoJieSW;
            WatchHouseDataPack_SendData_Main    vSendData = new WatchHouseDataPack_SendData_Main()
            {
                ID_H = (byte)((int)vCommand >> 24),
                ID_L = (byte)((int)vCommand >> 16),
                CMD  = (byte)((int)vCommand >> 8),
                SUB  = (byte)(int)vCommand,
                Data = WenDu
            };

            return(NetHelper.StructureToByte(vSendData));
        }
Пример #3
0
        /// <summary>
        /// 显示指定工作牌号
        /// </summary>
        /// <param name="PaiHao">工作牌号</param>
        /// <returns></returns>
        public byte[] Send_XianShiGZPH(byte[] PaiHao)
        {
            WatchHouseDataPack_Send_CommandEnmu vCommand  = WatchHouseDataPack_Send_CommandEnmu.TiaoJieSW;
            WatchHouseDataPack_SendData_Main    vSendData = new WatchHouseDataPack_SendData_Main()
            {
                ID_H  = (byte)((int)vCommand >> 24),
                ID_L  = (byte)((int)vCommand >> 16),
                CMD   = (byte)((int)vCommand >> 8),
                SUB   = (byte)(int)vCommand,
                Data  = PaiHao.Length >= 1 ? PaiHao[0] : (byte)0x00,
                Kong1 = PaiHao.Length >= 2 ? PaiHao[1] : (byte)0x00,
                Kong2 = PaiHao.Length >= 3 ? PaiHao[2] : (byte)0x00,
            };

            return(NetHelper.StructureToByte(vSendData));
        }