Go to the documentation of this file.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_ISC_FUNCTION_UNIT_H_INCLUDED_)
00033 #define _FEDM_ISC_FUNCTION_UNIT_H_INCLUDED_
00034
00035 #ifdef _MSC_VER
00036
00037
00038
00039 #pragma warning(disable:4786) // for MFC
00040 #endif
00041
00042
00043 #if !defined(_FEDM_NO_FU_SUPPORT)
00044
00045 #include "../../FEDM_Base.h"
00046 #include <vector>
00047
00048 class FEDM_ISCReader;
00049 class FEDM_ISCFunctionUnit;
00050
00051
00052
00053 using namespace std;
00054
00055
00056
00057
00058
00059
00060
00061 #define FEDM_ISC_FU_MAX_TMPDATA_MEM 128 // memory for temporary data
00062
00063
00064
00065 #define FEDM_ISC_FU_TYPE_NONE 0x00
00066 #define FEDM_ISC_FU_TYPE_ANT 0x01
00067 #define FEDM_ISC_FU_TYPE_MUX 0x0A
00068 #define FEDM_ISC_FU_TYPE_DAT 0x0B
00069
00070
00071 #define FEDM_ISC_FU_TYPE_UMUX 0x0C
00072
00073
00074
00075
00076
00077
00078
00079 typedef vector<FEDM_ISCFunctionUnit*> FEDM_FU_ARRAY;
00080 typedef vector<FEDM_ISCFunctionUnit*>::iterator FEDM_FU_ARRAY_ITOR;
00081
00082
00083
00084
00085
00086
00087
00088 class _FEDM_ISC_CORE_EXT_CLASS FEDM_ISCFunctionUnit
00089 {
00090
00091 public:
00092
00093
00094 FEDM_ISCFunctionUnit(FEDM_ISCReader* pReader, int iFUType = FEDM_ISC_FU_TYPE_NONE);
00095
00096
00097 virtual ~FEDM_ISCFunctionUnit();
00098
00099
00100 int GetFUType();
00101 int SetFUType(int iFUType);
00102
00103
00104 unsigned int GetAntNo();
00105 void SetAntNo(unsigned int uiAntNo);
00106
00107
00108 int SetModuleHnd(int iHandle);
00109 int GetModuleHnd();
00110
00111
00112
00113
00114
00115 void SetManageChildMode(bool bDeleteInternal);
00116
00117 FEDM_ISCReader* GetReader();
00118
00119
00120 int SendProtocol(unsigned char ucCmdByte);
00121
00122
00123 int GetLastError();
00124
00125 unsigned char GetLastStatus();
00126
00127
00128 int GetErrorText(char* cErrorText, int iErrorCode);
00129
00130 int GetStatusText(char* cStatusText, unsigned char ucStatus);
00131
00132
00133 int AddChild(int iOutNo, FEDM_ISCFunctionUnit* pFU);
00134 int DelChild(int iOutNo);
00135 int DelChildList();
00136 int GetChildCount();
00137 FEDM_ISCFunctionUnit* GetChild(int iOutNo);
00138
00139
00140
00141 int GetData( char* ID, bool* Data );
00142 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00143 int GetData( char* ID, BOOL* Data );
00144 #endif
00145 int GetData( char* ID, unsigned char* Data );
00146 int GetData( char* ID, unsigned char* Data, int ParaAnz );
00147 int GetData( char* ID, unsigned int* Data );
00148 int GetData( char* ID, __int64* Data);
00149 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00150 int GetData( char* ID, CString& Data );
00151 #endif
00152 int GetData( char* ID, string& Data );
00153 int GetData( char* ID, char* Data, int DataLen );
00154
00155 int SetData( char* ID, bool Data );
00156 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00157 int SetData( char* ID, BOOL Data );
00158 #endif
00159 int SetData( char* ID, unsigned char Data );
00160 int SetData( char* ID, unsigned char* Data, int ParaAnz );
00161 int SetData( char* ID, unsigned int Data );
00162 int SetData( char* ID, __int64 Data);
00163 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00164 int SetData( char* ID, CString Data );
00165 #endif
00166 int SetData( char* ID, string Data );
00167 int SetData( char* ID, char* Data, int DataLen );
00168
00169
00170
00171 protected:
00172 void SetLastError(int iError);
00173
00174
00175
00176 public:
00177
00178
00179 FEDM_BYTE_ARRAY TmpData;
00180
00181
00182 protected:
00183
00184 FEDM_ISCReader* m_pReader;
00185
00186
00187 int m_iReaderHnd;
00188 unsigned char m_ucBusAdr;
00189
00190 int m_iLastError;
00191 unsigned char m_ucLastStatus;
00192
00193 bool m_bManageChilds;
00194
00195 int m_iFUType;
00196 FEDM_FU_ARRAY m_ChildList;
00197
00198 unsigned int m_uiAntNo;
00199
00200
00201 int m_iModuleHandle;
00202 };
00203
00204
00205 #endif // #if !defined(_FEDM_NO_FU_SUPPORT)
00206
00207 #endif // !defined(_FEDM_ISC_FUNCTION_UNIT_H_INCLUDED_)