コード例 #1
0
 public void ShakeHands()
 {
     //进入临界状态
     preTestTime = DateTime.Now;
     GenTestStatusChangeEvent(TestStatus, TestStatus.THRESHOLD);
     TestStatus  = TestStatus.THRESHOLD;
     IDBoardDic  = new Dictionary <uint, Board>();
     IDStatusDic = new Dictionary <uint, bool>();
     IDStopDic   = new Dictionary <uint, bool>();
     foreach (Rack rack in Racks)
     {
         foreach (Board board in rack.Boards)
         {
             byte[] ID  = board.EqId;
             uint   uID = BitConverter.ToUInt32(ID, 0);
             if (!IDBoardDic.ContainsKey(uID))
             {
                 IDBoardDic.Add(uID, board);
             }
             if (board.IPAndPort == "")
             {
                 continue;
             }
             try
             {
                 if (!IDStopDic.ContainsKey(uID))
                 {
                     IDStopDic.Add(uID, false);
                     IDStatusDic.Add(uID, false);
                     BaseMessage baseMsg = shakeHandsCase.Request(0x01, board.EqId, board.IPAndPort);
                     txMsgQueue.Push(baseMsg);
                 }
             }
             catch (System.Exception ex)
             {
             }
         }
     }
 }
コード例 #2
0
 public void SendMessage(MotorBaseRequest baseRequest)
 {
     TxMsgQueue.Push(baseRequest);
 }
コード例 #3
0
 public void SendMessage(LaserBaseRequest baseRequest)
 {
     SetDecoder(baseRequest.Type);
     TxMsgQueue.Push(baseRequest);
 }