示例#1
0
 public override MvtemCmdBase FromByteArray(byte[] RawData)
 {
     if (Enum.IsDefined(typeof(EnumMotionState), (int)RawData[3]))
     {
         QMotionState = (EnumMotionState)RawData[3];
         SyncEvent.Set();
         return(this);
     }
     else
     {
         throw new Exception("Wrong state of motion state!");
     }
 }
示例#2
0
 public override MvtemCmdBase FromByteArray(byte[] RawData)
 {
     if (Enum.IsDefined(typeof(EnumCurrentState), (int)RawData[3]))
     {
         this.QCurCurrentState = (EnumCurrentState)RawData[3];
         SyncEvent.Set();
         return(this);
     }
     else
     {
         throw new Exception("Wrong state found when parse state of current!");
     }
 }
示例#3
0
 public override MvtemCmdBase FromByteArray(byte[] RawData)
 {
     QCurPuseError = (Int16)(RawData[2] * 256 + RawData[3]);
     SyncEvent.Set();
     return(this);
 }
 public override MvtemCmdBase FromByteArray(byte[] RawData)
 {
     QCurZoomRate = (double)(RawData[2] * 256 + RawData[3]) / 100.0;
     SyncEvent.Set();
     return(this);
 }