/// <summary> /// 交换机电源箱控制 /// </summary> /// <param name="mac"></param> /// <param name="controlType"></param> public static void SendSwitchesDControl(string mac, byte controlType) { var req = new SwitchesDControlRequest { swichControlItems = new List <SwichControlItem>() { new SwichControlItem() { mac = mac, controlType = controlType } } }; var res = PointDefineService.SendSwitchesDControl(req); if (!res.IsSuccess) { throw new Exception(res.Message); } }
public BasicResponse SendSwitchesDControl(SwitchesDControlRequest controlInfo) { return(_PointDefineService.SendSwitchesDControl(controlInfo)); }
public BasicResponse SendSwitchesDControl(SwitchesDControlRequest controlInfo) { var responseStr = HttpClientHelper.Post(Webapi + "/v1/PointDefine/SendSwitchesDControl?token=" + Token, JSONHelper.ToJSONString(controlInfo)); return(JSONHelper.ParseJSONString <BasicResponse>(responseStr)); }