コード例 #1
0
ファイル: MotorController.cs プロジェクト: liyangTeam/WSXCut
 private MotorInfoMap <bool> GetAlarmInfo()
 {
     try
     {
         var bytes = Requestor.CreateGetMotorAlarmCmd();
         bytes = this.tcpClient.Query(bytes, x => Protocol.Verify(x), out bool valid);
         if (valid)
         {
             var data = Responder.GetMotorAlarmData(bytes);
             return(MotorUtil.ParseAlarmInfo(data));
         }
         else
         {
             throw new Exception();
         }
     }
     catch
     {
         throw new Exception("Error occurred when getting alarm information!");
     }
 }