C# Class ControlSystem.Wrapper

Contains a wrapper for the C++ functions in the dll file(USBC.dll). Good idea to check USBC-documentation.pdf. Notes: Uses IntPtr arg for different types of C++ pointers. Same function names as C++ but has "Wrapped" at the end. Try to have handlers in delegates which in entire use of wrapper, so the memory for the handler doesn´t get removed by GC. \todo Add behind factory class.
Inheritance: IWrapper
显示文件 Open project: syre/SortingIndustrialRobot Class Usage Examples

Public Methods

Method Description
closeGripperWrapped ( ) : bool
closeManualWrapped ( ) : bool
closeWatchDigitalInputWrapped ( ) : bool
controlWrapped ( enumAxisSettings _axisSettingsGroup, bool _bControlOnOrOff ) : bool
defineVectorWrapped ( enumAxisSettings _enumGroup, string _sVectorName, short _shrtLength ) : bool
enterManualWrapped ( enumManualType _enummanMoveType ) : bool
getCurrentPosition ( ) : VecPoint

Returns the position of the robot. \warning Ignoring wrapper int return value. \warning Not sure about buffer type to use in impl.

getInstance ( ) : Wrapper

Gets the wrapper.

getJawWrapped ( short &_shrtPerc, short &_shrtWidth ) : bool
homeWrapped ( enumAxisSettings _axisSettingsGroup, DLL _funcptrHomingEventHandler ) : bool
initializationWrapped ( enumSystemModes _sysmodeMode, enumSystemTypes _systypeType, DLL _funcptrSuccess, DLL _funcptrError ) : bool

Initializes the robot. Note: Should wait for it to be done before calling other functions. \todo Refactor delegate to contain ConfigData and ErrorInfo if found necessary.

isOnlineOkWrapped ( ) : bool
moveLinearWrapped ( string _sNameOfVector, int _iIndex ) : bool

Moves the robot in a linear motion. \warning Not using pos 2 in wrapped dll function. \warning Seems to be unfunctional.

moveManualWrapped ( enumManualModeWhat _enumWhatToMove, int _lSpeed ) : bool
openGripperWrapped ( ) : bool
speedWrapped ( enumAxisSettings _bGroup, long _mSpeed ) : bool
stopWrapped ( enumAxisSettings _bWhatToStop ) : bool
teachWrapped ( SIRVector vecTheSirVector ) : bool
timeWrapped ( enumAxisSettings _bGroup, long _mTime ) : bool
watchDigitalInputWrapped ( DLL _funcptrCallbackEvent ) : bool
watchMotionWrapped ( DLL _funcptrCallbackEnd, DLL _funcptrCallbackStart ) : void

Adds functions to be called when motion starts and motion ends. Note: Ignoring return value.

Private Methods

Method Description
Wrapper ( ) : System
axisSettingsToByte ( enumAxisSettings axisSettingsArg ) : byte
manualMovementToByte ( enumManualModeWhat enumArg ) : byte

Method Details

closeGripperWrapped() public method

public closeGripperWrapped ( ) : bool
return bool

closeManualWrapped() public method

public closeManualWrapped ( ) : bool
return bool

closeWatchDigitalInputWrapped() public method

public closeWatchDigitalInputWrapped ( ) : bool
return bool

controlWrapped() public method

public controlWrapped ( enumAxisSettings _axisSettingsGroup, bool _bControlOnOrOff ) : bool
_axisSettingsGroup enumAxisSettings
_bControlOnOrOff bool
return bool

defineVectorWrapped() public method

public defineVectorWrapped ( enumAxisSettings _enumGroup, string _sVectorName, short _shrtLength ) : bool
_enumGroup enumAxisSettings
_sVectorName string
_shrtLength short
return bool

enterManualWrapped() public method

public enterManualWrapped ( enumManualType _enummanMoveType ) : bool
_enummanMoveType enumManualType
return bool

getCurrentPosition() public method

Returns the position of the robot. \warning Ignoring wrapper int return value. \warning Not sure about buffer type to use in impl.
public getCurrentPosition ( ) : VecPoint
return VecPoint

getInstance() public static method

Gets the wrapper.
public static getInstance ( ) : Wrapper
return Wrapper

getJawWrapped() public method

public getJawWrapped ( short &_shrtPerc, short &_shrtWidth ) : bool
_shrtPerc short
_shrtWidth short
return bool

homeWrapped() public method

public homeWrapped ( enumAxisSettings _axisSettingsGroup, DLL _funcptrHomingEventHandler ) : bool
_axisSettingsGroup enumAxisSettings
_funcptrHomingEventHandler DLL
return bool

initializationWrapped() public method

Initializes the robot. Note: Should wait for it to be done before calling other functions. \todo Refactor delegate to contain ConfigData and ErrorInfo if found necessary.
public initializationWrapped ( enumSystemModes _sysmodeMode, enumSystemTypes _systypeType, DLL _funcptrSuccess, DLL _funcptrError ) : bool
_sysmodeMode enumSystemModes Mode.[Normally use online mode]
_systypeType enumSystemTypes Type of connection.[Normally use default]
_funcptrSuccess DLL Function to be called on success.
_funcptrError DLL Function to be called on error.
return bool

isOnlineOkWrapped() public method

public isOnlineOkWrapped ( ) : bool
return bool

moveLinearWrapped() public method

Moves the robot in a linear motion. \warning Not using pos 2 in wrapped dll function. \warning Seems to be unfunctional.
public moveLinearWrapped ( string _sNameOfVector, int _iIndex ) : bool
_sNameOfVector string Name of the vector in the Robot.
_iIndex int Index for point
return bool

moveManualWrapped() public method

public moveManualWrapped ( enumManualModeWhat _enumWhatToMove, int _lSpeed ) : bool
_enumWhatToMove enumManualModeWhat
_lSpeed int
return bool

openGripperWrapped() public method

public openGripperWrapped ( ) : bool
return bool

speedWrapped() public method

public speedWrapped ( enumAxisSettings _bGroup, long _mSpeed ) : bool
_bGroup enumAxisSettings
_mSpeed long
return bool

stopWrapped() public method

public stopWrapped ( enumAxisSettings _bWhatToStop ) : bool
_bWhatToStop enumAxisSettings
return bool

teachWrapped() public method

public teachWrapped ( SIRVector vecTheSirVector ) : bool
vecTheSirVector SIRVector
return bool

timeWrapped() public method

public timeWrapped ( enumAxisSettings _bGroup, long _mTime ) : bool
_bGroup enumAxisSettings
_mTime long
return bool

watchDigitalInputWrapped() public method

public watchDigitalInputWrapped ( DLL _funcptrCallbackEvent ) : bool
_funcptrCallbackEvent DLL
return bool

watchMotionWrapped() public method

Adds functions to be called when motion starts and motion ends. Note: Ignoring return value.
public watchMotionWrapped ( DLL _funcptrCallbackEnd, DLL _funcptrCallbackStart ) : void
_funcptrCallbackEnd DLL Function to be called when motion has ended.
_funcptrCallbackStart DLL Function to be called when motion has started.
return void