/// <summary> /// 设置网络模块参数---串口参数 /// </summary> /// <param name="networkModuleCacheRequest"></param> /// <returns></returns> public BasicResponse SetNetworkModuletParametersComm(NetworkModuletCommParametersSetRequest networkModuleCacheRequest) { BasicResponse Result = new BasicResponse(); SetNetworkDeviceParamCommRequest setNetworkDeviceRequest = new SetNetworkDeviceParamCommRequest(); setNetworkDeviceRequest.Mac = networkModuleCacheRequest.MAC; setNetworkDeviceRequest.CommPort = networkModuleCacheRequest.CommPort; setNetworkDeviceRequest.NetworkDeviceParam = networkModuleCacheRequest.Parameters; //调用RPC组件下发数据 MasProtocol masProtocol = new MasProtocol(SystemType.Security, DirectionType.Down, ProtocolType.SetNetworkDeviceParamCommRequest); masProtocol.Protocol = setNetworkDeviceRequest; //调用RPC发送搜索网络模块命令,并接收回传的参数--todo,SetNetworkDeviceParamResponse没有改 var result = RpcService.Send <SetNetworkDeviceParamCommResponse>(masProtocol, RequestType.DeviceUdpRequest); if (result.ExeRtn != 1) { Result.Code = 1; Result.Message = "设置网络模块串口参数失败!"; } return(Result); }
public BasicResponse SetNetworkModuletParametersComm(NetworkModuletCommParametersSetRequest networkModuleCacheRequest) { return(_NetworkModuleService.SetNetworkModuletParametersComm(networkModuleCacheRequest)); }
public BasicResponse SetNetworkModuletParametersComm(NetworkModuletCommParametersSetRequest networkModuleCacheRequest) { var responseStr = HttpClientHelper.Post(Webapi + "/v1/NetworkModule/SetNetworkModuletParametersComm?token=" + Token, JSONHelper.ToJSONString(networkModuleCacheRequest)); return(JSONHelper.ParseJSONString <BasicResponse <List <Jc_MacInfo> > >(responseStr)); }