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
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #if !defined(_FEDM_ISOTABITEM_H_INCLUDED_)
00043 #define _FEDM_ISOTABITEM_H_INCLUDED_
00044
00045
00046
00047 #include "FEDM_ISC.h"
00048 #include "../FEDM_DataBase.h"
00049 #include "FEDM_TabItem.h"
00050
00051 class FEDM_ISCReader;
00052 class FEDM_ISCReaderModule;
00053 #ifdef _FEDM_TAG_HANDLER
00054 class FedmIscTagHandler;
00055 #endif
00056
00057
00058
00059
00060
00061
00062
00063 #define FEDM_ISC_ISO_TABLE_SEC_STATUS_SIZE 256 // 256 blocks
00064 #define FEDM_ISC_ISO_TABLE_TxDB_SIZE 8192 // 256 blocks * 32 bytes = 8192 byte
00065 #define FEDM_ISC_ISO_TABLE_RxDB_SIZE 8192 // 256 blocks * 32 bytes = 8192 byte
00066
00067
00068 #define FEDM_ISC_ISO_TABLE_EPC_BANK_SIZE 256 // 128 blocks * 2 bytes
00069 #define FEDM_ISC_ISO_TABLE_TID_BANK_SIZE 256 // 128 blocks * 2 bytes
00070 #define FEDM_ISC_ISO_TABLE_RES_BANK_SIZE 256 // 128 blocks * 2 bytes
00071
00072 #define FEDM_ISC_ISO_TABLE_MAX_ANTENNA 8 // max 8 antenna values for each transponder
00073
00074
00075
00076
00077
00078
00079
00080
00081
00092 class _FEDM_ISC_CORE_EXT_CLASS FEDM_ISOTabItem : public FEDM_TabItem
00093 {
00094 public:
00095
00096
00097 friend class FEDM_ISCReader;
00098 friend class FEDM_ISCReaderModule;
00099 #ifdef _FEDM_TAG_HANDLER
00100 friend class FedmIscTagHandler;
00101 #if !defined(_FEDM_NO_TAG_HANDLER_EPC_C1_G2)
00102 friend class FedmIscTagHandler_EPC_Class1_Gen2;
00103 friend class FedmIscTagHandler_EPC_Class1_Gen2_IDS_SL900A;
00104 #endif
00105 #if !defined(_FEDM_NO_TAG_HANDLER_ISO18000_3M3)
00106 friend class FedmIscTagHandler_ISO18000_3M3;
00107 #endif
00108 #if !defined(_FEDM_NO_TAG_HANDLER_ISO14443)
00109 friend class FedmIscTagHandler_ISO14443;
00110 friend class FedmIscTagHandler_ISO14443_Innovatron;
00111 friend class FedmIscTagHandler_ISO14443_2;
00112 friend class FedmIscTagHandler_ISO14443_2_Innovision_Jewel;
00113 friend class FedmIscTagHandler_ISO14443_2_STM_SR176;
00114 friend class FedmIscTagHandler_ISO14443_2_STM_SRIxxx;
00115 friend class FedmIscTagHandler_ISO14443_3;
00116 friend class FedmIscTagHandler_ISO14443_3_ASK_CTx;
00117 friend class FedmIscTagHandler_ISO14443_3_Infineon_my_d;
00118 friend class FedmIscTagHandler_ISO14443_3_Infineon_my_d_move;
00119 friend class FedmIscTagHandler_ISO14443_3_MIFARE_Classic;
00120 friend class FedmIscTagHandler_ISO14443_3_MIFARE_Plus_SL1;
00121 friend class FedmIscTagHandler_ISO14443_3_MIFARE_Plus_SL2;
00122 friend class FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight;
00123 friend class FedmIscTagHandler_ISO14443_4;
00124 friend class FedmIscTagHandler_ISO14443_4_Maxim;
00125 friend class FedmIscTagHandler_ISO14443_4_Maxim_MAX66000;
00126 friend class FedmIscTagHandler_ISO14443_4_Maxim_MAX66020;
00127 friend class FedmIscTagHandler_ISO14443_4_Maxim_MAX66040;
00128 friend class FedmIscTagHandler_ISO14443_4_MIFARE_DESFire;
00129 friend class FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_Impl_C1;
00130 friend class FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_Impl_C3;
00131 friend class FedmIscTagHandler_ISO14443_4_MIFARE_Plus;
00132 friend class FedmIscTagHandler_ISO14443_4_MIFARE_Plus_SL1;
00133 friend class FedmIscTagHandler_ISO14443_4_MIFARE_Plus_SL2;
00134 friend class FedmIscTagHandler_ISO14443_4_MIFARE_Plus_SL3;
00135 #endif
00136 #if !defined(_FEDM_NO_TAG_HANDLER_ISO15693)
00137 friend class FedmIscTagHandler_ISO15693;
00138 friend class FedmIscTagHandler_ISO15693_STM;
00139 friend class FedmIscTagHandler_ISO15693_STM_LRI2K;
00140 friend class FedmIscTagHandler_ISO15693_STM_LRIS2K;
00141 friend class FedmIscTagHandler_ISO15693_STM_LRIS64K;
00142 friend class FedmIscTagHandler_ISO15693_STM_M24LR64R;
00143 friend class FedmIscTagHandler_ISO15693_STM_M24LRxxER;
00144 friend class FedmIscTagHandler_ISO15693_NXP;
00145 friend class FedmIscTagHandler_ISO15693_NXP_ICODE_SLI;
00146 friend class FedmIscTagHandler_ISO15693_NXP_ICODE_SLI_L;
00147 friend class FedmIscTagHandler_ISO15693_NXP_ICODE_SLI_S;
00148 friend class FedmIscTagHandler_ISO15693_NXP_ICODE_SLIX;
00149 friend class FedmIscTagHandler_ISO15693_NXP_ICODE_SLIX_L;
00150 friend class FedmIscTagHandler_ISO15693_NXP_ICODE_SLIX_S;
00151 friend class FedmIscTagHandler_ISO15693_Infineon;
00152 friend class FedmIscTagHandler_ISO15693_Infineon_my_d;
00153 friend class FedmIscTagHandler_ISO15693_TI;
00154 friend class FedmIscTagHandler_ISO15693_TI_Tag_it_HFI_Pro;
00155 friend class FedmIscTagHandler_ISO15693_TI_Tag_it_HFI_Plus;
00156 friend class FedmIscTagHandler_ISO15693_Fujitsu;
00157 friend class FedmIscTagHandler_ISO15693_Fujitsu_MB89R1xx;
00158 friend class FedmIscTagHandler_ISO15693_EM;
00159 friend class FedmIscTagHandler_ISO15693_EM_4034;
00160 friend class FedmIscTagHandler_ISO15693_KSW;
00161 friend class FedmIscTagHandler_ISO15693_Maxim;
00162 friend class FedmIscTagHandler_ISO15693_Maxim_MAX66100;
00163 friend class FedmIscTagHandler_ISO15693_Maxim_MAX66120;
00164 friend class FedmIscTagHandler_ISO15693_Maxim_MAX66140;
00165 friend class FedmIscTagHandler_ISO15693_IDS_SL13A;
00166 #endif
00167
00168 #endif
00169
00170 bool HasTagHandler();
00171
00172 FEDM_ISOTabItem();
00173 FEDM_ISOTabItem(unsigned int uiTabIndex, FEDM_ISCReader* pReader);
00174 ~FEDM_ISOTabItem();
00175
00176 void Init();
00177 void Init( int iRxDB_BlockCount, int iRxDB_BlockSize, int iTxDB_BlockCount, int iTxDB_BlockSize);
00178
00187 void GetTableSizes( int& iRxDB_BlockCount, int& iRxDB_BlockSize, int& iTxDB_BlockCount, int& iTxDB_BlockSize);
00188
00197 int GetSnr(std::string& sSnr);
00198
00199 __int64 GetSnr();
00200 __int64 GetSnr(int i64BitPart);
00201
00202 int GetEpc(char* cEpc, int iBufLen);
00203 int GetEpcRaw(unsigned char* cEpc, int iBufLen);
00204 int GetEpcHeader();
00205 __int64 GetEpcDomainManager();
00206 __int64 GetEpcObjectClass();
00207 __int64 GetEpcSnr();
00208
00209 #ifdef _FEDM_TAG_HANDLER
00210 const char* GetTagName();
00211 #endif
00212
00218 const char* GetISO15693Manufacturer();
00219
00225 const char* GetISO14443AManufacturer();
00226
00232 unsigned int GetEpcC1G2TagModelNumber();
00233
00239 unsigned int GetEpcC1G2MaskDesignerID();
00240
00246 const char* GetEpcC1G2MaskDesignerName();
00247
00254 bool IsExtendedPC_W1();
00255
00256 public:
00257
00258 int SetData(unsigned char ucCmd, unsigned char* ucData, int& iByteCnt, unsigned char ucBank=0, unsigned int uiAdr=0);
00259
00260 int GetData(unsigned char ucCmd, unsigned char* ucData, int& iByteCnt, unsigned char ucBank, unsigned int uiAdr);
00261
00262 protected:
00263
00264 int SetSnr(unsigned char* ucData, int& iByteCnt);
00265 int SetSnr_wo_Antenna(unsigned char* ucData, int& iByteCnt);
00266 int SetSnr_with_Antenna(unsigned char* ucData, int& iByteCnt);
00267
00268 void ClearAntennaValues();
00269
00270
00271 #ifdef _FEDM_TAG_HANDLER
00272 int CreateTagHandler();
00273 #if !defined(_FEDM_NO_TAG_HANDLER_ISO15693)
00274 int CreateTagHandler_ISO15693();
00275 #endif
00276 void RemoveTagHandler();
00277 #endif
00278
00279
00280
00281 public:
00282
00283 unsigned char m_ucFlags;
00284
00285 unsigned char m_ucAFI;
00286 union
00287 {
00288 unsigned char m_ucDsfID;
00289 unsigned char m_ucChipID;
00290 unsigned char m_ucTrInfo;
00291 unsigned char m_ucProtoInfo;
00292 unsigned char m_ucIDDT;
00293
00294
00295 struct
00296 {
00297 unsigned char m_ucProductCode;
00298 unsigned char m_ucFabCode;
00299 unsigned char m_ucAppCode;
00300 unsigned char m_ucEmbedderCode;
00301 };
00302
00303
00304 struct
00305 {
00306 unsigned char m_ucVerlog;
00307 unsigned char m_ucConfig;
00308 unsigned char m_ucAtrLen;
00309 unsigned char m_ucAtr[33];
00310 };
00311 };
00312
00313 unsigned char m_ucOptInfo;
00314 unsigned char m_ucMemSize[3];
00315 unsigned char m_ucICRef;
00316 unsigned char m_ucTrType;
00317 unsigned char m_ucTrSubType;
00318 unsigned char m_ucEpcType;
00319 unsigned char m_ucSnrLen;
00320 unsigned char m_ucSnr[FEDM_ISC_MAX_UID_LENGTH];
00321 unsigned char m_ucClass1Gen2_PC[2];
00322 unsigned char m_ucClass1Gen2_XPC_W1[2];
00323 FEDM_BYTE_ARRAY m_ucSecStatus;
00324
00341 FEDM_BYTE_ARRAY m_ucTxDB;
00342
00359 FEDM_BYTE_ARRAY m_ucRxDB;
00360
00361 unsigned char m_ucTxCB[4][4];
00362 unsigned char m_ucRxCB[4][4];
00363
00364
00365 unsigned char m_ucFSCI;
00366 unsigned char m_ucFWI;
00367 unsigned char m_ucDSI;
00368 unsigned char m_ucDRI;
00369 unsigned char m_ucNad;
00370 unsigned char m_ucCid;
00371
00372 unsigned char m_ucAntCount;
00373 unsigned char m_ucAntNumber[FEDM_ISC_ISO_TABLE_MAX_ANTENNA];
00374 unsigned char m_ucAntStatus[FEDM_ISC_ISO_TABLE_MAX_ANTENNA];
00375 unsigned char m_ucAntRSSI[FEDM_ISC_ISO_TABLE_MAX_ANTENNA];
00376
00377 unsigned int m_uiValue;
00378
00379 FEDM_BYTE_ARRAY m_ucTxDB_EpcBank;
00380 FEDM_BYTE_ARRAY m_ucRxDB_EpcBank;
00381 FEDM_BYTE_ARRAY m_ucTxDB_TidBank;
00382 FEDM_BYTE_ARRAY m_ucRxDB_TidBank;
00383 FEDM_BYTE_ARRAY m_ucTxDB_ResBank;
00384 FEDM_BYTE_ARRAY m_ucRxDB_ResBank;
00385
00386
00387 unsigned char m_ucMemSizeLen;
00388
00393 unsigned char m_ucBlockSize;
00394
00395 bool m_bIsBlockSizeSet;
00396
00401 bool m_bIsSelected;
00402
00403 bool m_bIsSnr;
00404 bool m_bIsEpc;
00405 bool m_bIsAFI;
00406 bool m_bIsSysInfo;
00407 bool m_bIsISO14443_4Info;
00408 bool m_bIsRSSI;
00409
00410
00411 protected:
00412
00413 int m_iRxDB_BlockCount;
00414 int m_iRxDB_BlockSize;
00415 int m_iTxDB_BlockCount;
00416 int m_iTxDB_BlockSize;
00417
00418 #ifdef _FEDM_TAG_HANDLER
00419 FedmIscTagHandler* m_pTagHandler;
00420 #endif
00421 FEDM_ISCReader* m_pReader;
00422
00423 unsigned int m_uiTabIndex;
00424 };
00425
00426 #endif // !defined(_FEDM_ISOTABITEM_H_INCLUDED_)