#include "Tools.h"#include "Xstring.h"Include dependency graph for Tools.cpp:

Go to the source code of this file.
Functions | |||||||
| std::string | GetDeviceState (int iDeviceState) | ||||||
| string | itos (int i) | ||||||
| Tool method to convert a int to a string. | |||||||
| string | ltos (long l) | ||||||
| Tool method to convert a long to a string. | |||||||
| string | dtos (double d) | ||||||
| Tool method to convert a double to a string. | |||||||
| double | RadiansToDegres (double dRadians) | ||||||
| Method to change an angle from radians to degres The equation used is
| |||||||
| double | DegresToRadians (double dDegres) | ||||||
| Method to change an angle from degres to radians The equation used is
| |||||||
| double | BrasSinus (double dL, double dAngle) | ||||||
| Method to convert an angle movement to a translation movement The angle must be in radians ! The equation used is :
with : | |||||||
| double | InverseBrasSinus (double dL, double dTranslation) | ||||||
| Method to convert a translation movement to a angle movement The angle computed is given in radians ! The equation used is :
with :
| |||||||
| double | BrasTangente (double dL, double dAngle) | ||||||
| Method to convert an angle movement to a translation movement The angle must be in radians ! The equation used is :
with : | |||||||
| double | InverseBrasTangente (double dL, double dTranslation) | ||||||
| Method to convert a translation movement to a angle movement The angle computed is given in radians ! The equation used is :
with :
| |||||||
|
||||||||||||
|
Method to convert an angle movement to a translation movement
with :
Definition at line 100 of file Tools.cpp.
|
|
||||||||||||
|
Method to convert an angle movement to a translation movement
with :
Definition at line 132 of file Tools.cpp.
|
|
|
Method to change an angle from degres to radians The equation used is
.
Definition at line 89 of file Tools.cpp. References MATH_CONSTANT::PI. 00090 { 00091 return dDegres * MATH_CONSTANT::PI / 180.0; 00092 }
|
|
|
Tool method to convert a double to a string.
Definition at line 75 of file Tools.cpp. References XString< T >::convertToString(). Referenced by IllegalArgumentException::makeDescription(), SquareRootException::makeDescription(), TrigonometricValueOutOfBoundException::makeDescription(), and ValueOutOfBoundException::makeDescription(). 00076 { 00077 return XString<double>::convertToString(d); 00078 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 8 of file Tools.cpp. 00009 { 00010 00011 switch (iDeviceState) 00012 { 00013 case 0: 00014 return "ON"; 00015 break; 00016 case 1: 00017 return "OFF"; 00018 break; 00019 case 2: 00020 return "CLOSE"; 00021 break; 00022 case 3: 00023 return "OPEN"; 00024 break; 00025 case 4: 00026 return "INSERT"; 00027 break; 00028 case 5: 00029 return "EXTRACT"; 00030 break; 00031 case 6: 00032 return "MOVING"; 00033 break; 00034 case 7: 00035 return "STANDBY"; 00036 break; 00037 case 8: 00038 return "FAULT"; 00039 break; 00040 case 9: 00041 return "INIT"; 00042 break; 00043 case 10: 00044 return "RUNNING"; 00045 break; 00046 case 11: 00047 return "ALARM"; 00048 break; 00049 case 12: 00050 return "DISABLE"; 00051 break; 00052 case 13: 00053 return "UNKNOW"; 00054 break; 00055 default: 00056 return "NO COMMUNICATION / UNDEFINED"; 00057 break; 00058 } 00059 }
|
|
||||||||||||
|
Method to convert a translation movement to a angle movement
with :
Definition at line 114 of file Tools.cpp. 00115 { 00116 // if (dL == 0.0) throw DivideByZeroException("Inverse Bras Sinus","L","InverseBrasSinus()",__FILE__,__LINE__); 00117 double dQuotient = dTranslation/dL; 00118 // if ((-1.0 > dQuotient) || (dQuotient > 1.0)) throw TrigonometricValueOutOfBoundException("Inverse Bras Sinus",dQuotient,-1.0,1.0,"Arcsin","InverseBrasSinus()",__FILE__,__LINE__); 00119 00120 return asin(dQuotient); 00121 }
|
|
||||||||||||
|
Method to convert a translation movement to a angle movement
with :
Definition at line 146 of file Tools.cpp. 00147 { 00148 // if (dL == 0.0) throw DivideByZeroException("Inverse Bras Sinus","L","InverseBrasSinus()",__FILE__,__LINE__); 00149 00150 // double dQuotient = dTranslation/dL; 00151 00152 // if ((-1.0 > dQuotient) || (dQuotient > 1.0)) throw TrigonometricValueOutOfBoundException("Inverse Bras Sinus",dQuotient,-1.0,1.0,"Arcsin","InverseBrasSinus()",__FILE__,__LINE__); 00153 00154 double dQuotient = dTranslation/dL; 00155 return atan(dQuotient); 00156 00157 // double dQuotient = dTranslation/dL; 00158 // return atan2(dTranslation,dL); 00159 00160 00161 }
|
|
|
Tool method to convert a int to a string.
Definition at line 63 of file Tools.cpp. References XString< T >::convertToString(). 00064 { 00065 return XString<int>::convertToString(i); 00066 }
Here is the call graph for this function: ![]() |
|
|
Tool method to convert a long to a string.
Definition at line 69 of file Tools.cpp. References XString< T >::convertToString(). Referenced by IndexOutOfBoundException::makeDescription(), DivideByZeroException::makeOrigin(), FileNotFoundException::makeOrigin(), IllegalArgumentException::makeOrigin(), IndexOutOfBoundException::makeOrigin(), InfinityException::makeOrigin(), NoSuchElementException::makeOrigin(), NotAllowedOperationException::makeOrigin(), NullPointerException::makeOrigin(), ParseException::makeOrigin(), SquareRootException::makeOrigin(), TrigonometricValueOutOfBoundException::makeOrigin(), and ValueOutOfBoundException::makeOrigin(). 00070 { 00071 return XString<long>::convertToString(l); 00072 }
Here is the call graph for this function: ![]() |
|
|
Method to change an angle from radians to degres The equation used is
.
Definition at line 82 of file Tools.cpp. References MATH_CONSTANT::PI. 00083 { 00084 return dRadians * 180.0 / MATH_CONSTANT::PI; 00085 }
|
1.4.5