00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #if !defined(_FEDM_FUNCTIONS_H_INCLUDED_)
00033 #define _FEDM_FUNCTIONS_H_INCLUDED_
00034
00035
00036 #ifdef _MSC_VER
00037
00038
00039
00040 #pragma warning(disable:4786) // for MFC
00041 #endif
00042
00043
00044
00045 #include <string>
00046 #include "FEDM.h"
00047
00048
00049 using namespace std;
00050
00051
00052
00053 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_GetMemIDOfID(const char* ID);
00054 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_GetAdrOfID(const char* ID, int BlockSize);
00055 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_GetBlockNoOfID(const char* ID);
00056 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_GetByteCntOfID(const char* ID);
00057
00058
00059 _FEDM_ISC_CORE_EXT_FUNCT char* FEDM_ToRAM(const char* ID);
00060 _FEDM_ISC_CORE_EXT_FUNCT char* FEDM_ToMask(const char* ID);
00061 _FEDM_ISC_CORE_EXT_FUNCT char* FEDM_MdfyMemID(const char* ID, int iNewMemID);
00062 _FEDM_ISC_CORE_EXT_FUNCT char* FEDM_MdfyBlockNr(const char* ID, int iBlockNr);
00063 _FEDM_ISC_CORE_EXT_FUNCT char* FEDM_AddOff2BlockNr(const char* ID, int iOffset);
00064
00065 _FEDM_ISC_CORE_EXT_FUNCT unsigned int FEDM_SwapByteOrder(unsigned int uiValue);
00066 _FEDM_ISC_CORE_EXT_FUNCT __int64 FEDM_SwapByteOrder(__int64 i64Value);
00067
00068
00069 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00070 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToInt(CString sInStr, int* iOut);
00071 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToUInt(CString sInStr, unsigned int* uiOut);
00072 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToInt64(CString sInStr, __int64* i64Out);
00073 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToUInt64(CString sInStr, unsigned __int64* ui64Out);
00074 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToHexUChar(CString sInStr, unsigned char* ucOutBuf, int iOutBufLen);
00075 #endif
00076
00077 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToInt(string sInStr, int* iOut);
00078 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToUInt(string sInStr, unsigned int* uiOut);
00079 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToInt64(string sInStr, __int64* i64Out);
00080 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToUInt64(string sInStr, unsigned __int64* ui64Out);
00081 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexStrToHexUChar(string sInStr, unsigned char* ucOutBuf, int iOutBufLen);
00082
00083 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToInt(unsigned char* ucInBuf, int iBufLen, int* iOut);
00084 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToUInt(unsigned char* ucInBuf, int iBufLen, unsigned int* uiOut);
00085 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToInt64(unsigned char* ucInBuf, int iBufLen, __int64* i64Out);
00086 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToUInt64(unsigned char* ucInBuf, int iBufLen, unsigned __int64* ui64Out);
00087 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToHexChar(unsigned char* ucInBuf, int iBufLen, char* cOut, int iOutBufLen);
00088 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToHexStr(unsigned char* ucInBuf, int iBufLen, string& sOut);
00089 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00090 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToHexStr(unsigned char* ucInBuf, int iBufLen, CString& sOut);
00091 #endif
00092
00093 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexCharToInt(char* cInBuf, int iBufLen, int* iOut);
00094 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexCharToUInt(char* cInBuf, int iBufLen, unsigned int* uiOut);
00095 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexCharToInt64(char* cInBuf, int iBufLen, __int64* i64Out);
00096 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexCharToUInt64(char* cInBuf, int iBufLen, unsigned __int64* ui64Out);
00097 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexCharToHexUChar(char* cInBuf, int iBufLen, unsigned char* ucOutBuf, int iOutBufLen);
00098
00099 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00100 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvIntToHexStr(int iIn, CString& sOut);
00101 #endif
00102 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvIntToHexStr(int iIn, string& sOut);
00103 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvIntToHexChar(int iIn, char* cOutBuf, int iOutBufLen);
00104 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvIntToHexUChar(int iIn, unsigned char* ucOutBuf, int iOutBufLen);
00105
00106 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00107 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUIntToHexStr(unsigned int uiIn, CString& sOut);
00108 #endif
00109 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUIntToHexStr(unsigned int uiIn, string& sOut);
00110 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUIntToHexChar(unsigned int uiIn, char* uOutBuf, int iOutBufLen);
00111 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUIntToHexUChar(unsigned int uiIn, unsigned char* ucOutBuf, int iOutBufLen);
00112
00113 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00114 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvInt64ToHexStr(__int64 i64In, CString& sOut);
00115 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUInt64ToHexStr(unsigned __int64 ui64In, CString& sOut);
00116 #endif
00117 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvInt64ToHexStr(__int64 i64In, string& sOut);
00118 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUInt64ToHexStr(unsigned __int64 ui64In, string& sOut);
00119 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvInt64ToHexChar(__int64 i64In, char* cOutBuf, int iOutBufLen);
00120 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUInt64ToHexChar(unsigned __int64 ui64In, char* cOutBuf, int iOutBufLen);
00121 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvInt64ToHexUChar(__int64 i64In, unsigned char* ucOutBuf, int iOutBufLen);
00122 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvUInt64ToHexUChar(unsigned __int64 ui64In, unsigned char* ucOutBuf, int iOutBufLen);
00123
00124 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvAsciiCharToHexUChar(unsigned char* ucInBuf, int iInBufLen, unsigned char* ucOutBuf, int iOutBufLen);
00125 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvBcdCharToHexUChar(unsigned char* ucInBuf, int iInBufLen, unsigned char* ucOutBuf, int iOutBufLen);
00126 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_ConvHexUCharToBcdChar(unsigned char* ucInBuf, int iInBufLen, unsigned char* ucOutBuf, int iOutBufLen);
00127
00128
00129
00130 _FEDM_ISC_CORE_EXT_FUNCT unsigned char FEDM_ConvTwoAsciiToUChar(unsigned char uc0, unsigned char uc1);
00131 _FEDM_ISC_CORE_EXT_FUNCT void FEDM_ConvHexUCharToTwoAscii(unsigned char ucIn, unsigned char& ucOut1, unsigned char& ucOut2);
00132
00133 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00134 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_RemNoHexChar(CString sIn, unsigned char* ucOutBuf, int iOutBufLen);
00135 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_RemNoHexChar(CString sIn, CString& sOut);
00136 _FEDM_ISC_CORE_EXT_FUNCT CString FEDM_RemNoHexChar(CString sIn);
00137 _FEDM_ISC_CORE_EXT_FUNCT bool FEDM_IsHex(CString sIn);
00138 #endif
00139
00140 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_RemNoHexChar(string sIn, unsigned char* ucOutBuf, int iOutBufLen);
00141 _FEDM_ISC_CORE_EXT_FUNCT int FEDM_RemNoHexChar(string sIn, string& sOut);
00142 _FEDM_ISC_CORE_EXT_FUNCT bool FEDM_IsHex(string sIn);
00143
00144 _FEDM_ISC_CORE_EXT_FUNCT __int64 FEDM_GetUTCTimestamp();
00145
00146 #undef DLL_EXT_FUNC
00147
00148 #endif // #if !defined(_FEDM_FUNCTIONS_H_INCLUDED_)
00149