示例#1
0
 public void CancelToolBroken(bool bIsTrueBroken)
 {
     try
     {
         if (this._info != null)
         {
             String Redisip   = System.Configuration.ConfigurationManager.AppSettings["RedisUri"];
             Int32  Redisport = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["RedisPort_RealTime"]);
             ServiceStack.Redis.RedisClient client = new ServiceStack.Redis.RedisClient(Redisip, Redisport);
             client.Db = this._CloudDB;
             HncMessage <ToolBrokenInfo> toolinfo = new HncMessage <ToolBrokenInfo>();
             toolinfo.Header = "ToolBrokenFeedBack";
             _info.IsBroken  = bIsTrueBroken;
             toolinfo.Body   = _info;
             String msg = Newtonsoft.Json.JsonConvert.SerializeObject(toolinfo);
             client.Set <String>("ToolBrokenFeedBack", msg);
             _info = null;
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("CancelToolBroken:" + ex.Message);
     }
     HncApi.HNC_RegClrBit((int)HncRegType.REG_TYPE_G, 2626, 0, _ClientNo);
     HncApi.HNC_RegClrBit((int)HncRegType.REG_TYPE_G, 3013, 15, _ClientNo);
 }
示例#2
0
 private void MessagePipe_OnToolBroken(HNCAPI.Data.ToolBrokenInfo info)
 {
     _info = info;
     this.SetToolBroken(info.ToolNo);
 }