FEDM_ISCReaderInfo.h
Go to the documentation of this file.
00001 /*-------------------------------------------------------
00002 |                                                       |
00003 |                  FEDM_ISCReaderInfo.h                 |
00004 |                                                       |
00005 ---------------------------------------------------------
00006 
00007 Copyright © 2007-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                   :       19.06.2007
00018 
00019 Version                 :       04.06.08 / 13.10.2014 / M. Hultsch
00020                                                 - additional LAN link information with mode=0x50
00021 
00022                                                 04.02.06 / 25.07.2012 / M. Hultsch
00023                                                 - new mode 0x08 (with firmware supported tag drivers)
00024 
00025                                                 04.00.09 / 01.02.2012 / M. Hultsch
00026                                                 - mode 0x04: modification for CPR-Reader
00027 
00028                                                 03.03.03 / 09.05.2011 / M. Hultsch
00029                                                 - new elements: ucReaderClass, ucReaderClassGen, ucReaderTypeOfClass
00030 
00031                                                 03.02.07 / 29.10.2010 / M. Hultsch
00032 
00033 Operation Systems       :       independent
00034 
00035 Function                        :       class for collecting all reader information
00036 
00037 
00038 Trademarks:
00039 -----------
00040 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00041 Other Trademarks: see FEDM.h
00042 */
00043 
00044 #if !defined(_FEDM_ISC_READER_INFO_)
00045 #define _FEDM_ISC_READER_INFO_
00046 
00047 #if defined(_FEDM_LINUX)
00048         #include <string.h>
00049 #endif
00050 
00051 
00052 
00053 //#####################################################################################
00054 // structure
00055 //#####################################################################################
00056 
00058 typedef struct _FEDM_ISC_READER_INFO
00059 {
00060         // information from RF-Controller
00061         // [0x66] and Mode=0x00
00062 
00063         unsigned char   ucRfcSwVer[2];                          
00064         unsigned char   ucRfcDevVer;                            
00065         unsigned char   ucRfcHwType;                            
00066         
00067         union
00068         {
00069                 unsigned char   ucReaderType;                   
00070                 unsigned char   ucReaderClass;                  
00071         };
00072         
00073         unsigned char   ucRfcTrType[2];                         
00074         unsigned char   ucRfcRxBufferSize[2];           
00075         unsigned char   ucRfcTxBufferSize[2];           
00076         unsigned char   ucRfcUhfTrType[2];                      
00077         unsigned char   ucReaderClassGen;                       
00078         unsigned char   ucReaderTypeOfClass;            
00079         unsigned char   ucReserved3;                            
00080 
00081         // information from AC-Controller
00082         // [0x66] and Mode=0x01
00083         unsigned char   ucAccSwVer[2];                          
00084         unsigned char   ucAccDevVer;                            
00085         unsigned char   ucAccHwType;                            
00086         unsigned char   ucAccEmbAppSwVer[2];            
00087         unsigned char   ucAccEmbAppDevVer;                      
00088 
00089         // information from USB-Controller
00090         // [0x66] and Mode=0x02
00091         unsigned char   ucUsbSwVer[2];                          
00092         unsigned char   ucUsbDevVer;                            
00093         unsigned char   ucUsbHwType;                            
00094 
00095         // information from FPGA
00096         // [0x66] and Mode=0x03
00097         union
00098         {
00099                 struct // FPGA Info
00100                 {
00101                         unsigned char   ucFpgaSwVer[2];                 
00102                         unsigned char   ucFpgaDevVer;                   
00103                         unsigned char   ucFpgaHwType;                   
00104                 };
00105 
00106                 struct // RF-Decoder Info
00107                 {
00108                         unsigned char   ucDecoderType[5];               
00109                         unsigned char   ucSelfTest;                             
00110                 };
00111         };
00112 
00113         // additional firmware functionality
00114         // [0x66] and Mode=0x04
00115         union
00116         {
00117                 struct  // CPR-Reader
00118                 {
00119                         unsigned char   ucCprFctTemplate;                                       
00120                         union
00121                         {
00122                                 struct // CPRM02, CPR02, CPR04
00123                                 {
00124                                         unsigned char   ucCprFctList;                           
00125                                         unsigned char   ucFwIdentifierA[9];                     
00126                                 };
00127 
00128                                 struct // all modern CPR-Reader
00129                                 {
00130                                         unsigned char   ucCprFctList0;                          
00131                                         unsigned char   ucCprFctList1;                          
00132                                         unsigned char   ucCprFctList2;                          
00133                                         unsigned char   ucCprRfu0;                                      
00134                                         unsigned char   ucCprRfu1;                                      
00135                                         unsigned char   ucCprRfu2;                                      
00136                                         unsigned char   ucCprRfu3;                                      
00137                                         unsigned char   ucCprRfu4;                                      
00138                                         unsigned char   ucFwIdentifierC[2];                     
00139                                 };
00140                         };
00141                 };
00142 
00143                 struct // MU02/LR/LRU-Reader
00144                 {
00145                         unsigned char   ucReserved1;                                            
00146                         unsigned char   ucFwIdentifierB[10];                            
00147                 };
00148         };
00149         
00150 
00151         // information from bootloader
00152         // [0x66] and Mode=0x05
00153         unsigned char   ucBootSwVer[2];                         
00154 
00155         // information from keyboard unit
00156         // [0x66] and Mode=0x06
00157         unsigned char   ucKeybStatus[2];                        
00158         unsigned char   ucKeybSwVer[2];                         
00159         unsigned char   ucKeybHwVer[4];                         
00160 
00161         // information from CPRIO unit
00162         // [0x66] and Mode=0x07
00163         unsigned char   ucCprioSwVer[2];                        
00164         unsigned char   ucCprioHwVer;                           
00165         unsigned char   ucCprioNoOfInputs;                      
00166         unsigned char   ucCprioNoOfOutputs;                     
00167         unsigned char   ucCprioNoOfRelays;                      
00168         unsigned char   ucCprioNoOfSignalers;           
00169 
00170         // information with supported tag drivers
00171         // [0x66] and Mode=0x08
00172         unsigned char   ucRfcSupportedTagDriver[14];    
00173 
00174         // information from WLAN-Module
00175         // [0x66] and Mode=0x09
00176         union
00177         {
00178                 struct // CPRM02, CPR02, CPR04
00179                 {
00180                         unsigned char   ucWlanVer[14];                  
00181                 };
00182 
00183                 struct // PRH200
00184                 {
00185                         //unsigned int  
00186                 };
00187         };
00188 
00189         // hardware information of RF-Controller
00190         // [0x66] and Mode=0x10
00191         unsigned char   ucRfcHwInfo[2];                         
00192         unsigned char   ucRfcDHw[2];                            
00193         unsigned char   ucRfcAHw[2];                            
00194         unsigned char   ucRfcFrequency;                         
00195         unsigned char   ucRfcPortTypes;                         
00196         unsigned char   ucReserved2;                            
00197         unsigned char   ucRfcInfo;                                      
00198         unsigned char   ucBatteryStatus;                        
00199 
00200         // SAM information of RF-Controller
00201         // [0x66] and Mode=0x11
00202         unsigned char   ucNoOfSlots;                            
00203         unsigned char   ucSlotInfo[4];                          
00204 
00205         // general CPU information of RF-Controller
00206         // [0x66] and Mode=0x12
00207         unsigned char   ucRfcCpuManufacturer;           
00208         unsigned char   ucRfcCpuType[2];                        
00209         unsigned char   ucRfcCpuRevision;                       
00210         unsigned char   ucRfcCpuFlashSize[4];           
00211 
00212         // CFG information with read and write permission
00213         // [0x66] and Mode=0x40 and Mode=0x41
00214         unsigned char   ucNoOfCfgPages[2];                      
00215         unsigned char   ucCfgReadPermissions[16];       
00216         unsigned char   ucCfgWritePermissions[16];      
00217 
00218         // information with MAC for LAN
00219         // [0x66] and Mode=0x50
00220         unsigned char   ucLanFlags;                                     
00221         unsigned char   ucLanMac[6];                            
00222         unsigned char   ucLanLinkInfo;                          
00223 
00224         // information with IP Address for LAN
00225         // [0x66] and Mode=0x51
00226         unsigned char   ucLanIpV4[4];                           
00227         unsigned char   ucLanIpV6[16];                          
00228 
00229         // information with netmask for LAN
00230         // [0x66] and Mode=0x52
00231         unsigned char   ucLanNetmaskV4[4];                      
00232         unsigned char   ucLanNetmaskV6[16];                     
00233 
00234         // information with Gateway Address for LAN
00235         // [0x66] and Mode=0x53
00236         unsigned char   ucLanGatewayV4[4];                      
00237         unsigned char   ucLanGatewayV6[16];                     
00238 
00239         // information with MAC for WLAN
00240         // [0x66] and Mode=0x54
00241         unsigned char   ucWlanFlags;                            
00242         unsigned char   ucWlanMac[6];                           
00243 
00244         // information with IP Address for WLAN
00245         // [0x66] and Mode=0x55
00246         unsigned char   ucWlanIpV4[4];                          
00247         unsigned char   ucWlanIpV6[16];                         
00248 
00249         // information with netmask for WLAN
00250         // [0x66] and Mode=0x56
00251         unsigned char   ucWlanNetmaskV4[4];                     
00252         unsigned char   ucWlanNetmaskV6[16];            
00253 
00254         // information with Gateway Address for LAN
00255         // [0x66] and Mode=0x57
00256         unsigned char   ucWlanGatewayV4[4];                     
00257         unsigned char   ucWlanGatewayV6[16];            
00258 
00259         // input/output capabilities information
00260         // [0x66] and Mode=0x60
00261         unsigned char   ucNoOfInputs;                           
00262         unsigned char   ucNoOfOutputs;                          
00263         unsigned char   ucNoOfRelays;                           
00264 
00265         // external peripheral devices information
00266         // [0x66] and Mode=0x61
00267         unsigned char   ucNoOfPeripheralDevices;        
00268 
00270         struct PERIPHERAL_DEVICE
00271         {
00272                 unsigned char   ucPDType;                               
00273                 unsigned char   ucPDBusAdr;                             
00274 
00275         } aPeripheralDevice[3];
00276 
00277         // device information of RF-Controller
00278         // [0x66] and Mode=0x80
00279         unsigned char   ucRfcDevID[4];                          
00280         unsigned char   ucRfcLicenseCustom[4];          
00281         unsigned char   ucRfcLicenseFw[2];                      
00282         unsigned char   ucRfcLicenseTrType[2];          
00283         unsigned char   ucRfcLicenseFct[2];                     
00284         unsigned char   ucRfcLicenseUhfTrType[2];       
00285         unsigned char   ucRfcLicenseUhfFct[2];          
00286 
00287         bool bIsInfoRead;               
00288         bool bIsMode0x00Read;   
00289         bool bIsMode0x01Read;   
00290         bool bIsMode0x02Read;   
00291         bool bIsMode0x03Read;   
00292         bool bIsMode0x04Read;   
00293         bool bIsMode0x05Read;   
00294         bool bIsMode0x06Read;   
00295         bool bIsMode0x07Read;   
00296         bool bIsMode0x08Read;   
00297         bool bIsMode0x09Read;   
00298         bool bIsMode0x10Read;   
00299         bool bIsMode0x11Read;   
00300         bool bIsMode0x12Read;   
00301         bool bIsMode0x40Read;   
00302         bool bIsMode0x41Read;   
00303         bool bIsMode0x50Read;   
00304         bool bIsMode0x51Read;   
00305         bool bIsMode0x52Read;   
00306         bool bIsMode0x53Read;   
00307         bool bIsMode0x54Read;   
00308         bool bIsMode0x55Read;   
00309         bool bIsMode0x56Read;   
00310         bool bIsMode0x57Read;   
00311         bool bIsMode0x60Read;   
00312         bool bIsMode0x61Read;   
00313         bool bIsMode0x80Read;   
00314         bool bIsRfcFrequency;   
00315 
00317         void Init()
00318         {
00319                 memset(&ucRfcSwVer[0], 0, sizeof(_FEDM_ISC_READER_INFO));
00320                 memset(&ucRfcSupportedTagDriver[0], 0xFF, 14);
00321         }
00322 
00325         unsigned int GetReaderType()
00326         {
00327                 if (!bIsMode0x00Read)
00328                         return 0;
00329 
00330                 if(ucReaderType & 0x80)
00331                 {
00332                         // class information
00333                         return  ((unsigned int)ucReserved3<<24) +
00334                                         ((unsigned int)ucReaderTypeOfClass<<16) +
00335                                         ((unsigned int)ucReaderClassGen<<8)  +
00336                                          (unsigned int)ucReaderClass;
00337                 }
00338                 else
00339                 {
00340                         // single type number
00341                         return (unsigned int)ucReaderClass;
00342                 }
00343         }
00344 
00346         unsigned int GetRfcRxBufferSize()
00347         {
00348                 if (!bIsMode0x01Read)
00349                         return 0;
00350 
00351                 return ((unsigned int)ucRfcRxBufferSize[0] << 8) + (unsigned int)ucRfcRxBufferSize[1];
00352         }
00353 
00355         unsigned int GetRfcTxBufferSize()
00356         {
00357                 if (!bIsMode0x01Read)
00358                         return 0;
00359 
00360                 return ((unsigned int)ucRfcTxBufferSize[0] << 8) + (unsigned int)ucRfcTxBufferSize[1];
00361         }
00362 
00364         unsigned int GetDeviceID()
00365         {
00366                 if(!bIsMode0x80Read)
00367                         return 0;
00368                         
00369                 return  ((unsigned int)ucRfcDevID[0]<<24) + 
00370                                 ((unsigned int)ucRfcDevID[1]<<16) + 
00371                                 ((unsigned int)ucRfcDevID[2]<<8)  + 
00372                                  (unsigned int)ucRfcDevID[3];
00373         }
00374 
00376         unsigned int GetNoOfCfgPages()
00377         {
00378                 if(!bIsMode0x40Read && !bIsMode0x41Read)
00379                         return 0;
00380                         
00381                 return  ((unsigned int)ucNoOfCfgPages[0]<<8)  + 
00382                                  (unsigned int)ucNoOfCfgPages[1];
00383         }
00384 
00385 } FEDM_ISC_READER_INFO;
00386 
00387 
00388 #endif // !defined(_FEDM_ISC_READER_INFO_)


maggie_rfid_drivers
Author(s): Raul Perula-Martinez
autogenerated on Mon Sep 14 2015 03:05:29