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!"); } }
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!"); } }
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); }