using iWareCC.RgvService; using iWareCC.SrmService; using iWareCommon; using iWareCommon.Utils; using iWareModel; using iWareSql; using iWareSql.DataAccess; using iWareSql.Entity.ParamModel; using iWareSql.Orm; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace iWareCC.BLL { /// /// 堆垛机的业务处理类 /// public class SrmBLL { private static string _namespace = "iWareCC.BLL.SrmBLL"; /// /// 检测堆垛机是否有心跳 /// /// /// public static bool IsHandShare(SrmServiceClient service, EDevice _EDeviceId) { //检测是否有心跳 var info = service.GetSrmInfo((int)_EDeviceId); var oldHandShake = info.R_HandShake; Thread.Sleep(2000); info = service.GetSrmInfo((int)_EDeviceId);//重新获取对象 var newHandShare = info.R_HandShake; if (oldHandShake != newHandShare) { //有心跳 return true; } else { return false; } } } }