Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CRS232Device Class Reference

#include <RS232Device.h>

Inheritance diagram for CRS232Device:
Inheritance graph
[legend]

Public Member Functions

 CRS232Device ()
 default constructor More...
 
 CRS232Device (const CRS232Device &rclRS232Device)
 copy constructor More...
 
int exit ()
 
int init ()
 
int init (const char *acInitString)
 
CRS232Deviceoperator= (const CRS232Device &rclRS232Device)
 
void setQueueSize (unsigned short uiQueueSize)
 
void setTimeOut (unsigned long uiTimeOut)
 
virtual ~CRS232Device ()
 destructor More...
 
- Public Member Functions inherited from CProtocolDevice
 CProtocolDevice ()
 default constructor More...
 
 CProtocolDevice (const CProtocolDevice &rclProtocolDevice)
 copy constructor More...
 
int getCanOpenRawAbsEnc (int iModuleId, short *piValue)
 
int getDataDLR_FTS (std::vector< float > &rafData, long *piState)
 
int getDataMP55_IO (int iModuleId, float *pfData)
 
int getDataMP55_IO_fast (int iModuleId, float *pfData)
 
int getDataSCHUNK_FTC (int iModuleId, int iChannelTypeId, std::vector< float > &rafData, short *piState)
 
int initDLR_FTS ()
 
CProtocolDeviceoperator= (const CProtocolDevice &rclProtocolDevice)
 
int setInitMP55_IO_fast (int iModuleId)
 
int setNullSCHUNK_FTC (int iModuleId, short *piState)
 
int setTaraMP55_IO (int iModuleId, float fTara)
 
virtual ~CProtocolDevice ()
 destructor More...
 
- Public Member Functions inherited from CDevice
 CDevice (void)
 default constructor More...
 
 CDevice (const CDevice &rclDevice)
 copy constructor More...
 
int doInternal (int iModuleId, void *pBytes)
 
int getA0 (int iModuleId, short *piValue)
 
int getBaudRate (void)
 gets the baud rate of the device More...
 
int getC0 (int iModuleId, short *piValue)
 
int getConfig (int iModuleId, unsigned long *puiValue)
 
int getCur (int iModuleId, float *pfCur)
 
int getCurInc (int iModuleId, short *piValue)
 
int getCurrentLimit (int iModuleId, float *pfValue)
 
int getDamp (int iModuleId, short *piValue)
 
int getDefA0 (int iModuleId, short *piValue)
 
int getDefBaudRate (int iModuleId, unsigned char *pucValue)
 
int getDefBrakeTimeOut (int iModuleId, unsigned short *puiValue)
 
int getDefBurnCount (int iModuleId, unsigned char *pucValue)
 
int getDefC0 (int iModuleId, short *piValue)
 
int getDefCANBaudRate (int iModuleId, unsigned char *pucValue)
 
int getDefConfig (int iModuleId, unsigned long *puiValue)
 
int getDefCurOffset (int iModuleId, float *pfValue)
 
int getDefCurRatio (int iModuleId, float *pfValue)
 
int getDefDamp (int iModuleId, short *piValue)
 
int getDefDioData (int iModuleId, unsigned long *puiValue)
 
int getDefGearRatio (int iModuleId, float *pfValue)
 
int getDefHomeOffset (int iModuleId, float *pfValue)
 
int getDefHomeVel (int iModuleId, float *pfValue)
 
int getDefIncPerTurn (int iModuleId, unsigned long *puiValue)
 
int getDefLinearRatio (int iModuleId, float *pfValue)
 
int getDefMaxAcc (int iModuleId, float *pfValue)
 
int getDefMaxCur (int iModuleId, float *pfValue)
 
int getDefMaxDeltaPos (int iModuleId, float *pfValue)
 
int getDefMaxPos (int iModuleId, float *pfValue)
 
int getDefMaxVel (int iModuleId, float *pfValue)
 
int getDefMinPos (int iModuleId, float *pfValue)
 
int getDefRSBaudRate (int iModuleId, unsigned char *pucValue)
 
int getDefSetup (int iModuleId, unsigned long *puiValue)
 
int getDeltaPos (int iModuleId, float *pfValue)
 
int getDeltaPosInc (int iModuleId, long *piValue)
 
int getDioData (int iModuleId, unsigned long *puiValue)
 
int getHMaxCurOvershootTime (int iModuleId, long *piValue)
 
int getHomeOffset (int iModuleId, float *pValue)
 
int getHomeOffsetInc (int iModuleId, long *piValue)
 
int getHomeVel (int iModuleId, float *pfValue)
 
