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
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #if !defined(_FEDM_ISC_TAG_HANDLER_EPC_CLASS1_GEN2_H_INCLUDED_)
00055 #define _FEDM_ISC_TAG_HANDLER_EPC_CLASS1_GEN2_H_INCLUDED_
00056
00057 #if !defined(_FEDM_NO_TAG_HANDLER_EPC_C1_G2)
00058
00059 #include "../../FEDM.h"
00060 #include "FedmIscTagHandler.h"
00061
00062 class FEDM_ISOTabItem;
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00084 class _FEDM_ISC_CORE_EXT_CLASS FedmIscTagHandler_EPC_Class1_Gen2 : public FedmIscTagHandler
00085 {
00086 public:
00087
00088
00089 friend class FEDM_ISCReaderModule;
00090 friend class FEDM_ISCReader;
00091 friend class FEDM_ISOTabItem;
00092
00093
00094
00101 bool IsUidWithTid();
00102
00109 bool IsExtendedPC_W1();
00110
00117 unsigned int GetProtocolControl();
00118
00125 unsigned int GetExtendedProtocolControlW1();
00126
00133 const char* GetEpcOfUid();
00134
00141 const char* GetTidOfUid();
00142
00150 unsigned int GetTagModelNumber();
00151
00159 unsigned int GetMaskDesignerID();
00160
00169 const char* GetMaskDesignerName();
00170
00187 int ReadCompleteBank( unsigned int uiBank,
00188 std::string sPassword,
00189 unsigned char* pucData,
00190 unsigned int uiDataBufferSize,
00191 unsigned int& uiNoOfDataBlocksRead );
00192
00209 int ReadMultipleBlocks( unsigned int uiBank,
00210 unsigned int uiFirstDataBlock,
00211 unsigned int uiNoOfDataBlocks,
00212 std::string sPassword,
00213 unsigned char* pucData );
00214
00231 int WriteMultipleBlocks( unsigned int uiBank,
00232 unsigned int uiFirstDataBlock,
00233 unsigned int uiNoOfDataBlocks,
00234 std::string sPassword,
00235 unsigned char* pucData );
00236
00251 int WriteEPC( std::string sNewEPC, std::string sPassword="");
00252
00268 int Kill( std::string sPassword,
00269 bool bRecom_AssertedLSB=false,
00270 bool bRecom_Asserted2SB=false,
00271 bool bRecom_Asserted3SB=false );
00272
00298 int Lock( std::string sPassword,
00299 unsigned char ucLockKill,
00300 unsigned char ucLockAccess,
00301 unsigned char ucLockEPC,
00302 unsigned char ucLockTID,
00303 unsigned char ucLockUser );
00304
00328 int Lock( std::string sPassword,
00329 unsigned char ucKillMask,
00330 unsigned char ucKillAction,
00331 unsigned char ucAccessMask,
00332 unsigned char ucAccessAction,
00333 unsigned char ucEPCMask,
00334 unsigned char ucEPCAction,
00335 unsigned char ucTIDMask,
00336 unsigned char ucTIDAction,
00337 unsigned char ucUserMask,
00338 unsigned char ucUserAction );
00339
00357 int BlockPermalock( unsigned int uiBank,
00358 unsigned int uiBlockPointer,
00359 unsigned int uiBlockRange,
00360 std::string sPassword,
00361 unsigned char* pucMask );
00362
00380 int ReadPermalockStatus( unsigned int uiBank,
00381 unsigned int uiBlockPointer,
00382 unsigned int uiBlockRange,
00383 std::string sPassword,
00384 unsigned char* pucMask );
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397 #if _MSC_VER > 1200
00398
00399
00400
00401 static const unsigned int BANK_RESERVED = 0;
00405 static const unsigned int BANK_EPC = 1;
00409 static const unsigned int BANK_TID = 2;
00413 static const unsigned int BANK_USER = 3;
00414
00418 static const unsigned int UNCHANGED = 0x00;
00422 static const unsigned int UNLOCK = 0x20;
00426 static const unsigned int UNLOCK_PERMANENTLY = 0x31;
00430 static const unsigned int LOCK = 0x22;
00434 static const unsigned int LOCK_PERMANENTLY = 0x33;
00435 #else
00436 static const unsigned int BANK_RESERVED;
00437 static const unsigned int BANK_EPC;
00438 static const unsigned int BANK_TID;
00439 static const unsigned int BANK_USER;
00440
00441
00442 static const unsigned char UNCHANGED;
00443 static const unsigned char UNLOCK;
00444 static const unsigned char UNLOCK_PERMANENTLY;
00445 static const unsigned char LOCK;
00446 static const unsigned char LOCK_PERMANENTLY;
00447 #endif
00448
00449 protected:
00450
00451 FedmIscTagHandler_EPC_Class1_Gen2(FEDM_ISCReader* pReader, FEDM_ISOTabItem* pTabItem);
00452
00453 FedmIscTagHandler_EPC_Class1_Gen2(FEDM_ISCReader* pReader, unsigned int uiTagHandlerType, FEDM_ISOTabItem* pTabItem);
00454
00455 virtual ~FedmIscTagHandler_EPC_Class1_Gen2();
00456
00457 std::string m_sEpc;
00458 std::string m_sTid;
00459
00460 };
00461
00462 #endif // #if !defined(_FEDM_NO_TAG_HANDLER_EPC_C1_G2)
00463
00464 #endif // !defined(_FEDM_ISC_TAG_HANDLER_EPC_CLASS1_GEN2_H_INCLUDED_)