FEDM_ISCReader.h
Go to the documentation of this file.
00001 /*-------------------------------------------------------
00002 |                                                       |
00003 |                  FEDM_ISCReader.h                     |
00004 |                                                       |
00005 ---------------------------------------------------------
00006 
00007 Copyright © 2000-2014   FEIG ELECTRONIC GmbH, All Rights Reserved.
00008                                                 Lange Strasse 4
00009                                                 D-35781 Weilburg
00010                                                 Federal Republic of Germany
00011                                                 phone    : +49 6471 31090
00012                                                 fax      : +49 6471 310999
00013                                                 e-mail   : obid-support@feig.de
00014                                                 Internet : http://www.feig.de
00015                                         
00016 Author                  :       Markus Hultsch
00017 Begin                   :       07.06.2000
00018 
00019 Version                 :       04.06.01 / 03.03.2014 / M. Hultsch
00020                                                 - new overload method Set_0x6E_ReaderDiagnosticData
00021 
00022                                                 04.05.05 / 04.11.2013 / M. Hultsch
00023                                                 - new reader: ID ISC.PRH200
00024 
00025                                                 04.05.04 / 03.09.2013 / M. Hultsch
00026                                                 - new reader: ID ISC.LRU1002
00027 
00028                                                 04.04.03 / 05.03.2013 / M. Hultsch
00029                                                 - new method: GetDependentLibVersions
00030 
00031                                                 04.03.01 / 10.09.2012 / M. Hultsch
00032                                                 - new methods: SetCommandPara/GetCommandPara
00033 
00034                                                 04.02.05 / 05.07.2012 / M. Hultsch
00035                                                 - new reader: ID CPR.20
00036 
00037                                                 04.02.04 / 21.06.2012 / M. Hultsch
00038                                                 - UHF Class1 Gen2: support for [0xB3][0x25] Block Permalock and [0xB3][0x26] Read Permalock Status
00039 
00040                                                 04.00.09 / 23.01.2012 / M. Hultsch
00041                                                 - new reader: ID ISC.LR1002
00042 
00043                                                 03.03.01 / 08.04.2011 / M. Hultsch
00044                                                 - new reader ID ISC.MRU102 added
00045                                                 - new TagHandler classes for ISO 15693 IDS SL13A
00046                                                   and EPC Class1 Gen2 IDS SL900A
00047 
00048                                                 03.02.07 / 25.10.2010 / M. Hultsch
00049                                                 - non-addressed with taghandler
00050 
00051                                                 03.02.05 / 08.09.2010 / M. Hultsch
00052                                                 - support for [0xC3] DESFire Command
00053 
00054                                                 03.02.04 / 17.08.2010 / M. Hultsch
00055                                                 - ID CPR30.xx added
00056 
00057                                                 03.01.06 / 10.05.2010 / M. Hultsch
00058                                                 - FindBaudRate with new parameters
00059 
00060                                                 03.01.02 / 18.03.2010 / M. Hultsch
00061                                                 - handling of new USB enumeration after [0x64] System Reset
00062 
00063                                                 03.01.01 / 25.02.2010 / M. Hultsch
00064                                                 - support for peripheral devices
00065 
00066                                                 03.00.13 / 07.10.2009 / M. Hultsch
00067                                                 - ID MAX50.xx added
00068                                                 - [0xBx] Host Commands in non-addressed mode from table index > 0
00069 
00070                                                 03.00.12 / 24.08.2009 / M. Hultsch
00071 
00072 Operation Systems       :       independent
00073 
00074 Function                        :       classes for OBID i-scan® and OBID® classic-pro reader family
00075 
00076 
00077 Trademarks:
00078 -----------
00079 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00080 Other Trademarks: see FEDM.h
00081 */
00082 
00083 #if !defined(_FEDM_ISCREADER_H_INCLUDED_)
00084 #define _FEDM_ISCREADER_H_INCLUDED_
00085 
00086 
00087 #include "../FEDM_DataBase.h"
00088 #include "FEDM_ISC.h"
00089 #include "FEDM_ISCReaderInfo.h"
00090 #include "FEDM_ISCReaderDiagnostic.h"
00091 
00092 
00093 class FEDM_BRMTabItem;                          // class for buffered read mode
00094 class FEDM_ISOTabItem;                          // class for iso host mode
00095 class FEDM_CADItem;                                     // class for channel analyze measurement data
00096 class FEDM_ISCReader;                           // main reader class
00097 class FEDM_XMLReaderCfgDataModul;       // class for xml serialization
00098 class FedmIscMyAxxessReader;
00099 #if !defined(_FEDM_NO_PD_SUPPORT)
00100         class FedmIscPeripheralDevice;
00101 #endif
00102 #ifdef _FEDM_TAG_HANDLER
00103         class FedmIscTagHandler_ISO14443_4;
00104 #endif
00105 
00106 
00107 //#####################################################################################
00108 // structure for measurement data
00109 // (only for use inside FEDM_CADTable)
00110 //#####################################################################################
00111 
00112 
00113 #if !defined(__BORLANDC__)
00114 typedef struct _FEDM_ISC_STRUCT_CAD_HISTORY
00115 {
00116         unsigned int    uiAlloc;
00117         unsigned char   ucTxChannel;
00118         unsigned char   ucRxChannel;
00119 
00120         // initialization
00121         _FEDM_ISC_STRUCT_CAD_HISTORY() :        uiAlloc(0),
00122                                                                                 ucTxChannel(0),
00123                                                                                 ucRxChannel(0)
00124                                                                                 {}
00125 
00126 } FEDM_ISC_STRUCT_CAD_HISTORY;
00127 #endif
00128 
00129 
00130 //####################################################################
00131 // type declarations
00132 //####################################################################
00133 
00134 typedef vector<FEDM_BRMTabItem*>                                                FEDM_BRMTAB_ARRAY;
00135 typedef vector<FEDM_BRMTabItem*>::iterator                              FEDM_BRMTAB_ARRAY_ITOR;
00136 typedef vector<FEDM_ISOTabItem*>                                                FEDM_ISOTAB_ARRAY;
00137 typedef vector<FEDM_ISOTabItem*>::iterator                              FEDM_ISOTAB_ARRAY_ITOR;
00138 #if !defined(__BORLANDC__)
00139 typedef vector<FEDM_ISC_STRUCT_CAD_HISTORY*>                    FEDM_CAD_HISTORY_ARRAY;
00140 typedef vector<FEDM_ISC_STRUCT_CAD_HISTORY*>::iterator  FEDM_CAD_HISTORY_ARRAY_ITOR;
00141 #endif
00142 
00143 #if !defined(_FEDM_NO_PD_SUPPORT)
00144 typedef map<unsigned char, FedmIscPeripheralDevice*>                            FEDM_PD_MAP;
00145 typedef map<unsigned char, FedmIscPeripheralDevice*>::iterator          FEDM_PD_MAP_ITOR;
00146 #endif
00147 
00148 
00149 //#####################################################################################
00150 // class FEDM_CADTable (only for use inside FEDM_ISCReader-class)
00151 // collects measurement data transfered with [0x68] Channel Analyze
00152 //#####################################################################################
00153 
00154 #if !defined(__BORLANDC__)
00155 class _FEDM_ISC_CORE_EXT_CLASS FEDM_CADTable
00156 {
00157 public:
00158         FEDM_CADTable();
00159         ~FEDM_CADTable();
00160 
00161         void Init();                            // set all data members to 0
00162                                                                 // and clear allocated memory
00163 
00164         bool m_bValid;                          // indicator, that table contains valid data
00165         unsigned char m_ucMode;                         // mode byte of [0x68] Channel Analyze
00166                                                                 // CH_POWER flag or CH_HISTORY flag must be set
00167 
00168         // memory for power data
00169         unsigned char m_ucPowerAvg[15];         // average power value for each channel
00170         unsigned char m_ucPowerPeak[15];        // peak power value for each channel
00171 
00172         // memory for history data
00173         FEDM_CAD_HISTORY_ARRAY m_History;
00174 
00175         // memory for different data
00176         long m_nData[4];
00177 };
00178 #endif
00179 
00180 
00181 
00182 //####################################################################
00183 // class FEDM_ISCReader
00184 //####################################################################
00185 
00186 class _FEDM_ISC_CORE_EXT_CLASS FEDM_ISCReader : public FEDM_DataBase
00187 {
00188 // public methods
00189 public:
00190 
00191         // friend classes have access rights to protected members
00192         friend class FEDM_ISOTabItem;
00193         friend class FedmIscMyAxxessReader;
00194 #ifdef _FEDM_TAG_HANDLER
00195         friend class FedmIscTagHandler_ISO14443_4;
00196 #endif
00197 #if defined(_FEDM_ISC_NEW_CORE_DLL)
00198         //friend class OBID::FEDM::Core::IAsyncGroup;
00199 #endif
00200 
00201         FEDM_ISCReader();                       // constructor
00202         virtual ~FEDM_ISCReader();      // destructor
00203 
00204         // check version numbers of dependent libraries
00205         virtual int EvalLibDependencies(string& sMessage);
00206         string GetDependentLibVersions();
00207 
00208         // main function for XML serialization
00209         virtual int Serialize(bool bRead, char* sFileName);
00210 
00211 #ifdef _FEDM_MFC_SUPPORT
00212         // for proprietary file-I/O
00213         virtual int Serialize(CArchive& ar, int iMemType);
00214 #endif
00215 
00216         // main communication method
00217         virtual int SendProtocol(unsigned char ucCmdByte);
00218 
00219         FEDM_ISC_READER_INFO*           GetReaderInfo()                         { return &m_ReaderInfo; }
00220         FEDM_ISC_READER_DIAGNOSTIC* GetReaderDiagnostic()               { return &m_ReaderDiagnostic; }
00221 
00222         // set the port handle in reader object of FEISC
00223         // must be done before use of all other methods
00224         virtual int SetPortHnd(int iPortHnd);
00225         virtual int GetPortHnd();
00226 
00227         virtual int SetReaderType(unsigned int uiReaderType);
00228         char* GetReaderName();
00229         char* GetReaderName(unsigned int uiReaderType);
00230         void SetOemReaderNames( map<unsigned int, string> mapOemNames,
00231                                                         map<unsigned int, string> mapOemNames4ReaderVariants );
00232 
00233         void DisableReadCfgBeforeWriteCfg(bool bFlag)           { m_bDisableReadCfgBeforeWriteCfg = bFlag; }
00234         void EnableTagHandler(bool bFlag)                                       { m_bEnableTagHandler = bFlag; }
00235 #ifdef _FEDM_TAG_HANDLER
00236         void SetTagHandlerOption(string sParameter, string sValue);
00237 #endif
00238 
00239         char* GetTagName(unsigned char ucTagType);
00240 
00241         // change the protocol type (STANDARD or ADVANCED)
00242         // STANDARD is preset
00243         virtual int SetProtocolFrameSupport(unsigned int uiType);
00244         virtual int GetProtocolFrameSupport();
00245 
00246         // get the last protocol string (frame and data)
00247         virtual int GetLastProt(char* sID, char* sProt);
00248         // get the last error code
00249         virtual int GetLastError();
00250         // get the last status byte
00251         virtual int GetLastStatus();
00252         
00253         // get error text
00254         int             GetErrorText(char* cErrorText, int iErrorCode);
00255         char*   GetErrorText(int iErrorCode);
00256         // get status text
00257         int             GetStatusText(char* cStatusText, unsigned char ucStatus);
00258         char*   GetStatusText(unsigned char ucStatus);
00259 
00260         // method to find the baudrate and frame of reader
00261         virtual int FindBaudRate(bool* pStop = NULL, int iTimeout = 300, int iFrameSupport = 3, FEDM_CB_FIND_BAUDRATE cbFct=NULL, void* pAny=NULL);
00262 
00263         // main access methods
00264         int TestConfigPara( string sParaName );
00265         
00266         // methods for getting command parameter values
00267         int GetCommandPara( string sParaName, bool* Data );
00268 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00269         int GetCommandPara( string sParaName, BOOL* Data );
00270 #endif
00271         int GetCommandPara( string sParaName, unsigned char* Data );
00272         int GetCommandPara( string sParaName, unsigned char* Data, int DataLen );
00273         int GetCommandPara( string sParaName, unsigned int* Data );
00274         int GetCommandPara( string sParaName, __int64* Data );
00275 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00276         int GetCommandPara( string sParaName, CString Data );
00277 #endif
00278         int GetCommandPara( string sParaName, string Data );
00279         int GetCommandPara( string sParaName, char* Data, int DataLen );
00280         
00281         // methods for setting command parameter values
00282         int SetCommandPara( string sParaName, bool Data );
00283 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00284         int SetCommandPara( string sParaName, BOOL Data );
00285 #endif
00286         int SetCommandPara( string sParaName, unsigned char Data );
00287         int SetCommandPara( string sParaName, unsigned char* Data, int DataLen );
00288         int SetCommandPara( string sParaName, unsigned int Data );
00289         int SetCommandPara( string sParaName, __int64 Data );
00290 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00291         int SetCommandPara( string sParaName, CString Data );
00292 #endif
00293         int SetCommandPara( string sParaName, string Data );
00294         int SetCommandPara( string sParaName, char* Data, int DataLen );
00295 
00296         // methods for getting configuration parameter values
00297         int GetConfigPara( string sParaName, bool* Data, bool bEEPROM=true );
00298 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00299         int GetConfigPara( string sParaName, BOOL* Data, bool bEEPROM=true );
00300 #endif
00301         int GetConfigPara( string sParaName, unsigned char* Data, bool bEEPROM=true );
00302         int GetConfigPara( string sParaName, unsigned char* Data, int ParaAnz, bool bEEPROM=true );
00303         int GetConfigPara( string sParaName, unsigned int* Data, bool bEEPROM=true );
00304         int GetConfigPara( string sParaName, __int64* Data, bool bEEPROM=true );
00305 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00306         int GetConfigPara( string sParaName, CString& Data, bool bEEPROM=true );
00307 #endif
00308         int GetConfigPara( string sParaName, string& Data, bool bEEPROM=true );
00309         int GetConfigPara( string sParaName, char* Data, int DataLen, bool bEEPROM=true );
00310         
00311         // methods for setting configuration parameter values
00312         int SetConfigPara( string sParaName, bool Data, bool bEEPROM=true );
00313 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00314         int SetConfigPara( string sParaName, BOOL Data, bool bEEPROM=true );
00315 #endif
00316         int SetConfigPara( string sParaName, unsigned char Data, bool bEEPROM=true );
00317         int SetConfigPara( string sParaName, unsigned char* Data, int ParaAnz, bool bEEPROM=true );
00318         int SetConfigPara( string sParaName, unsigned int Data, bool bEEPROM=true );
00319         int SetConfigPara( string sParaName, __int64 Data, bool bEEPROM=true );
00320 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00321         int SetConfigPara( string sParaName, CString Data, bool bEEPROM=true );
00322 #endif
00323         int SetConfigPara( string sParaName, string Data, bool bEEPROM=true );
00324         int SetConfigPara( string sParaName, char* Data, int DataLen, bool bEEPROM=true );
00325 
00326         // get specific data from table
00327         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, bool* bData);
00328         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned char* ucData);
00329         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned char* ucData, int iDataBufLen);
00330         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned int* uiData);
00331         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, __int64* i64Data);
00332         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, char* cData, int iDataBufLen);
00333         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, string& sData);
00334 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00335         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, CString& sData);
00336 #endif
00337 
00338         // set specific data in table
00339         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, bool bData);
00340         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned char ucData);
00341         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned char* ucData, int iDataBufLen);
00342         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned int uiData);
00343         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, __int64 i64Data);
00344         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, string sData);
00345 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00346         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, CString sData);
00347 #endif
00348                 
00349         // get data block from table
00350         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, 
00351                                                          int iBlockNr, unsigned char* ucData, int iDataBufLen);
00352         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, 
00353                                                          int iBlockNr, string& sData);
00354         
00355 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00356         virtual int GetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, 
00357                                                          int iBlockNr, CString& sData);
00358 #endif
00359         
00360         // set data block in table
00361         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, 
00362                                                          int iBlockNr, unsigned char* ucData, int iDataBufLen);
00363         int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, 
00364                                          int iBlockNr, string sData);
00365         
00366 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00367         virtual int SetTableData(int iIdx, unsigned int uiTableID, unsigned int uiDataID, 
00368                                                          int iBlockNr, CString sData);
00369 #endif
00370         
00371         // verify read/write-data block(s) in table
00372         virtual int VerifyTableData(int iIdx, unsigned int uiTableID, int iBlockNr, int iBlockCnt);
00373         
00374         // copy complete byte arrays from source to destination inside a table
00375         // source/destination can be: FEDM_ISC_DATA_TxDB, FEDM_ISC_DATA_RxDB
00376         int CopyTableData(int iIdx, unsigned int uiTableID, int iSrcDataID, int iDstDataID);
00377         
00378         // get table-index of specific data from table
00379         virtual int FindTableIndex(int iStartIdx, unsigned int uiTableID, unsigned int uiDataID, bool bData);
00380         virtual int FindTableIndex(int iStartIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned char ucData);
00381         virtual int FindTableIndex(int iStartIdx, unsigned int uiTableID, unsigned int uiDataID, unsigned int uiData);
00382         virtual int FindTableIndex(int iStartIdx, unsigned int uiTableID, unsigned int uiDataID, __int64 i64Data);
00383         virtual int FindTableIndex(int iStartIdx, unsigned int uiTableID, unsigned int uiDataID, string sData);
00384 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
00385         virtual int FindTableIndex(int iStartIdx, unsigned int uiTableID, unsigned int uiDataID, CString sData);
00386 #endif
00387         
00388         // set size of a table
00389         virtual int SetTableSize(unsigned int uiTableID, int iSize);
00390         virtual int SetTableSize(unsigned int uiTableID, 
00391                                                          int iSize, 
00392                                                          int iRxDB_BlockCount, 
00393                                                          int iRxDB_BlockSize, 
00394                                                          int iTxDB_BlockCount,
00395                                                          int iTxDB_BlockSize);
00396         
00397         // get size of a table
00398         virtual int GetTableSize(unsigned int uiTableID);
00399         // get length of valid data in a table
00400         virtual int GetTableLength(unsigned int uiTableID);
00401         // set length of valid data in a table if the application has built the table
00402         int SetTableLength(unsigned int uiTableID, unsigned int uiLength);
00403         // reset length of valid data in a table
00404         virtual int ResetTable(unsigned int uiTableID, unsigned int uiDataFlags=0);
00405 
00406         // for non-addresses mode: index in m_ISOTable
00407 //      void             SetNonAddressedTabIndex(unsigned int uiTabIndex)       { m_uiNonAddressedTabIndex = uiTabIndex; }
00408 //      unsigned int GetNonAddressedTabIndex()                                                  { return m_uiNonAddressedTabIndex; }
00409 
00410         FEDM_ISOTabItem* GetISOTableItem(unsigned int uiIdx);
00411         FEDM_BRMTabItem* GetBRMTableItem(unsigned int uiIdx);
00412 
00413 #if !defined(_FEDM_NO_PD_SUPPORT)
00414         FEDM_PD_MAP* GetPeripheralDevices()                                                             { return &m_mapPeripheralDevices; }
00415 #endif
00416 
00417         // only for internal use
00418         int Set_0x6E_ReaderDiagnosticData(unsigned char ucMode, unsigned char* ucData, FEDM_ISC_READER_DIAGNOSTIC* pReaderDiagnostic);
00419 
00420 // protected methods
00421 protected:
00422         // save the last error or status byte in memory
00423         void SetLastError(int iError);
00424 
00425         // methods auto-generated by ISOStartDev
00426         void BuildAccessIdMap_CPR();
00427         void BuildAccessIdMap_CPR20();
00428         void BuildAccessIdMap_CPR30();
00429         void BuildAccessIdMap_CPR40();
00430         void BuildAccessIdMap_CPR44();
00431         void BuildAccessIdMap_CPR46();
00432         void BuildAccessIdMap_CPR47();
00433         void BuildAccessIdMap_CPR50();
00434         void BuildAccessIdMap_CPR52();
00435         void BuildAccessIdMap_CPR60();
00436         void BuildAccessIdMap_MAX50();
00437         void BuildAccessIdMap_MAX50_Part0();
00438         void BuildAccessIdMap_MAX50_Part1();
00439         void BuildAccessIdMap_MAX_ONTOP();
00440         void BuildAccessIdMap_M02();
00441         void BuildAccessIdMap_MR101();
00442         void BuildAccessIdMap_MR102();
00443         void BuildAccessIdMap_PRH102();
00444         void BuildAccessIdMap_PRH200();
00445         void BuildAccessIdMap_MR200();
00446         void BuildAccessIdMap_MR200_Part0();
00447         void BuildAccessIdMap_MR200_Part1();
00448         void BuildAccessIdMap_LR200();
00449         void BuildAccessIdMap_LR1002();
00450         void BuildAccessIdMap_LR1002_Part0();
00451         void BuildAccessIdMap_LR1002_Part1();
00452         void BuildAccessIdMap_LR2000();
00453         void BuildAccessIdMap_LR2000_Part0();
00454         void BuildAccessIdMap_LR2000_Part1();
00455         void BuildAccessIdMap_LR2500_A();
00456         void BuildAccessIdMap_LR2500_A_Part0();
00457         void BuildAccessIdMap_LR2500_A_Part1();
00458         void BuildAccessIdMap_LR2500_A_Part2();
00459         void BuildAccessIdMap_LR2500_B();
00460         void BuildAccessIdMap_LR2500_B_Part0();
00461         void BuildAccessIdMap_LR2500_B_Part1();
00462         void BuildAccessIdMap_PRHD102();
00463         void BuildAccessIdMap_ISCMU02();
00464         void BuildAccessIdMap_MRU102();
00465         void BuildAccessIdMap_MRU102_Part0();
00466         void BuildAccessIdMap_MRU102_Part1();
00467         void BuildAccessIdMap_MRU200();
00468         void BuildAccessIdMap_MRU200_Part0();
00469         void BuildAccessIdMap_MRU200_Part1();
00470         void BuildAccessIdMap_LRU1000();
00471         void BuildAccessIdMap_LRU1000_Part0();
00472         void BuildAccessIdMap_LRU1000_Part1();
00473         void BuildAccessIdMap_MAXU1002();
00474         void BuildAccessIdMap_LRU1002();
00475         void BuildAccessIdMap_LRU1002_Part0();
00476         void BuildAccessIdMap_LRU1002_Part1();
00477         void BuildAccessIdMap_LRU2000();
00478         void BuildAccessIdMap_LRU2000_Part0();
00479         void BuildAccessIdMap_LRU2000_Part1();
00480         void BuildAccessIdMap_LRU3000();
00481         void BuildAccessIdMap_LRU3000_Part0();
00482         void BuildAccessIdMap_LRU3000_Part1();
00483 #if defined(_FEDM_SUPPORT_READER_CLASS)
00484         void BuildAccessIdMap_Class_ISC_HF_MR1();
00485 #endif
00486 
00487 #ifdef _FEDM_USB_SUPPORT
00488         void HandleUsbEnumeration();
00489 #endif
00490         
00491         int Set_0x66_ReaderInfoData(unsigned char ucMode, unsigned char* ucData);
00492         int Set_0x6E_ReaderDiagnosticData(unsigned char ucMode, unsigned char* ucData);
00493         int Get_0x72_OutputData(unsigned char ucOutN, unsigned char* pOutRec);
00494 
00495         // get data for [0xB0], [0xB2], [0xB3] iso command
00496         virtual int Get_0xB0_IsoTableData(unsigned char ucCmdByte, unsigned char* ucData);
00497         // get data for [0xB0][0x??] iso command
00498         virtual int Get_0xB0_0x24_IsoTableData(unsigned char* ucData);
00499         virtual int Get_0xB0_0x27_IsoTableData(unsigned char* ucData);
00500         virtual int Get_0xB0_0x29_IsoTableData(unsigned char* ucData);
00501         virtual int Get_0xB0_0xA1_IsoTableData(unsigned char* ucData);
00502 
00503         // save data in ISO-table after [0xB0] [0x??] iso command
00504         virtual int Set_0xB0_IsoTableData(unsigned char* ucData, int iLen, int iStatusByte);
00505         virtual int Set_0xB0_0x23_IsoTableData(unsigned char* ucData, int iLen);
00506         virtual int Set_0xB0_0x25_IsoTableData(unsigned char* ucData, int iLen);
00507         virtual int Set_0xB0_0x26_IsoTableData(unsigned char* ucData, int iLen);
00508         virtual int Set_0xB0_0x2B_IsoTableData(unsigned char* ucData, int iLen, int iStatusByte);
00509         virtual int Set_0xB0_0x2C_IsoTableData(unsigned char* ucData, int iLen);
00510         virtual int Set_0xB0_0xA0_IsoTableData(unsigned char* ucData, int iLen);
00511 
00512         // get data for [0xB1] iso command
00513         virtual int Get_0xB1_IsoTableData(unsigned char ucCmdByte, unsigned char* ucData);
00514         // get data for [0xB1][0x??] iso command
00515         int Get_0xB1_IsoTableData_STM(unsigned char ucCmdByte, unsigned char* ucData);
00516         int Get_0xB1_IsoTableData_NXP(unsigned char ucCmdByte, unsigned char* ucData);
00517         int Get_0xB1_IsoTableData_Infineon(unsigned char ucCmdByte, unsigned char* ucData);
00518         int Get_0xB1_IsoTableData_TI(unsigned char ucCmdByte, unsigned char* ucData);
00519         int Get_0xB1_IsoTableData_Fujitsu(unsigned char ucCmdByte, unsigned char* ucData);
00520         int Get_0xB1_IsoTableData_EM(unsigned char ucCmdByte, unsigned char* ucData);
00521         int Get_0xB1_IsoTableData_KSW(unsigned char ucCmdByte, unsigned char* ucData);
00522         int Get_0xB1_IsoTableData_IDS(unsigned char ucCmdByte, unsigned char* ucData);
00523 
00524         // save data in ISO-table after [0xB1][0x??] iso command
00525         int Set_0xB1_IsoTableData(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00526         int Set_0xB1_IsoTableData_NXP(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00527         int Set_0xB1_IsoTableData_STM(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00528         int Set_0xB1_IsoTableData_EM(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00529         int Set_0xB1_IsoTableData_Fujitsu(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00530         int Set_0xB1_IsoTableData_KSW(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00531         int Set_0xB1_IsoTableData_Infineon(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00532         int Set_0xB1_IsoTableData_TI(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00533         int Set_0xB1_IsoTableData_IDS(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00534 
00535         // get data for [0xB2], [0xB3] iso command
00536         virtual int Get_0xB2_IsoTableData(unsigned char ucCmdByte, unsigned char* ucData);
00537 
00538         // save data in ISO-table after [0xB2][0x??] iso command
00539         virtual int Set_0xB2_IsoTableData(unsigned char* ucData, int iLen, int iStatusByte);
00540         virtual int Set_0xB2_0x2B_IsoTableData(unsigned char* ucData, int iLen);
00541 
00542         // get data for [0xB3] iso command
00543         virtual int Get_0xB3_IsoTableData(unsigned char ucCmdByte, unsigned char* ucData);
00544         // get data for [0xB3][0x??] epc command
00545         virtual int Get_0xB3_0x24_IsoTableData(unsigned char* ucData);
00546         virtual int Get_0xB3_0x25_IsoTableData(unsigned char* ucData);
00547         virtual int Get_0xB3_0x26_IsoTableData(unsigned char* ucData);
00548 
00549         // save data after [0xB3][0x??] epc command
00550         virtual int Set_0xB3_IsoTableData(unsigned char* ucData, int iLen, int iStatusByte);
00551 
00552         // get data for [0xB4] iso command
00553         virtual int Get_0xB4_IsoTableData(unsigned char ucCmdByte, unsigned char* ucData);
00554         // get data for [0xB4][0x??] epc command
00555         int Get_0xB4_IsoTableData_NXP(unsigned char ucCmdByte, unsigned char* ucData);
00556         int Get_0xB4_IsoTableData_EM(unsigned char ucCmdByte, unsigned char* ucData);
00557         int Get_0xB4_IsoTableData_IDS(unsigned char ucCmdByte, unsigned char* ucData);
00558 
00559         // save data in ISO-table after [0xB4][0x??] epc command
00560         int Set_0xB4_IsoTableData(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00561         int Set_0xB4_IsoTableData_NXP(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00562         int Set_0xB4_IsoTableData_EM(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00563         int Set_0xB4_IsoTableData_IDS(unsigned char ucCmdByte, unsigned char* ucData, int iLen);
00564 
00565         int Get_0xC1_IsoTableData(unsigned char ucDESFireCmd, unsigned char* ucData);
00566         int Set_0xC1_IsoTableData(unsigned char ucDESFireCmd, unsigned char* ucData, int iLen);
00567 
00568         int Get_0xC2_IsoTableData(unsigned char ucMifarePlusCmd, unsigned char* ucData);
00569         int Set_0xC2_IsoTableData(unsigned char ucMifarePlusCmd, unsigned char* ucData, int iLen);
00570 
00571         int Get_0xC3_IsoTableData(unsigned char ucDESFireCmd, unsigned char ucMode, unsigned char* ucData);
00572         int Set_0xC3_IsoTableData(unsigned char ucDESFireCmd, unsigned char* ucData, int iLen);
00573 
00574         // save data in BRM-table after [0x21] or [0x22] read buffer
00575         virtual int SetBrmTableData(unsigned char ucMode, unsigned char* ucData);
00576 
00577         // save measurement data in CAD-table after [0x68]
00578 #if !defined(__BORLANDC__)
00579         virtual int SetCADTableData(unsigned char ucCmd, long* ucData);
00580 #endif
00581 
00582         virtual int SerializeIn(FEDM_XMLBase* xml, FEDM_XML_TREEITEM* root);
00583         virtual int SerializeOut(FEDM_XMLBase* xml, FEDM_XML_TREEITEM* root);
00584 
00585         void BuildPDMap();
00586 
00587 // data members
00588 protected:
00589         // if true, [0x81] Write Configuration allowed without previously
00590         // [0x80] Read Configuration
00591         bool m_bDisableReadCfgBeforeWriteCfg;
00592 
00593         // for classic-pro reader
00594         bool m_bSelectWithCinf;                 // is set after detecting reader type
00595         bool m_bDisableSelectWithCinf;  // is a general setting
00596 
00597         // Java- and .NET-Wrapper need no tag handler
00598         bool m_bEnableTagHandler;
00599 
00600 #ifdef _FEDM_TAG_HANDLER
00601         // option flag to keep a tag handler after Inventory alive, 
00602         // if the base class is identical, although the concrete type differs
00603         bool m_bTagHandlerOption_CreateCondition_Smart;
00604 #endif
00605 
00606         // BRM-table for received data
00607         FEDM_BRMTAB_ARRAY m_BRMTable;
00608 
00609         // ISO-table for ISO Host Commands
00610         FEDM_ISOTAB_ARRAY m_ISOTable;
00611 
00612         // Channel Analyze Data table for received data
00613 #if !defined(__BORLANDC__)
00614         FEDM_CADTable m_CADTable;
00615 #endif
00616 
00617         // Reader Diagnostic information
00618         FEDM_ISC_READER_DIAGNOSTIC      m_ReaderDiagnostic;
00619 
00620         // general Reader information
00621         FEDM_ISC_READER_INFO            m_ReaderInfo;
00622 
00623         // OEM Reader names
00624         map<unsigned int, string> m_mapOemNames;
00625 
00626         // OEM Reader names for Reader variants
00627         map<unsigned int, string> m_mapOemNames4ReaderVariants;
00628 
00629         // all detected peripheral devices are collected in a map
00630         // the objects are created after a [0x66] with Mode=0x61
00631 #if !defined(_FEDM_NO_PD_SUPPORT)
00632         FEDM_PD_MAP                                     m_mapPeripheralDevices;
00633 #endif
00634 
00635         unsigned int m_uiBRMTableLength;                // length of valid data in BRM-table
00636         unsigned int m_uiISOTableLength;                // length of valid data in ISO-table
00637         unsigned int m_uiNonAddressedTabIndex;  // index in m_ISOTable (default: 0)
00638 
00639         // for temporary protocol data
00640         unsigned char   m_ucData[FEDM_MAX_PROTOCOL_SIZE+1];
00641         long                    m_nData[516];
00642 };
00643 
00644 #endif // !defined(_FEDM_ISCREADER_H_INCLUDED_)


rfid_drivers
Author(s): Raul Perula-Martinez
autogenerated on Thu Apr 2 2015 03:06:13