예제 #1
0
        /// <summary>
        /// 分站电源箱控制   0不进行操作,1取消维护性放电,2维护性放电
        /// </summary>
        /// <param name="fzh"></param>
        /// <param name="controlType"></param>
        public static void SendStationDControl(ushort fzh, byte controlType)
        {
            var req = new StationDControlRequest
            {
                controlItems = new List <StationControlItem>()
                {
                    new StationControlItem()
                    {
                        fzh         = fzh,
                        controlType = controlType
                    }
                }
            };
            var res = PointDefineService.SendStationDControl(req);

            if (!res.IsSuccess)
            {
                throw new Exception(res.Message);
            }
        }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="fzh"></param>
 /// <param name="controlType">0不进行操作,1取消维护性放电,2维护性放电</param>
 public static void SendPowerControl(List <ushort> fzhs, List <byte> controls)
 {
     try
     {
         StationDControlRequest request = new StationDControlRequest();
         request.controlItems = new List <StationControlItem>();
         StationControlItem controlItem;
         for (int i = 0; i < fzhs.Count; i++)
         {
             controlItem             = new StationControlItem();
             controlItem.fzh         = fzhs[i];
             controlItem.controlType = controls[i];
             request.controlItems.Add(controlItem);
         }
         pointDefineService.SendStationDControl(request);
     }
     catch (Exception ex)
     {
         LogHelper.Error("SendPowerControl Error:" + ex.Message);
     }
 }
 public BasicResponse SendStationDControl(StationDControlRequest controlInfo)
 {
     return(_PointDefineService.SendStationDControl(controlInfo));
 }