int getHomeVelInc (int iModuleId, long *piValue)
 
int getIncRatio (int iModuleId, float *pValue)
 
bool getInitFlag ()
 gets the init flag More...
 
const char * getInitString ()
 gets the init string of the device More...
 
int getIPolVel (int iModuleId, float *pValue)
 
int getKpPWMLimit (int iModuleId, long *piValue)
 
int getLoadDeltaTime (int iModuleId, unsigned short *piValue)
 
int getLoadLimit (int iModuleId, long *piValue)
 
int getLogicOvershootTime (int iModuleId, long *piValue)
 
int getLogicSupply (int iModuleId, float *pfValue)
 
int getLogicUndershootTime (int iModuleId, long *piValue)
 
int getMaxAcc (int iModuleId, float *pfValue)
 
int getMaxAccInc (int iModuleId, long *piValue)
 
int getMaxCur (int iModuleId, float *pfValue)
 
int getMaxDeltaPos (int iModuleId, float *pfValue)
 
int getMaxDeltaPosInc (int iModuleId, long *piValue)
 
int getMaximumMotorCurrent (int iModuleId, float *pfValue)
 
int getMaxLoadGradient (int iModuleId, long *piValue)
 
int getMaxLogicVoltage (int iModuleId, float *pfValue)
 
int getMaxMotorVoltage (int iModuleId, float *pfValue)
 
int getMaxPos (int iModuleId, float *pfValue)
 
int getMaxPosInc (int iModuleId, long *piValue)
 
int getMaxPWMOutput (int iModuleId, long *piValue)
 
int getMaxVel (int iModuleId, float *pfValue)
 
int getMaxVelInc (int iModuleId, long *piValue)
 
int getMinLogicVoltage (int iModuleId, float *pfValue)
 
int getMinMotorVoltage (int iModuleId, float *pfValue)
 
int getMinPos (int iModuleId, float *pfValue)
 
int getMinPosInc (int iModuleId, long *piValue)
 
int getModuleCount (void)
 gets the number of modules of the device More...
 
int getModuleIdMap (std::vector< int > &raiModuleId)
 gets the module ID map of the open device More...
 
int getModuleSerialNo (int iModuleId, unsigned long *puiValue)
 
int getModuleState (int iModuleId, unsigned long *puiState)
 
int getModuleType (int iModuleId, unsigned char *pucValue)
 
int getModuleVersion (int iModuleId, unsigned short *puiValue)
 
int getMotorCurrent (int iModuleId, float *pfValue)
 
int getMotorOvershootTime (int iModuleId, long *piValue)
 
int getMotorSupply (int iModuleId, float *pfValue)
 
int getMotorUndershootTime (int iModuleId, long *piValue)
 
const char * getName ()
 gets the name string of the open device More...
 
int getNomCurOvershootTime (int iModuleId, long *piValue)
 
int getNominalMotorCurrent (int iModuleId, float *pfValue)
 
int getPos (int iModuleId, float *pfPos)
 
int getPosCountInc (int iModuleId, long *piValue)
 
int getPosInc (int iModuleId, long *piValue)
 
int getRawLogicSupply (int iModuleId, short *piValue)
 
int getRawMotorCurrent (int iModuleId, short *piValue)
 
int getRawMotorSupply (int iModuleId, short *piValue)
 
int getRawTemperature (int iModuleId, short *piValue)
 
const char * getRevision ()
 gets the revision string of the class More...
 
int getSavePos (int iModuleId, float *pfValue)
 
