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
Afficher le fichier Open project: syre/SortingIndustrialRobot Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
Wrapper ( ) : System
axisSettingsToByte ( enumAxisSettings axisSettingsArg ) : byte
manualMovementToByte ( enumManualModeWhat enumArg ) : byte

Method Details

closeGripperWrapped() public méthode

public closeGripperWrapped ( ) : bool
Résultat bool

closeManualWrapped() public méthode

public closeManualWrapped ( ) : bool
Résultat bool

closeWatchDigitalInputWrapped() public méthode

public closeWatchDigitalInputWrapped ( ) : bool
Résultat bool

controlWrapped() public méthode

public controlWrapped ( enumAxisSettings _axisSettingsGroup, bool _bControlOnOrOff ) : bool
_axisSettingsGroup enumAxisSettings
_bControlOnOrOff bool
Résultat bool

defineVectorWrapped() public méthode

public defineVectorWrapped ( enumAxisSettings _enumGroup, string _sVectorName, short _shrtLength ) : bool
_enumGroup enumAxisSettings
_sVectorName string
_shrtLength short
Résultat bool

enterManualWrapped() public méthode

public enterManualWrapped ( enumManualType _enummanMoveType ) : bool
_enummanMoveType enumManualType
Résultat bool

getCurrentPosition() public méthode

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
Résultat VecPoint

getInstance() public static méthode

Gets the wrapper.
public static getInstance ( ) : Wrapper
Résultat Wrapper

getJawWrapped() public méthode

public getJawWrapped ( short &_shrtPerc, short &_shrtWidth ) : bool
_shrtPerc short
_shrtWidth short
Résultat bool

homeWrapped() public méthode

public homeWrapped ( enumAxisSettings _axisSettingsGroup, DLL _funcptrHomingEventHandler ) : bool
_axisSettingsGroup enumAxisSettings
_funcptrHomingEventHandler DLL
Résultat bool

initializationWrapped() public méthode

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.
Résultat bool

isOnlineOkWrapped() public méthode

public isOnlineOkWrapped ( ) : bool
Résultat bool

moveLinearWrapped() public méthode

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
Résultat bool

moveManualWrapped() public méthode

public moveManualWrapped ( enumManualModeWhat _enumWhatToMove, int _lSpeed ) : bool
_enumWhatToMove enumManualModeWhat
_lSpeed int
Résultat bool

openGripperWrapped() public méthode

public openGripperWrapped ( ) : bool
Résultat bool

speedWrapped() public méthode

public speedWrapped ( enumAxisSettings _bGroup, long _mSpeed ) : bool
_bGroup enumAxisSettings
_mSpeed long
Résultat bool

stopWrapped() public méthode

public stopWrapped ( enumAxisSettings _bWhatToStop ) : bool
_bWhatToStop enumAxisSettings
Résultat bool

teachWrapped() public méthode

public teachWrapped ( SIRVector vecTheSirVector ) : bool
vecTheSirVector SIRVector
Résultat bool

timeWrapped() public méthode

public timeWrapped ( enumAxisSettings _bGroup, long _mTime ) : bool
_bGroup enumAxisSettings
_mTime long
Résultat bool

watchDigitalInputWrapped() public méthode

public watchDigitalInputWrapped ( DLL _funcptrCallbackEvent ) : bool
_funcptrCallbackEvent DLL
Résultat bool

watchMotionWrapped() public méthode

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.
Résultat void