Beispiel #1
0
        /// <summary>
        /// 获取电源箱状态
        /// </summary>
        /// <param name="m">设备类型</param>
        /// <param name="fzhormac">分站传分站号,交换机传MAC</param>
        public static void sendD(int m, string fzhormac)
        {
            SendDComReqest sendDComReqest = new SendDComReqest
            {
                queryBatteryRealDataItems = new List <BatteryControlItem>()
                {
                    new BatteryControlItem()
                    {
                        DevProID    = m,
                        FzhOrMac    = fzhormac,
                        controlType = 0
                    }
                }
            };

            var res = pointDefinService.SendQueryBatteryRealDataRequest(sendDComReqest);

            if (!res.IsSuccess)
            {
                throw new Exception(res.Message);
            }
        }
        /// <summary>
        /// 获取交换机电源箱信息
        /// </summary>
        /// <param name="mac"></param>
        public void GetMacPowerboxInfo(string mac)
        {
            SendDComReqest sendDComReqest = new SendDComReqest
            {
                queryBatteryRealDataItems = new List <BatteryControlItem>()
                {
                    new BatteryControlItem()
                    {
                        DevProID    = 16,
                        FzhOrMac    = mac,
                        controlType = 0
                    }
                }
            };

            var res = pointDefineService.SendQueryBatteryRealDataRequest(sendDComReqest);

            if (!res.IsSuccess)
            {
                throw new Exception(res.Message);
            }
        }
 public BasicResponse SendQueryBatteryRealDataRequest(SendDComReqest request)
 {
     return(_PointDefineService.SendQueryBatteryRealDataRequest(request));
 }