/// <summary> /// 更新设备信息 /// </summary> /// <param name="dev"></param> public void UpdateDevice(string devName, DeviceARF dev) { if (devices.Exists(c => c.devName == devName)) { devices.Find(c => c.devName == devName)._ = dev; } }
public ArfMessage(byte[] msg) { ArfRecive_S st = BufferToStruct <ArfRecive_S>(msg); DeviceARF m = new DeviceARF { ActionStatus = (ActionEnum)st.ActionStatus, DeviceStatus = (DeviceEnum)st.DeviceStatus, CommandStatus = (CommandEnum)st.CommandStatus, CurrentTask = (TaskEnum)st.CurrentTask, CurrentSite = st.CurrentSite, RollerStatus = (RollerStatusEnum)st.RollerStatus, RollerDiretion = (RollerDiretionEnum)st.RollerDirection, FinishTask = (TaskEnum)st.FinishTask, GoodsStatus = (GoodsEnum)st.GoodsStatus, ErrorMessage = st.ErrorMessage, }; Module = m; }