private byte manualMovementToByte(enumManualModeWhat enumArg) { byte bArg; switch (enumArg) { case enumManualModeWhat.MANUAL_MOVE_BASE: bArg = (byte)0; break; case enumManualModeWhat.MANUAL_MOVE_SHOULDER: bArg = (byte)1; break; case enumManualModeWhat.MANUAL_MOVE_ELBOW: bArg = (byte)2; break; case enumManualModeWhat.MANUAL_MOVE_WRISTPITCH: bArg = (byte)3; break; case enumManualModeWhat.MANUAL_MOVE_WRISTROLL: bArg = (byte)4; break; case enumManualModeWhat.MANUAL_MOVE_GRIPPER: bArg = (byte)5; break; case enumManualModeWhat.MANUAL_MOVE_CONVEYERBELT: bArg = (byte)7; break; case enumManualModeWhat.MANUAL_MOVE_X: bArg = (byte)0; break; case enumManualModeWhat.MANUAL_MOVE_Y: bArg = (byte)1; break; case enumManualModeWhat.MANUAL_MOVE_Z: bArg = (byte)2; break; case enumManualModeWhat.MANUAL_MOVE_PITCH: bArg = (byte)3; break; case enumManualModeWhat.MANUAL_MOVE_ROLL: bArg = (byte)4; break; default: throw new ArgumentOutOfRangeException("enumArg group invalid."); } return(bArg); }
public bool moveManualWrapped(enumManualModeWhat _enumWhatToMove, int _lSpeed) { int iReturnValue; iReturnValue = _dll.MoveManual(manualMovementToByte(_enumWhatToMove), _lSpeed); return ((iReturnValue == 1) ? true : false); }