FedmIscTagHandler_ISO14443_4.h
Go to the documentation of this file.
00001 /*-------------------------------------------------------
00002 |                                                       |
00003 |      FedmIscTagHandler_ISO14443_4.h                   |
00004 |                                                       |
00005 ---------------------------------------------------------
00006 
00007 Copyright © 2009-2011   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                   :       01.04.2009
00018 
00019 Version                 :       03.03.02 / 28.04.2011 / M. Hultsch
00020 
00021 Operation Systems       :       independent
00022 
00023 Function                        :       class for OBID® classic-pro transponder ISO14443-4
00024 
00025 NOTE                            :       this class supports only selected or addressed mode in Host-Mode
00026 
00027 
00028 Trademarks:
00029 -----------
00030 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00031 Other Trademarks: see FEDM.h
00032 */
00033 
00034 #if !defined(_FEDM_ISC_TAG_HANDLER_ISO14443_4_H_INCLUDED_)
00035 #define _FEDM_ISC_TAG_HANDLER_ISO14443_4_H_INCLUDED_
00036 
00037 #if !defined(_FEDM_NO_TAG_HANDLER_ISO14443)
00038 
00039 #include "../../FEDM.h"
00040 #include "FedmIscTagHandler_ISO14443_3.h"
00041 
00042 
00043 #define FEDM_ISO14443_4_APDU_BUFFER_SIZE                2048
00044 
00045 
00046 class FEDM_ISOTabItem;
00047 
00048 
00049 
00050 //#####################################################################################
00051 // constants
00052 //#####################################################################################
00053 
00054 
00055 
00056 
00057 
00058 //####################################################################
00059 // class FedmIscTagHandler_ISO14443_4
00060 // >> supports only ISO Host Commands <<
00061 //####################################################################
00062 
00069 class _FEDM_ISC_CORE_EXT_CLASS FedmIscTagHandler_ISO14443_4 : public FedmIscTagHandler_ISO14443_3
00070 {
00071 public:
00072 
00073         // friend classes have access rights to protected members
00074         friend class FEDM_ISCReaderModule;
00075         friend class FEDM_ISCReader;
00076         friend class FEDM_ISOTabItem;
00077 
00082         virtual void Init();
00083 
00088         void SetCID(unsigned char ucCID);
00089 
00097         int EnableCID(bool bEnable);
00098 
00104         unsigned char GetCID();
00105 
00111         bool IsCIDEnabled();
00112 
00117         void SetNAD(unsigned char ucNAD);
00118 
00126         int EnableNAD(bool bEnable);
00127 
00133         unsigned char GetNAD();
00134 
00140         bool IsNADEnabled();
00141 
00142         
00162         int Apdu(                               unsigned char*  pucRequestData,
00163                                                         unsigned int    iRequestLen,
00164                                                         unsigned char*  pucResponseData,
00165                                                         unsigned int    uiResponseBufferLen,
00166                                                         unsigned int&   uiResponseLen   );
00167 
00183         int Apdu(                               unsigned char*  pucRequestData,
00184                                                         unsigned int    iRequestLen,
00185                                                         void* pAny,
00186                                                         void (*cbFct)(void*, int, int, int)     );
00187 
00197         int Ping();
00198 
00208         int Deselect();
00209 
00225         int GetTransponderInfo( unsigned char& ucFSCI,
00226                                                         unsigned char& ucFWI,
00227                                                         unsigned char& ucDSI,
00228                                                         unsigned char& ucDRI,
00229                                                         unsigned char& ucNADSupport,
00230                                                         unsigned char& ucCIDSupport );
00231 
00232         // for internal use
00233         static void ApduCallback(void* pAny, int iApduHnd, int iError, int iDataLength);
00234 
00240         unsigned char GetLastISOErrorCode();
00241 
00253         int GetResponseData(    unsigned char*  pucResponseData,
00254                                                         unsigned int    uiResponseBufferLen,
00255                                                         unsigned int&   uiResponseLen );
00256 
00257 
00258 protected:
00259         // constructor
00260         FedmIscTagHandler_ISO14443_4(FEDM_ISCReader* pReader, FEDM_ISOTabItem* pTabItem);
00261         // 2. constructor
00262         FedmIscTagHandler_ISO14443_4(FEDM_ISCReader* pReader, unsigned int uiTagHandlerType, FEDM_ISOTabItem* pTabItem);
00263         // destructor
00264         virtual ~FedmIscTagHandler_ISO14443_4();
00265 
00266         unsigned char m_ucCID;
00267         unsigned char m_ucNAD;
00268         bool m_bUseCID;
00269         bool m_bUseNAD;
00270 
00271         int m_iFetclHnd;                // transponder handle in FETCL library
00272 
00273         // some temporary values for asynchronous APDU invoke
00274         void (*m_cbFct)(void*, int, int, int);
00275         void* m_pAny;
00276 
00277         unsigned char m_ucISO14443ErrorCode;
00278 
00279         // buffer for APDU
00280         unsigned char m_ucRequestData[FEDM_ISO14443_4_APDU_BUFFER_SIZE];
00281         unsigned char m_ucResponseData[FEDM_ISO14443_4_APDU_BUFFER_SIZE];
00282         unsigned int  m_uiResponseLen;
00283 };
00284 
00285 #endif // #if !defined(_FEDM_NO_TAG_HANDLER_ISO14443)
00286 
00287 #endif // !defined(_FEDM_ISC_TAG_HANDLER_ISO14443_4_H_INCLUDED_)


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