int getStateDioPos (int iModuleId, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
 
int getStateInternal (int iModuleId, unsigned long *pBytes)
 
int getSyncTime (int iModuleId, short *piValue)
 
int getTemperature (int iModuleId, float *pfValue)
 
int getVel (int iModuleId, float *pfVel)
 
int getVelInc (int iModuleId, long *piValue)
 
int haltAll (void)
 
int haltModule (int iModuleId)
 
int homeAll (void)
 
int homeModule (int iModuleId)
 
int moveCur (int iModuleId, float fCur)
 
int moveCurExtended (int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
 
int moveCurInc (int iModuleId, long iCur)
 
int movePos (int iModuleId, float fPos)
 
int movePosExtended (int iModuleId, float fPos, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
 
int movePosInc (int iModuleId, long iPos)
 
int moveRamp (int iModuleId, float fPos, float fVel, float fAcc)
 
int moveRampExtended (int iModuleId, float fPos, float fVel, float fAcc, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
 
int moveRampInc (int iModuleId, long iPos, long iVel, long iAcc)
 
int moveStep (int iModuleId, float fPos, unsigned short uiTime)
 
int moveStepExtended (int iModuleId, float fPos, unsigned short uiTime, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
 
int moveStepInc (int iModuleId, long iPos, unsigned short uiTime)
 
int moveVel (int iModuleId, float fVel)
 
int moveVelExtended (int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
 
int moveVelInc (int iModuleId, long iVel)
 
CDeviceoperator= (const CDevice &rclDevice)
 
int recalcPIDParams (int iModuleId)
 
int resetAll (void)
 
int resetModule (int iModuleId)
 
int saveParameters (int iModuleId)
 
int savePosAll (void)
 
int serveWatchdogAll (void)
 
int setA0 (int iModuleId, short iValue)
 
int setBaudRateAll (unsigned char ucBaudRateId)
 
int setC0 (int iModuleId, short iValue)
 
int setConfig (int iModuleId, unsigned long puiValue)
 
int setCurrentLimit (int iModuleId, float fValue)
 
int setDamp (int iModuleId, short iValue)
 
int setDefAddress (int iModuleId, unsigned char uiValue)
 
int setDefBrakeTimeOut (int iModuleId, unsigned short uiValue)
 
int setDefCANBaudRate (int iModuleId, unsigned char uiValue)
 
int setDefCurRatio (int iModuleId, float fValue)
 
int setDefGearRatio (int iModuleId, float fValue)
 
int setDefHomeAcc (int iModuleId, float fValue)
 
int setDefIncPerTurn (int iModuleId, unsigned long uiValue)
 
int setDefLinRatio (int iModuleId, float fValue)
 
int setDefRSBaudRate (int iModuleId, unsigned char uiValue)
 
int setDefSetup (int iModuleId, unsigned long uiValue)
 
int setDioData (int iModuleId, unsigned long uiValue)
 
int setHMaxCurOvershootTime (int iModuleId, long iValue)
 
int setHomeOffset (int iModuleId, float fValue)
 
int setHomeOffsetInc (int iModuleId, long iValue)
 
int setHomeVel (int iModuleId, float fValue)
 
int setHomeVelInc (int iModuleId, long iValue)
 
void setInitString (const char *acInitString)
 
int setKpPWMLimit (int iModuleId, long iValue)
 
int setLoadDeltaTime (int iModuleId, unsigned short iValue)
 
int setLoadLimit (int iModuleId, long iValue)
 
int setLogicOvershootTime (int iModuleId, long iValue)
 
int setLogicUndershootTime (int iModuleId, long iValue)
 
int setMaxAcc (int iModuleId, float fValue)
 
int setMaxAccInc (int iModuleId, long iValue)
 
int setMaxCur (int iModuleId, float fValue)
 
int setMaxDeltaPos (int iModuleId, float fValue)
 
int setMaxDeltaPosInc (int iModuleId, long iValue)
 
int setMaximumMotorCurrent (int iModuleId, float fValue)
 
int setMaxLoadGradient (int iModuleId, long iValue)
 
int setMaxLogicVoltage (int iModuleId, float fValue)
 
int setMaxMotorVoltage (int iModuleId, float fValue)
 
int setMaxPos (int iModuleId, float fValue)
 
int setMaxPosInc (int iModuleId, long iValue)
 
int setMaxVel (int iModuleId, float fValue)
 
int setMaxVelInc (int iModuleId, long iValue)
 
int setMinLogicVoltage (int iModuleId, float fValue)
 
int setMinMotorVoltage (int iModuleId, float fValue)
 
int setMinPos (int iModuleId, float fValue)
 
int setMinPosInc (int iModuleId, long iValue)
 
int setModuleSerialNo (int iModuleId, unsigned long uiValue)
 
int setMotorOvershootTime (int iModuleId, long iValue)
 
int setMotorUndershootTime (int iModuleId, long iValue)
 
void setName (const char *acNameString)
 sets the baud rate of the device More...
 
int setNomCurOvershootTime (int iModuleId, long iValue)
 
int setNominalMotorCurrent (int iModuleId, float fValue)
 
int setRampAcc (int iModuleId, float fValue)
 
int setRampAccInc (int iModuleId, long iValue)
 
int setRampVel (int iModuleId, float fValue)
 
int setRampVelInc (int iModuleId, long iValue)
 
int setSyncTime (int iModuleId, short iValue)
 
int startMotionAll (void)
 
int updateModuleIdMap ()
 
int waitForHomeEnd (int iModuleId, unsigned long uiTimeOut=60000)
 
int waitForHomeEndAll (unsigned long uiTimeOut=60000)
 
int waitForMotionEnd (int iModuleId, unsigned long uiTimeOut=60000)
 
int waitForMotionEndAll (unsigned long uiTimeOut=60000)
 
int waitForRampDec (int iModuleId, unsigned long uiTimeOut=60000)
 
int waitForRampEnd (int iModuleId, unsigned long uiTimeOut=60000)
 
int waitForRampEndAll (unsigned long uiTimeOut=60000)
 
int waitForRampSteady (int iModuleId, unsigned long uiTimeOut=60000)
 
virtual int waitForStartMotionAll ()
 
int xack8Bytes (int iModuleId, void *pBytes)
 
int xmit8Bytes (int iModuleId, void *pBytes)
 
virtual ~CDevice ()
 destructor More...
 
- Public Member Functions inherited from CMessage
 CMessage (void)
 
 CMessage (const char *pcClassName, int iDebugLevel=0, bool bDebug=true, bool bDebugFile=false)
 
 CMessage (const CMessage &clMessage)
 
void debug (const int iDebugLevel, const char *pcDebugMessage,...) const
 
void error (const int iErrorCode, const char *pcErrorMessage,...) const
 
void error (const char *pcErrorMessage,...) const
 
int getDebugLevel () const
 
int initMessage (const char *pcClassName, int iDebuglevel=0, bool bDebug=true, bool bDebugFile=false)
 
void logging (const char *pcLoggingMessage,...)
 
CMessageoperator= (const CMessage &clMessage)
 
void setDebug (bool bFlag)
 
void setDebugFile (bool bFlag)
 
void setDebugLevel (int iLevel)
 
void setInitTime (void)
 
void warning (const char *pcWarningMessage,...) const
 
virtual ~CMessage (void)
 

Protected Member Functions

int clearReadQueue ()
 
int getDeviceError (int iErrorState)
 
int readDevice (CProtocolMessage &rclProtocolMessage)
 
int reinit (unsigned char ucBaudRateId)
 
int setBaudRate ()
 
int setMessageId (unsigned long uiMessageId)
 
int writeDevice (CProtocolMessage &rclProtocolMessage)
 
- Protected Member Functions inherited from CProtocolDevice
int getUnsignedLong (int iModuleId, unsigned long *puiData)
 
int printMessage (CProtocolMessage &rclProtocolMessage, bool read)
 
int readChar (int iModuleId, int iCommandId, int iParameterId, char *pcData)
 
int readFloat (int iModuleId, int iCommandId, int iParameterId, float *pfData)
 
int readFloatUnsignedChars (int iModuleId, int iCommandId, int iParameterId, float *pfData, unsigned char *pucData1, unsigned char *pucData2)
 
int readLong (int iModuleId, int iCommandId, int iParameterId, long *piData)
 
int readLongUnsignedChars (int iModuleId, int iCommandId, int iParameterId, long *piData, unsigned char *pucData1, unsigned char *pucData2)
 
int readShort (int iModuleId, int iCommandId, int iParameterId, short *piData)
 
int readUnsignedChar (int iModuleId, int iCommandId, int iParameterId, unsigned char *pucData)
 
int readUnsignedLong (int iModuleId, int iCommandId, int iParameterId, unsigned long *puiData)
 
int readUnsignedShort (int iModuleId, int iCommandId, int iParameterId, unsigned short *puiData)
 
int write8Bytes (int iModuleId, bool bAck, void *pBytes)
 
int writeAll (int iCommandId, int iParameterId)
 
int writeChar (int iModuleId, int iCommandId, int iParameterId, char cData)
 
int writeCommand (int iModuleId, int iCommandId)
 
int writeFloat (int iModuleId, int iCommandId, int iParameterId, float fData)
 
int writeFloatReadFloatUnsignedChars (int iModuleId, int iCommandId, int iParameterId, float fData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)
 
int writeFloatShort (int iModuleId, int iCommandId, int iParameterId, float fData, short iData)
 
int writeFloatShortReadFloatUnsignedChars (int iModuleId, int iCommandId, int iParameterId, float fData, short iData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)
 
int writeLong (int iModuleId, int iCommandId, int iParameterId, long iData)
 
int writeLongReadLongUnsignedChars (int iModuleId, int iCommandId, int iParameterId, long iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)
 
int writeLongShort (int iModuleId, int iCommandId, int iParameterId, long iData1, short iData2)
 
int writeLongShortReadLongUnsignedChars (int iModuleId, int iCommandId, int iParameterId, long iData1, short iData2, long *piData, unsigned char *pucData1, unsigned char *pucData2)
 
int writeShort (int iModuleId, int iCommandId, int iParameterId, short iData)
 
int writeShortReadLongUnsignedChars (int iModuleId, int iCommandId, int iParameterId, short iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)
 
int writeUnsignedChar (int iModuleId, int iCommandId, int iParameterId, unsigned char ucData)
 
int writeUnsignedLong (int iModuleId, int iCommandId, int iParameterId, unsigned long uiData)
 
int writeUnsignedShort (int iModuleId, int iCommandId, int iParameterId, unsigned short uiData)
 
- Protected Member Functions inherited from CDevice
void charStateToLongState (unsigned char uiShort, unsigned long *puiState)
 

Protected Attributes

CStopWatch m_clTimer
 
int m_iDeviceId
 
unsigned long m_uiBaudRate
 
unsigned long m_uiTimeOut
 
- Protected Attributes inherited from CProtocolDevice
CStopWatch m_clTimer
 
CRITICAL_SECTION m_csDevice
 
- Protected Attributes inherited from CDevice
char m_acInitString [128]
 
char m_acName [128]
 
char m_acRevision [20]
 
std::vector< int > m_aiModuleId
 
std::vector< unsigned short > m_auiModuleVersion
 
bool m_bInitFlag
 
CStopWatch m_clTimer
 
int m_iBaudRate
 
int m_iErrorState
 
int m_iModuleCount
 
int m_iModuleCountMax
 
- Protected Attributes inherited from CMessage
char m_acClassName [50]
 
bool m_bDebug
 
bool m_bDebugFile
 
int m_iDebugLevel
 

Additional Inherited Members

- Static Public Member Functions inherited from CMessage
static void setCriticalSection (CRITICAL_SECTION *cs)
 
- Static Protected Attributes inherited from CMessage
static double m_fInitTime
 

Detailed Description

Definition at line 40 of file RS232Device.h.

Constructor & Destructor Documentation

CRS232Device::CRS232Device ( )

default constructor

Definition at line 446 of file RS232Device.cpp.

CRS232Device::CRS232Device ( const CRS232Device rclRS232Device)

copy constructor

Definition at line 451 of file RS232Device.cpp.

CRS232Device::~CRS232Device ( )
virtual

destructor

Definition at line 456 of file RS232Device.cpp.

Member Function Documentation

int CRS232Device::clearReadQueue ( )
protectedvirtual

Implements CProtocolDevice.

Definition at line 67 of file RS232Device.cpp.

int CRS232Device::exit ( )
virtual

Implements CDevice.

Definition at line 751 of file RS232Device.cpp.

int CRS232Device::getDeviceError ( int  iErrorState)
protected

Definition at line 49 of file RS232Device.cpp.

int CRS232Device::init ( )
virtual

Implements CDevice.

Definition at line 502 of file RS232Device.cpp.

int CRS232Device::init ( const char *  acInitString)
virtual

Implements CDevice.

Definition at line 507 of file RS232Device.cpp.

CRS232Device & CRS232Device::operator= ( const CRS232Device rclRS232Device)

Definition at line 467 of file RS232Device.cpp.

int CRS232Device::readDevice ( CProtocolMessage rclProtocolMessage)
protectedvirtual

Implements CProtocolDevice.

Definition at line 79 of file RS232Device.cpp.

int CRS232Device::reinit ( unsigned char  ucBaudRateId)
protectedvirtual

Implements CProtocolDevice.

Definition at line 73 of file RS232Device.cpp.

int CRS232Device::setBaudRate ( )
protected

Definition at line 55 of file RS232Device.cpp.

int CRS232Device::setMessageId ( unsigned long  uiMessageId)
protectedvirtual

Implements CProtocolDevice.

Definition at line 61 of file RS232Device.cpp.

void CRS232Device::setQueueSize ( unsigned short  uiQueueSize)
void CRS232Device::setTimeOut ( unsigned long  uiTimeOut)

Definition at line 485 of file RS232Device.cpp.

int CRS232Device::writeDevice ( CProtocolMessage rclProtocolMessage)
protectedvirtual

Implements CProtocolDevice.

Definition at line 329 of file RS232Device.cpp.

Member Data Documentation

CStopWatch CRS232Device::m_clTimer
protected

Definition at line 64 of file RS232Device.h.

int CRS232Device::m_iDeviceId
protected

Definition at line 61 of file RS232Device.h.

unsigned long CRS232Device::m_uiBaudRate
protected

Definition at line 62 of file RS232Device.h.

unsigned long CRS232Device::m_uiTimeOut
protected

Definition at line 63 of file RS232Device.h.


The documentation for this class was generated from the following files:


schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Mon Nov 25 2019 03:48:19