FedmIscReport_ReaderDiagnostic.cpp
Go to the documentation of this file.
00001 /*-------------------------------------------------------
00002 |                                                       |
00003 |                               FedmIscReport_ReaderDiagnostic.cpp      |
00004 |                                                       |
00005 ---------------------------------------------------------
00006 
00007 Copyright © 2009-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                   :       17.06.2009
00018 
00019 Version                 :       04.06.01 / 05.03.2013 / M. Hultsch
00020                                                 - support for new Reader ISC.PRH200
00021                                                 - extended API for external diagnostic object
00022 
00023                                                 04.04.00 / 05.12.2012 / M. Hultsch
00024                                                 - support for Mode 0x21
00025                                                 
00026                                                 04.01.00 / 23.03.2011 / M. Hultsch
00027                                                 - support for LR1002
00028                                                 
00029                                                 03.03.00 / 01.02.2011 / M. Hultsch
00030                                                 - support for LR2500-A
00031                                                 
00032                                                 03.02.05 / 23.09.2010 / M. Hultsch
00033                                                 - support for LR2500-B
00034                                                 
00035                                                 03.00.14 / 20.10.2009 / M. Hultsch
00036 
00037 Operation Systems       :       independent
00038 
00039 Function                        :       report class for [0x6E] Reader Diagnostic
00040 
00041 
00042 Trademarks:
00043 -----------
00044 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00045 Other Trademarks: see FEDM.h
00046 */
00047 
00048 #include "FedmIscReport_ReaderDiagnostic.h"
00049 #include "../FEDM_ISCReader.h"
00050 #include "../FEDM_ISCReaderID.h"
00051 #include "../../FEDM_Functions.h"
00052 
00053 
00054 FedmIscReport_ReaderDiagnostic::FedmIscReport_ReaderDiagnostic(FEDM_ISCReader* pReader)
00055 {
00056         m_pReader = pReader;
00057 }
00058 
00059 FedmIscReport_ReaderDiagnostic::~FedmIscReport_ReaderDiagnostic()
00060 {
00061 }
00062 
00063 string FedmIscReport_ReaderDiagnostic::BuildReport(unsigned char ucMode)
00064 {
00065 #if _MSC_VER <= 1200
00066         m_sReport.erase(m_sReport.begin(), m_sReport.end());
00067 #else
00068         m_sReport.clear();
00069 #endif
00070         BuildReport(ucMode, m_sReport);
00071         return m_sReport;
00072 }
00073 
00074 string FedmIscReport_ReaderDiagnostic::BuildReport(unsigned char ucMode, FEDM_ISC_READER_DIAGNOSTIC* pInfo)
00075 {
00076 #if _MSC_VER <= 1200
00077         m_sReport.erase(m_sReport.begin(), m_sReport.end());
00078 #else
00079         m_sReport.clear();
00080 #endif
00081         BuildReport(ucMode, m_sReport, pInfo);
00082         return m_sReport;
00083 }
00084 
00085 int FedmIscReport_ReaderDiagnostic::BuildReport(unsigned char ucMode, string& sReport)
00086 {
00087         if(m_pReader == NULL)
00088                 return FEDM_ERROR_NULL_POINTER;
00089 
00090         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00091 
00092         switch(ucMode)
00093         {
00094         case 0x01:
00095                 if(pInfo->bIsMode0x01Read)
00096                         Add0x01InfoText(sReport);
00097                 break;
00098 
00099         case 0x02:
00100                 if(pInfo->bIsMode0x02Read)
00101                         Add0x02InfoText(sReport);
00102                 break;
00103 
00104         case 0x03:
00105                 if(pInfo->bIsMode0x03Read)
00106                         Add0x03InfoText(sReport);
00107                 break;
00108 
00109         case 0x04:
00110                 if(pInfo->bIsMode0x04Read)
00111                         Add0x04InfoText(sReport);
00112                 break;
00113 
00114         case 0x05:
00115                 if(pInfo->bIsMode0x05Read)
00116                         Add0x05InfoText(sReport);
00117                 break;
00118 
00119         case 0x06:
00120                 if(pInfo->bIsMode0x06Read)
00121                         Add0x06InfoText(sReport);
00122                 break;
00123 
00124         case 0x07:
00125                 if(pInfo->bIsMode0x07Read)
00126                         Add0x07InfoText(sReport);
00127                 break;
00128 
00129         case 0x20:
00130                 if(pInfo->bIsMode0x20Read)
00131                         Add0x20InfoText(sReport);
00132                 break;
00133 
00134         case 0x21:
00135                 if(pInfo->bIsMode0x21Read)
00136                         Add0x21InfoText(sReport);
00137                 break;
00138 
00139         case 0xFF:
00140                 AddAllInfoText(sReport);
00141                 break;
00142 
00143         default:
00144                 break;
00145         }
00146 
00147         return FEDM_OK;
00148 }
00149 
00150 int FedmIscReport_ReaderDiagnostic::BuildReport(unsigned char ucMode, string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo)
00151 {
00152         if(pInfo == NULL)
00153                 return FEDM_ERROR_NULL_POINTER;
00154 
00155         switch(ucMode)
00156         {
00157         case 0x01:
00158                 if(pInfo->bIsMode0x01Read)
00159                         Add0x01InfoText(sReport, pInfo);
00160                 break;
00161 
00162         case 0x02:
00163                 if(pInfo->bIsMode0x02Read)
00164                         Add0x02InfoText(sReport, pInfo);
00165                 break;
00166 
00167         case 0x03:
00168                 if(pInfo->bIsMode0x03Read)
00169                         Add0x03InfoText(sReport, pInfo);
00170                 break;
00171 
00172         case 0x04:
00173                 if(pInfo->bIsMode0x04Read)
00174                         Add0x04InfoText(sReport, pInfo);
00175                 break;
00176 
00177         case 0x05:
00178                 if(pInfo->bIsMode0x05Read)
00179                         Add0x05InfoText(sReport, pInfo);
00180                 break;
00181 
00182         case 0x06:
00183                 if(pInfo->bIsMode0x06Read)
00184                         Add0x06InfoText(sReport, pInfo);
00185                 break;
00186 
00187         case 0x07:
00188                 if(pInfo->bIsMode0x07Read)
00189                         Add0x07InfoText(sReport, pInfo);
00190                 break;
00191 
00192         case 0x20:
00193                 if(pInfo->bIsMode0x20Read)
00194                         Add0x20InfoText(sReport, pInfo);
00195                 break;
00196 
00197         case 0x21:
00198                 if(pInfo->bIsMode0x21Read)
00199                         Add0x21InfoText(sReport, pInfo);
00200                 break;
00201 
00202         case 0xFF:
00203                 AddAllInfoText(sReport, pInfo);
00204                 break;
00205 
00206         default:
00207                 break;
00208         }
00209 
00210         return FEDM_OK;
00211 }
00212 
00213 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText(string& sReport, bool bSingle)
00214 {
00215         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00216         unsigned int uiReaderType = m_pReader->GetReaderType();
00217         pInfo->ucReserved3                      = ((uiReaderType & 0xFF000000)>>24);
00218         pInfo->ucReaderTypeOfClass      = ((uiReaderType & 0x00FF0000)>>16);
00219         pInfo->ucReaderClassGen         = ((uiReaderType & 0x0000FF00)>> 8);
00220         pInfo->ucReaderClass            = ((uiReaderType & 0x000000FF));
00221 
00222         Add0x01InfoText(sReport, pInfo, bSingle);
00223 }
00224 
00225 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00226 {
00227         switch(pInfo->GetReaderType())
00228         {
00229         case FEDM_ISC_TYPE_ISCMR102:
00230         case FEDM_ISC_TYPE_ISCMR10X:
00231                 Add0x01InfoText_MR102(sReport, pInfo, bSingle);
00232                 break;
00233         
00234         case FEDM_ISC_TYPE_ISCMR200:
00235                 Add0x01InfoText_MR200(sReport, pInfo, bSingle);
00236                 break;
00237         
00238         case FEDM_ISC_TYPE_ISCPRH200:
00239                 Add0x01InfoText_PRH200(sReport, pInfo, bSingle);
00240                 break;
00241         
00242         case FEDM_ISC_TYPE_ISCLR200:
00243                 Add0x01InfoText_LR200(sReport, pInfo, bSingle);
00244                 break;
00245         
00246         case FEDM_ISC_TYPE_ISCLR1002:
00247                 Add0x01InfoText_LR1002(sReport, pInfo, bSingle);
00248                 break;
00249 
00250         case FEDM_ISC_TYPE_ISCLR2000:
00251         case FEDM_ISC_TYPE_ISCLR2500_A:
00252         case FEDM_ISC_TYPE_ISCLR2500_B:
00253                 Add0x01InfoText_LR2000(sReport, pInfo, bSingle);
00254                 break;
00255         
00256         case FEDM_ISC_TYPE_ISCMRU200:
00257         case FEDM_ISC_TYPE_MAXU1002:
00258         case FEDM_ISC_TYPE_ISCLRU1002:
00259         case FEDM_ISC_TYPE_ISCLRU1000:
00260         case FEDM_ISC_TYPE_ISCLRU2000:
00261         case FEDM_ISC_TYPE_ISCLRU3000:
00262                 Add0x01InfoText_LRU1000(sReport, pInfo, bSingle);
00263                 break;
00264 
00265         default:
00266                 break;
00267         }
00268 }
00269 
00270 
00271 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_MR102(string& sReport, bool bSingle)
00272 {
00273         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00274         Add0x01InfoText_MR102(sReport, pInfo, bSingle);
00275 }
00276 
00277 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_MR102(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00278 {
00279         bool bTmpAlarm          = false;
00280         bool bZAnt                      = false;
00281         bool bNoise                     = false;
00282         bool bControl           = false;
00283         bool bDCAntError        = false;
00284         unsigned char   ucData[13];
00285 
00286         if(bSingle)
00287         {
00288                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00289         }
00290         else
00291         {
00292                 ucData[0] = pInfo->ucFlagsA;
00293                 ucData[1] = pInfo->ucFlagsB;
00294         }
00295 
00296         
00297         if(ucData[0] & 0x80)
00298                 bTmpAlarm = true;
00299         if(ucData[0] & 0x04)
00300                 bZAnt = true;
00301         if(ucData[0] & 0x02)
00302                 bNoise = true;
00303         if(ucData[0] & 0x10)
00304                 bControl = true;
00305 
00306         if(ucData[1] & 0x04)
00307                 bDCAntError = true;
00308 
00309         sReport += " ";
00310         sReport += "General RF Status:";
00311         sReport += "\r\n";
00312 
00313         if(bNoise)
00314                 sReport += "\t1: Noise-Level..........Error\r\n";
00315         else
00316                 sReport += "\t1: Noise-Level..........OK\r\n";
00317 
00318         if(bZAnt)
00319                 sReport += "\t2: Ant |Z| <> 50 Ohm....Yes\r\n";
00320         else
00321                 sReport += "\t2: Ant |Z| <> 50 Ohm....No\r\n";
00322 
00323         if(bControl)
00324                 sReport += "\t4:  False Power.........Yes\r\n";
00325         else
00326                 sReport += "\t4:  False Power.........No\r\n";
00327 
00328 
00329         if(bDCAntError)
00330                 sReport += "\t10: DC-Power Antenna....Error\r\n";
00331         else
00332                 sReport += "\t10: DC-Power Antenna....OK\r\n";
00333 }
00334 
00335 
00336 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_MR200(string& sReport, bool bSingle)
00337 {
00338         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00339         Add0x01InfoText_MR200(sReport, pInfo, bSingle);
00340 }
00341 
00342 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_MR200(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00343 {
00344         bool bG50                       = false;
00345         bool bL50                       = false;
00346         bool bNoise                     = false;
00347         bool bRFHardware        = false;
00348         bool bMux                       = false;
00349         bool bDat                       = false;
00350         unsigned char   ucData[13];
00351 
00352         if(bSingle)
00353         {
00354                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00355         }
00356         else
00357         {
00358                 ucData[0] = pInfo->ucFlagsA;
00359                 ucData[1] = pInfo->ucFlagsB;
00360         }
00361 
00362         
00363         if(ucData[0] & 0x08)
00364                 bG50 = true;
00365         if(ucData[0] & 0x04)
00366                 bL50 = true;
00367         if(ucData[0] & 0x02)
00368                 bNoise = true;
00369         if(ucData[0] & 0x01)
00370                 bRFHardware = true;
00371 
00372         if(ucData[1] & 0x01)
00373                 bMux = true;
00374         if(ucData[1] & 0x02)
00375                 bDat = true;
00376 
00377         sReport += " ";
00378         sReport += "General RF Status:";
00379         sReport += "\r\n";
00380 
00381         if(bRFHardware)
00382                 sReport += "\t0: RF-Hardware..........Error\r\n";
00383         else
00384                 sReport += "\t0: RF-Hardware..........OK\r\n";
00385 
00386         if(bNoise)
00387                 sReport += "\t1: Noise-Level..........Error\r\n";
00388         else
00389                 sReport += "\t1: Noise-Level..........OK\r\n";
00390 
00391         if(!bL50 && !bG50)
00392         {
00393                 sReport += "\t2:.|Z|..................OK\r\n";
00394         }
00395         else
00396         {
00397                 if(bG50)
00398                         sReport += "\t2:.|Z|..................> 50 Ohm\r\n";
00399                 else if(bL50)
00400                         sReport += "\t2:.|Z|..................< 50 Ohm\r\n";
00401         }
00402 
00403         if(bMux)
00404                 sReport += "\t8: Mux-Status...........OK\r\n";
00405         else
00406                 sReport += "\t8: Mux-Status...........NOK\r\n";
00407 
00408         if(bDat)
00409                 sReport += "\t8: DAT-Status...........OK\r\n";
00410         else
00411                 sReport += "\t8: DAT-Status...........NOK\r\n";
00412 }
00413 
00414 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_PRH200(string& sReport, bool bSingle)
00415 {
00416         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00417         Add0x01InfoText_PRH200(sReport, pInfo, bSingle);
00418 }
00419 
00420 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_PRH200(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00421 {
00422         bool bTmpAlarm                          = false;
00423         bool bTmpWarn                           = false;
00424         unsigned char ucBatAlarm        = 0x00;
00425         unsigned char   ucData[13];
00426 
00427         if(bSingle)
00428         {
00429                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00430         }
00431         else
00432         {
00433                 ucData[0] = pInfo->ucFlagsA;
00434                 ucData[1] = pInfo->ucFlagsB;
00435         }
00436 
00437         
00438         if(ucData[0] & 0x80)
00439                 bTmpAlarm = true;
00440         if(ucData[0] & 0x20)
00441                 bTmpWarn = true;
00442 
00443         ucBatAlarm = ((ucData[1] & 0x30) >> 4);
00444 
00445         sReport += " ";
00446         sReport += "Alarm Status:";
00447         sReport += "\r\n";
00448 
00449         if(bTmpWarn)
00450                 sReport += "\t5: Temp-Warning.........Yes\r\n";
00451         else
00452                 sReport += "\t5: Temp-Warning.........No\r\n";
00453 
00454         if(bTmpAlarm)
00455                 sReport += "\t7: Temp-Alarm...........Yes\r\n";
00456         else
00457                 sReport += "\t7: Temp-Alarm...........No\r\n";
00458 
00459         switch(ucBatAlarm)
00460         {
00461         case 0:
00462                 sReport += "\t8: Battery-Level........OK\r\n";
00463                 break;
00464         case 1:
00465                 sReport += "\t8: Battery-Level.......<10%\r\n";
00466                 break;
00467         case 2:
00468                 sReport += "\t8: Battery-Level.......<5%\r\n";
00469                 break;
00470         case 3:
00471                 sReport += "\t8: Battery-Level.......<1%\r\n";
00472                 break;
00473         }
00474 }
00475 
00476 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LR200(string& sReport, bool bSingle)
00477 {
00478         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00479         Add0x01InfoText_LR200(sReport, pInfo, bSingle);
00480 }
00481 
00482 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LR200(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00483 {
00484         bool bTmpAlarm          = false;
00485         bool bBit6                      = false;
00486         bool bTmpWarn           = false;
00487         bool bControl           = false;
00488         bool bG50                       = false;
00489         bool bL50                       = false;
00490         bool bNoise                     = false;
00491         bool bRFHardware        = false;
00492         bool bMux                       = false;
00493         unsigned char   ucData[13];
00494 
00495         if(bSingle)
00496         {
00497                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00498         }
00499         else
00500         {
00501                 ucData[0] = pInfo->ucFlagsA;
00502                 ucData[1] = pInfo->ucFlagsB;
00503         }
00504 
00505         
00506         if(ucData[0] & 0x80)
00507                 bTmpAlarm = true;
00508         if(ucData[0] & 0x40)
00509                 bBit6 = true;
00510         if(ucData[0] & 0x20)
00511                 bTmpWarn = true;
00512         if(ucData[0] & 0x10)
00513                 bControl = true;
00514         if(ucData[0] & 0x08)
00515                 bG50 = true;
00516         if(ucData[0] & 0x04)
00517                 bL50 = true;
00518         if(ucData[0] & 0x02)
00519                 bNoise = true;
00520         if(ucData[0] & 0x01)
00521                 bRFHardware = true;
00522 
00523         if(ucData[1] & 0x01)
00524                 bMux = true;
00525 
00526         sReport += " ";
00527         sReport += "General RF Status:";
00528         sReport += "\r\n";
00529 
00530         if(bRFHardware)
00531                 sReport += "\t0: RF-Hardware..........Error\r\n";
00532         else
00533                 sReport += "\t0: RF-Hardware..........OK\r\n";
00534 
00535         if(bNoise)
00536                 sReport += "\t1: Noise-Level..........Error\r\n";
00537         else
00538                 sReport += "\t1: Noise-Level..........OK\r\n";
00539 
00540         if(!bL50 && !bG50)
00541         {
00542                 sReport += "\t2:.|Z|..................OK\r\n";
00543         }
00544         else
00545         {
00546                 if(bG50)
00547                         sReport += "\t2:.|Z|..................> 50 Ohm\r\n";
00548                 else if(bL50)
00549                         sReport += "\t2:.|Z|..................< 50 Ohm\r\n";
00550         }
00551 
00552         if(bControl)
00553                 sReport += "\t4: False Power..........Yes\r\n";
00554         else
00555                 sReport += "\t4: False Power..........No\r\n";
00556 
00557         if(bTmpWarn)
00558                 sReport += "\t5: Temp-Warning.........Yes\r\n";
00559         else
00560                 sReport += "\t5: Temp-Warning.........No\r\n";
00561 
00562         if(bBit6)
00563                 sReport += "\t6: .....................True\r\n";
00564         else
00565                 sReport += "\t6: .....................False\r\n";
00566 
00567         if(bTmpAlarm)
00568                 sReport += "\t7: Temp-Alarm...........Yes\r\n";
00569         else
00570                 sReport += "\t7: Temp-Alarm...........No\r\n";
00571 
00572         if(bMux)
00573                 sReport += "\t8: MUX-Status...........NOK\r\n";
00574         else
00575                 sReport += "\t8: MUX-Status...........OK\r\n";
00576 }
00577 
00578 
00579 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LR1002(string& sReport, bool bSingle)
00580 {
00581         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00582         Add0x01InfoText_LR1002(sReport, pInfo, bSingle);
00583 }
00584 
00585 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LR1002(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00586 {
00587         bool bTmpAlarm          = false;
00588         bool bTmpWarn           = false;
00589         bool bControl           = false;
00590         bool bZAnt                      = false;
00591         bool bNoise                     = false;
00592         bool bRFHardware        = false;
00593         bool bMux                       = false;
00594         bool bDat                       = false;
00595         bool bDCAntError        = false;
00596         unsigned char   ucData[13];
00597 
00598         if(bSingle)
00599         {
00600                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00601         }
00602         else
00603         {
00604                 ucData[0] = pInfo->ucFlagsA;
00605                 ucData[1] = pInfo->ucFlagsB;
00606         }
00607 
00608         
00609         if(ucData[0] & 0x80)
00610                 bTmpAlarm = true;
00611         if(ucData[0] & 0x20)
00612                 bTmpWarn = true;
00613         if(ucData[0] & 0x10)
00614                 bControl = true;
00615         if(ucData[0] & 0x04)
00616                 bZAnt = true;
00617         if(ucData[0] & 0x02)
00618                 bNoise = true;
00619         if(ucData[0] & 0x01)
00620                 bRFHardware = true;
00621 
00622         if(ucData[1] & 0x01)
00623                 bMux = true;
00624         if(ucData[1] & 0x02)
00625                 bDat = true;
00626         if(ucData[1] & 0x04)
00627                 bDCAntError = true;
00628 
00629         sReport += " ";
00630         sReport += "General RF Status:";
00631         sReport += "\r\n";
00632 
00633         if(bRFHardware)
00634                 sReport += "\t0:  RF-Hardware.........Error\r\n";
00635         else
00636                 sReport += "\t0:  RF-Hardware.........OK\r\n";
00637 
00638         if(bNoise)
00639                 sReport += "\t1:  Noise-Level.........Error\r\n";
00640         else
00641                 sReport += "\t1:  Noise-Level.........OK\r\n";
00642 
00643         if(bZAnt)
00644                 sReport += "\t2:  Ant |Z| <> 50 Ohm...Yes\r\n";
00645         else
00646                 sReport += "\t2:  Ant |Z| <> 50 Ohm...No\r\n";
00647 
00648         if(bControl)
00649                 sReport += "\t4:  False Power.........Yes\r\n";
00650         else
00651                 sReport += "\t4:  False Power.........No\r\n";
00652 
00653         if(bTmpWarn)
00654                 sReport += "\t5:  Temp-Warning........Yes\r\n";
00655         else
00656                 sReport += "\t5:  Temp-Warning........No\r\n";
00657 
00658         if(bTmpAlarm)
00659                 sReport += "\t7:  Temp-Alarm..........Yes\r\n";
00660         else
00661                 sReport += "\t7:  Temp-Alarm..........No\r\n";
00662 
00663         if(bMux)
00664                 sReport += "\t8:  MUX-Status..........NOK\r\n";
00665         else
00666                 sReport += "\t8:  MUX-Status..........OK\r\n";
00667 
00668         if(bDat)
00669                 sReport += "\t9:  DAT-Status..........NOK\r\n";
00670         else
00671                 sReport += "\t9:  DAT-Status..........OK\r\n";
00672 
00673 
00674         if(bDCAntError)
00675                 sReport += "\t10: DC-Power Antenna....Error\r\n";
00676         else
00677                 sReport += "\t10: DC-Power Antenna....OK\r\n";
00678 }
00679 
00680 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LR2000(string& sReport, bool bSingle)
00681 {
00682         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00683         Add0x01InfoText_LR2000(sReport, pInfo, bSingle);
00684 }
00685 
00686 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LR2000(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00687 {
00688         bool bTmpAlarm          = false;
00689         bool bSync                      = false;
00690         bool bTmpWarn           = false;
00691         bool bControl           = false;
00692         bool bG50                       = false;
00693         bool bL50                       = false;
00694         bool bNoise                     = false;
00695         bool bRFHardware        = false;
00696         bool bMux                       = false;
00697         bool bDat                       = false;
00698         unsigned char   ucData[13];
00699 
00700         if(bSingle)
00701         {
00702                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00703         }
00704         else
00705         {
00706                 ucData[0] = pInfo->ucFlagsA;
00707                 ucData[1] = pInfo->ucFlagsB;
00708         }
00709 
00710         
00711         if(ucData[0] & 0x80)
00712                 bTmpAlarm = true;
00713         if(ucData[0] & 0x40)
00714                 bSync = true;
00715         if(ucData[0] & 0x20)
00716                 bTmpWarn = true;
00717         if(ucData[0] & 0x10)
00718                 bControl = true;
00719         if(ucData[0] & 0x08)
00720                 bG50 = true;
00721         if(ucData[0] & 0x04)
00722                 bL50 = true;
00723         if(ucData[0] & 0x02)
00724                 bNoise = true;
00725         if(ucData[0] & 0x01)
00726                 bRFHardware = true;
00727 
00728         if(ucData[1] & 0x01)
00729                 bMux = true;
00730         if(ucData[1] & 0x02)
00731                 bDat = true;
00732 
00733         sReport += " ";
00734         sReport += "General RF Status:";
00735         sReport += "\r\n";
00736 
00737         if(bRFHardware)
00738                 sReport += "\t0: RF-Hardware..........Error\r\n";
00739         else
00740                 sReport += "\t0: RF-Hardware..........OK\r\n";
00741 
00742         if(bNoise)
00743                 sReport += "\t1: .....................Error\r\n";
00744         else
00745                 sReport += "\t1: .....................OK\r\n";
00746 
00747         if(!bL50 && !bG50)
00748         {
00749                 sReport += "\t2:.|Z|..................OK\r\n";
00750         }
00751         else
00752         {
00753                 if(bG50 && bL50)
00754                 {
00755                         sReport += "\t2:.|Z|..................Phase Error\r\n";
00756                 }
00757                 else
00758                 {
00759                         if(bG50)
00760                                 sReport += "\t2:.|Z|..................> 50 Ohm\r\n";
00761                         else if(bL50)
00762                                 sReport += "\t2:.|Z|..................< 50 Ohm\r\n";
00763                 }
00764         }
00765 
00766         if(bControl)
00767                 sReport += "\t4: False Power..........Yes\r\n";
00768         else
00769                 sReport += "\t4: False Power..........No\r\n";
00770 
00771         if(bTmpWarn)
00772                 sReport += "\t5: Temp-Warning.........Yes\r\n";
00773         else
00774                 sReport += "\t5: Temp-Warning.........No\r\n";
00775 
00776         if(bSync)
00777                 sReport += "\t6: Sync.................Timeout\r\n";
00778         else
00779                 sReport += "\t6: Sync.................OK\r\n";
00780 
00781         if(bTmpAlarm)
00782                 sReport += "\t7: Temp-Alarm...........Yes\r\n";
00783         else
00784                 sReport += "\t7: Temp-Alarm...........No\r\n";
00785 
00786         if(bMux)
00787                 sReport += "\t8: MUX-Status...........NOK\r\n";
00788         else
00789                 sReport += "\t8: MUX-Status...........OK\r\n";
00790 
00791         if(bDat)
00792                 sReport += "\t9: DAT-Status...........NOK\r\n";
00793         else
00794                 sReport += "\t9: DAT-Status...........OK\r\n";
00795 }
00796 
00797 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LRU1000(string& sReport, bool bSingle)
00798 {
00799         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00800         Add0x01InfoText_LRU1000(sReport, pInfo, bSingle);
00801 }
00802 
00803 void FedmIscReport_ReaderDiagnostic::Add0x01InfoText_LRU1000(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00804 {
00805         bool bChAlloc           = false;
00806         bool bControl           = false;
00807         bool bNoise                     = false;
00808         bool bRFHardware        = false;
00809         bool bZAnt4                     = false;
00810         bool bZAnt3                     = false;
00811         bool bZAnt2                     = false;
00812         bool bZAnt1                     = false;
00813         unsigned char   ucData[13];
00814 
00815         if(bSingle)
00816         {
00817                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00818         }
00819         else
00820         {
00821                 ucData[0] = pInfo->ucFlagsA;
00822                 ucData[1] = pInfo->ucFlagsB;
00823         }
00824         
00825         if(ucData[0] & 0x20)
00826                 bChAlloc = true;
00827         if(ucData[0] & 0x10)
00828                 bControl = true;
00829         if(ucData[0] & 0x02)
00830                 bNoise = true;
00831         if(ucData[0] & 0x01)
00832                 bRFHardware = true;
00833 
00834         if(ucData[1] & 0x08)
00835                 bZAnt4 = true;
00836         if(ucData[1] & 0x04)
00837                 bZAnt3 = true;
00838         if(ucData[1] & 0x02)
00839                 bZAnt2 = true;
00840         if(ucData[1] & 0x01)
00841                 bZAnt1 = true;
00842 
00843         sReport += " ";
00844         sReport += "General RF Status:";
00845         sReport += "\r\n";
00846 
00847         if(bRFHardware)
00848                 sReport += "\t0: RF-Hardware..........Error\r\n";
00849         else
00850                 sReport += "\t0: RF-Hardware..........OK\r\n";
00851 
00852         if(bNoise)
00853                 sReport += "\t1: Noise-Level..........Error\r\n";
00854         else
00855                 sReport += "\t1: Noise-Level..........OK\r\n";
00856 
00857         if(bControl)
00858                 sReport += "\t4: False Power..........Yes\r\n";
00859         else
00860                 sReport += "\t4: False Power..........No\r\n";
00861 
00862         if(bChAlloc)
00863                 sReport += "\t5: Channel Allocation...Yes\r\n";
00864         else
00865                 sReport += "\t5: Channel Allocation...No\r\n";
00866 
00867         sReport += "\r\n";
00868 
00869         if(bZAnt1)
00870                 sReport += "\t0: Ant1 |Z| <> 50 Ohm...Yes\r\n";
00871         else
00872                 sReport += "\t0: Ant1 |Z| <> 50 Ohm...No\r\n";
00873 
00874         if(bZAnt2)
00875                 sReport += "\t1: Ant2 |Z| <> 50 Ohm...Yes\r\n";
00876         else
00877                 sReport += "\t1: Ant2 |Z| <> 50 Ohm...No\r\n";
00878 
00879         if(m_pReader->GetReaderType() != FEDM_ISC_TYPE_ISCMRU200)
00880         {
00881                 if(bZAnt3)
00882                         sReport += "\t2: Ant3 |Z| <> 50 Ohm...Yes\r\n";
00883                 else
00884                         sReport += "\t2: Ant3 |Z| <> 50 Ohm...No\r\n";
00885 
00886                 if(bZAnt4)
00887                         sReport += "\t3: Ant4 |Z| <> 50 Ohm...Yes\r\n";
00888                 else
00889                         sReport += "\t3: Ant4 |Z| <> 50 Ohm...No\r\n";
00890         }
00891 }
00892 
00893 void FedmIscReport_ReaderDiagnostic::Add0x02InfoText(string& sReport, bool bSingle)
00894 {
00895         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00896         Add0x02InfoText(sReport, pInfo, bSingle);
00897 }
00898 
00899 void FedmIscReport_ReaderDiagnostic::Add0x02InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00900 {
00901         char cBuffer[16];
00902         unsigned char   ucData[13];
00903         unsigned int uiImpedance = 0;
00904 
00905         unsigned int uiReaderType = m_pReader->GetReaderType();
00906 
00907         if(bSingle)
00908         {
00909                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00910                 if(uiReaderType == FEDM_ISC_TYPE_ISCMR200)
00911                 {
00912                         uiImpedance = (((unsigned int)ucData[0])<<8) + ucData[1];
00913                 }
00914         }
00915         else
00916         {
00917                 switch(uiReaderType)
00918                 {
00919                 case FEDM_ISC_TYPE_ISCMR200:
00920                         uiImpedance = pInfo->uiImpedance;
00921                         break;
00922 
00923                 case FEDM_ISC_TYPE_ISCLR200:
00924                 case FEDM_ISC_TYPE_ISCLR2000:
00925                         ucData[0] = pInfo->ucRfPower;
00926                         ucData[1] = pInfo->ucRfModulation;
00927                         ucData[2] = pInfo->ucAmpTemp;
00928                         break;
00929                 }
00930         }
00931 
00932 
00933         if(!bSingle)
00934                 sReport += "\r\n";
00935 
00936         switch(uiReaderType)
00937         {
00938         case FEDM_ISC_TYPE_ISCLR2000:
00939                 sprintf(cBuffer, "%u", (unsigned int)ucData[2]);
00940                 sReport += "\tTemperature of RF final stage.: ";
00941                 sReport += cBuffer;
00942                 sReport += " (°C)\r\n";
00943                 break;
00944         }
00945 }
00946 
00947 void FedmIscReport_ReaderDiagnostic::Add0x03InfoText(string& sReport, bool bSingle)
00948 {
00949         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
00950         Add0x03InfoText(sReport, pInfo, bSingle);
00951 }
00952 
00953 void FedmIscReport_ReaderDiagnostic::Add0x03InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
00954 {
00955         char cBuffer[16];
00956         unsigned char   ucData[13];
00957 
00958         if(bSingle)
00959         {
00960                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
00961         }
00962         else
00963         {
00964                 ucData[0] = pInfo->ucMuxStatusCh1;
00965                 ucData[1] = pInfo->ucMuxStatusCh2;
00966                 ucData[2] = pInfo->ucMuxStatusCh3;
00967                 ucData[3] = pInfo->ucMuxStatusCh4;
00968                 ucData[4] = pInfo->ucMuxStatusCh5;
00969                 ucData[5] = pInfo->ucMuxStatusCh6;
00970                 ucData[6] = pInfo->ucMuxStatusCh7;
00971                 ucData[7] = pInfo->ucMuxStatusCh8;
00972         }
00973 
00974 
00975         if(!bSingle)
00976                 sReport += "\r\n";
00977 
00978         sReport += " ";
00979         sReport += "Multiplexer Status:";
00980         sReport += "\r\n";
00981 
00982         sprintf(cBuffer, "0x%02X\r\n", ucData[0]);
00983         sReport += "\tMUX-Status Channel 1....";
00984         sReport += cBuffer;
00985         sprintf(cBuffer, "0x%02X\r\n", ucData[1]);
00986         sReport += "\tMUX-Status Channel 2....";
00987         sReport += cBuffer;
00988         sprintf(cBuffer, "0x%02X\r\n", ucData[2]);
00989         sReport += "\tMUX-Status Channel 3....";
00990         sReport += cBuffer;
00991         sprintf(cBuffer, "0x%02X\r\n", ucData[3]);
00992         sReport += "\tMUX-Status Channel 4....";
00993         sReport += cBuffer;
00994         sprintf(cBuffer, "0x%02X\r\n", ucData[4]);
00995         sReport += "\tMUX-Status Channel 5....";
00996         sReport += cBuffer;
00997         sprintf(cBuffer, "0x%02X\r\n", ucData[5]);
00998         sReport += "\tMUX-Status Channel 6....";
00999         sReport += cBuffer;
01000         sprintf(cBuffer, "0x%02X\r\n", ucData[6]);
01001         sReport += "\tMUX-Status Channel 7....";
01002         sReport += cBuffer;
01003         sprintf(cBuffer, "0x%02X\r\n", ucData[7]);
01004         sReport += "\tMUX-Status Channel 8....";
01005         sReport += cBuffer;
01006 }
01007 
01008 void FedmIscReport_ReaderDiagnostic::Add0x04InfoText(string& sReport, bool bSingle)
01009 {
01010         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
01011         Add0x04InfoText(sReport, pInfo, bSingle);
01012 }
01013 
01014 void FedmIscReport_ReaderDiagnostic::Add0x04InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
01015 {
01016         bool bEEDev1            = false;
01017         bool bEEDev2            = false;
01018         bool bFilter            = false;
01019         bool bRFDecoder         = false;
01020         bool bParaMismatch      = false;
01021         bool bPeopleCounterError        = false;
01022         bool bExt_ADC_DAC_Error = false;
01023         unsigned char   ucData[13];
01024 
01025         unsigned int uiReaderType = m_pReader->GetReaderType();
01026 
01027         if(bSingle)
01028         {
01029                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
01030         }
01031         else
01032         {
01033                 ucData[0] = pInfo->ucIntErrorA;
01034                 ucData[1] = pInfo->ucIntErrorB;
01035         }
01036 
01037         
01038         if(ucData[1] & 0x01)
01039                 bEEDev1 = true;
01040         if(ucData[1] & 0x02)
01041                 bEEDev2 = true;
01042         if(ucData[1] & 0x04)
01043                 bFilter = true;
01044         if(ucData[1] & 0x08)
01045                 bRFDecoder = true;
01046         if(ucData[1] & 0x10)
01047                 bParaMismatch = true;
01048         if(ucData[1] & 0x20)
01049                 bPeopleCounterError = true;
01050         if(ucData[1] & 0x40)
01051                 bExt_ADC_DAC_Error = true;
01052 
01053         if(!bSingle)
01054                 sReport += "\r\n";
01055 
01056         sReport += " ";
01057         sReport += "Hardware and Configuration Status:";
01058         sReport += "\r\n";
01059 
01060         sReport += "\tCommunication with...\r\n";
01061 
01062         if(bEEDev1)
01063                 sReport += "\t0: EEPROM-Device1.......Error\r\n";
01064         else
01065                 sReport += "\t0: EEPROM-Device1.......OK\r\n";
01066 
01067         switch(uiReaderType)
01068         {
01069         case FEDM_ISC_TYPE_ISCPRH102:
01070         case FEDM_ISC_TYPE_ISCPRH200:
01071         case FEDM_ISC_TYPE_ISCPRHD102:
01072         case FEDM_ISC_TYPE_ISCMU02:
01073         case FEDM_ISC_TYPE_ISCMR102:
01074         case FEDM_ISC_TYPE_ISCMR10X:
01075         case FEDM_ISC_TYPE_MAXU1002:
01076         case FEDM_ISC_TYPE_ISCLRU1002:
01077                 break;
01078 
01079         default:
01080                 if(bEEDev2)
01081                         sReport += "\t1: EEPROM-Device2.......Error\r\n";
01082                 else
01083                         sReport += "\t1: EEPROM-Device2.......OK\r\n";
01084                 break;
01085         }
01086 
01087         switch(uiReaderType)
01088         {
01089         case FEDM_ISC_TYPE_MAXU1002:
01090         case FEDM_ISC_TYPE_ISCLRU1002:
01091                 break;
01092 
01093         case FEDM_ISC_TYPE_ISCLR2000:
01094         case FEDM_ISC_TYPE_ISCLR2500_A:
01095         case FEDM_ISC_TYPE_ISCLR2500_B:
01096                 if(bFilter)
01097                         sReport += "\t2: RF-Power.............Out of Control Range\r\n";
01098                 else
01099                         sReport += "\t2: RF-Power.............OK\r\n";
01100                 break;
01101 
01102         case FEDM_ISC_TYPE_ISCLRU2000:
01103         case FEDM_ISC_TYPE_ISCLRU3000:
01104                 if(bFilter)
01105                         sReport += "\t2: Hardware-Filter......Error\r\n";
01106                 else
01107                         sReport += "\t2: Hardware-Filter......OK\r\n";
01108                 break;
01109         }
01110 
01111         switch(uiReaderType)
01112         {
01113         case FEDM_ISC_TYPE_ISCPRH200:
01114         case FEDM_ISC_TYPE_ISCMR102:
01115         case FEDM_ISC_TYPE_ISCMR10X:
01116                 break;
01117 
01118         default:
01119                 if(bRFDecoder)
01120                         sReport += "\t3: RF-Decoder...........Error\r\n";
01121                 else
01122                         sReport += "\t3: RF-Decoder...........OK\r\n";
01123                 break;
01124         }
01125 
01126         switch(uiReaderType)
01127         {
01128         case FEDM_ISC_TYPE_MAXU1002:
01129         case FEDM_ISC_TYPE_ISCLRU1002:
01130                 break;
01131 
01132         case FEDM_ISC_TYPE_ISCLRU2000:
01133         case FEDM_ISC_TYPE_ISCLRU3000:
01134                 if(bParaMismatch)
01135                         sReport += "\t4: Parameter Mismatch detected\r\n";
01136                 break;
01137         }
01138 
01139         switch(uiReaderType)
01140         {
01141         case FEDM_ISC_TYPE_MAXU1002:
01142         case FEDM_ISC_TYPE_ISCLRU1002:
01143                 break;
01144 
01145         case FEDM_ISC_TYPE_ISCLR2500_A:
01146         case FEDM_ISC_TYPE_ISCLR2500_B:
01147                 if(bPeopleCounterError)
01148                         sReport += "\t5: People Counter.......Error\r\n";
01149                 else
01150                         sReport += "\t5: People Counter.......OK\r\n";
01151                 break;
01152         }
01153 
01154 
01155         switch(uiReaderType)
01156         {
01157         case FEDM_ISC_TYPE_ISCLRU3000:
01158                 if(bExt_ADC_DAC_Error)
01159                         sReport += "\t6: Peripheral DAC/ADC Error detected\r\n";
01160                 break;
01161         }
01162 }
01163 
01164 void FedmIscReport_ReaderDiagnostic::Add0x05InfoText(string& sReport, bool bSingle)
01165 {
01166         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
01167         Add0x05InfoText(sReport, pInfo, bSingle);
01168 }
01169 
01170 void FedmIscReport_ReaderDiagnostic::Add0x05InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
01171 {
01172         char cBuffer[16];
01173         unsigned char   ucData[13];
01174         
01175         unsigned int uiReaderType = m_pReader->GetReaderType();
01176 
01177         if(bSingle)
01178         {
01179                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
01180         }
01181         else
01182         {
01183                 ucData[0] = pInfo->CNTRL_OUT1.ucMux_PowerAmp;
01184                 ucData[1] = pInfo->PHASE_LT50_OUT1.ucMux_PhaseError_Less;
01185                 ucData[2] = pInfo->PHASE_GT50_OUT1.ucMux_PhaseError_More;
01186                 ucData[3] = pInfo->CNTRL_OUT2.ucMux_PowerAmp;
01187                 ucData[4] = pInfo->PHASE_LT50_OUT2.ucMux_PhaseError_Less;
01188                 ucData[5] = pInfo->PHASE_GT50_OUT2.ucMux_PhaseError_More;
01189                 ucData[6] = pInfo->CNTRL_OUT3.ucMux_PowerAmp;
01190                 ucData[7] = pInfo->PHASE_LT50_OUT3.ucMux_PhaseError_Less;
01191                 ucData[8] = pInfo->PHASE_GT50_OUT3.ucMux_PhaseError_More;
01192                 ucData[9] = pInfo->CNTRL_OUT4.ucMux_PowerAmp;
01193                 ucData[10] = pInfo->PHASE_LT50_OUT4.ucMux_PhaseError_Less;
01194                 ucData[11] = pInfo->PHASE_GT50_OUT4.ucMux_PhaseError_More;
01195         }
01196 
01197 
01198         if(!bSingle)
01199                 sReport += "\r\n";
01200 
01201         sReport += " ";
01202         sReport += "Status of external Multiplexer:";
01203         sReport += "\r\n";
01204 
01205         switch(uiReaderType)
01206         {
01207         case FEDM_ISC_TYPE_ISCLR1002:
01208         case FEDM_ISC_TYPE_ISCLR2000:
01209         case FEDM_ISC_TYPE_ISCLR2500_A:
01210         case FEDM_ISC_TYPE_ISCLR2500_B:
01211                 sprintf(cBuffer, "0x%02X\r\n", ucData[0]);
01212                 sReport += "\tPower-Status for ext. MUX at Output1...............";
01213                 sReport += cBuffer;
01214                 sprintf(cBuffer, "0x%02X\r\n", ucData[1]);
01215                 sReport += "\tImpedance-Status (<50R) for ext. MUX at Output1....";
01216                 sReport += cBuffer;
01217                 sprintf(cBuffer, "0x%02X\r\n", ucData[2]);
01218                 sReport += "\tImpedance-Status (>50R) for ext. MUX at Output1....";
01219                 sReport += cBuffer;
01220                 break;
01221         case FEDM_ISC_TYPE_ISCLRU2000:
01222         case FEDM_ISC_TYPE_ISCLRU3000:
01223                 sprintf(cBuffer, "0x%02X\r\n", ucData[0]);
01224                 sReport += "\tPower-Status for ext. MUX at Output1...............";
01225                 sReport += cBuffer;
01226                 sprintf(cBuffer, "0x%02X\r\n", ucData[3]);
01227                 sReport += "\tPower-Status for ext. MUX at Output2...............";
01228                 sReport += cBuffer;
01229                 sprintf(cBuffer, "0x%02X\r\n", ucData[6]);
01230                 sReport += "\tPower-Status for ext. MUX at Output3...............";
01231                 sReport += cBuffer;
01232                 sprintf(cBuffer, "0x%02X\r\n", ucData[9]);
01233                 sReport += "\tPower-Status for ext. MUX at Output4...............";
01234                 sReport += cBuffer;
01235                 break;
01236         }
01237 }
01238 
01239 void FedmIscReport_ReaderDiagnostic::Add0x06InfoText(string& sReport, bool bSingle)
01240 {
01241         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
01242         Add0x06InfoText(sReport, pInfo, bSingle);
01243 }
01244 
01245 void FedmIscReport_ReaderDiagnostic::Add0x06InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
01246 {
01247         char cBuffer[16];
01248         unsigned char   ucData[13];
01249 
01250         if(bSingle)
01251         {
01252                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 13);
01253         }
01254         else
01255         {
01256                 memcpy(&ucData[0], (char*)&pInfo->usErrorFlags, 6);
01257         }
01258 
01259         if(!bSingle)
01260                 sReport += "\r\n";
01261 
01262         sReport += " ";
01263         sReport += "MAX Status:";
01264         sReport += "\r\n";
01265 
01266         sReport += "\tError Flags...\r\n";
01267 
01268         if(ucData[1] & 0x01)
01269                 sReport += "\t 0: Real-Time Clock........Error\r\n";
01270         else
01271                 sReport += "\t 0: Real-Time Clock........OK\r\n";
01272 
01273         if(ucData[1] & 0x02)
01274                 sReport += "\t 1: Metadata...............Error\r\n";
01275         else
01276                 sReport += "\t 1: Metadata...............OK\r\n";
01277 
01278         if(ucData[1] & 0x04)
01279                 sReport += "\t 2: Timezone Table.........Error\r\n";
01280         else
01281                 sReport += "\t 2: Timezone Table.........OK\r\n";
01282 
01283         if(ucData[1] & 0x08)
01284                 sReport += "\t 3: Holiday Table..........Error\r\n";
01285         else
01286                 sReport += "\t 3: Holiday Table..........OK\r\n";
01287 
01288         if(ucData[1] & 0x10)
01289                 sReport += "\t 4: Access Table...........Error\r\n";
01290         else
01291                 sReport += "\t 4: Access Table...........OK\r\n";
01292 
01293         if(ucData[1] & 0x40)
01294                 sReport += "\t 6: Reader Config..........Error\r\n";
01295         else
01296                 sReport += "\t 6: Reader Config..........OK\r\n";
01297 
01298         if(ucData[1] & 0x80)
01299                 sReport += "\t 7: Table Update...........Error\r\n";
01300         else
01301                 sReport += "\t 7: Table Update...........OK\r\n";
01302 
01303         if(ucData[0] & 0x01)
01304                 sReport += "\t15: Event-Table Overflow...Yes\r\n";
01305         else
01306                 sReport += "\t15: Event-Table Overflow...No\r\n";
01307 
01308         sReport += "\r\n";
01309         sprintf(cBuffer, "%u\r\n", (((unsigned int)ucData[2])<<8) + ucData[3]);
01310         sReport += "\tEvent-Table-Size...........";
01311         sReport += cBuffer;
01312 
01313         sprintf(cBuffer, "%u\r\n", (((unsigned int)ucData[4])<<8) + ucData[5]);
01314         sReport += "\tEvent-Table-Length.........";
01315         sReport += cBuffer;
01316 }
01317 
01318 void FedmIscReport_ReaderDiagnostic::Add0x07InfoText(string& sReport, bool bSingle)
01319 {
01320         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
01321         Add0x07InfoText(sReport, pInfo, bSingle);
01322 }
01323 
01324 void FedmIscReport_ReaderDiagnostic::Add0x07InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
01325 {
01326         unsigned char ucData[30];
01327 
01328         if(bSingle)
01329         {
01330                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, &ucData[0], 30);
01331         }
01332         else
01333         {
01334                 memcpy(&ucData[0], (char*)&pInfo->ucNoOfLEDs, 30);
01335         }
01336 
01337         if(!bSingle)
01338                 sReport += "\r\n";
01339 
01340         sReport += " ";
01341         sReport += "LED Status:";
01342         sReport += "\r\n";
01343 
01344 
01345         // LED for RF-On
01346         switch(ucData[1] & 0x03)
01347         {
01348         case 0: // off
01349                 sReport += "\tRF-On (green)...............off";
01350                 break;
01351         case 1: // on
01352                 sReport += "\tRF-On (green)...............on";
01353                 break;
01354         case 2: // flashing
01355                 sReport += "\tRF-On (green)...............(flashing)";
01356                 break;
01357         default: // unknown
01358                 sReport += "\tRF-On (green)...............(unknown value)";
01359         }
01360         sReport += "\r\n";
01361 
01362         // LED for Tag detect
01363         switch( (ucData[1] & 0x30) >> 4)
01364         {
01365         case 0: // off
01366                 sReport += "\tTag detected (blue).........no";
01367                 break;
01368         case 1: // on
01369                 sReport += "\tTag detected (blue).........yes";
01370                 break;
01371         case 2: // flashing
01372                 sReport += "\tTag detected (blue).........(flashing)";
01373                 break;
01374         default: // unknown
01375                 sReport += "\tTag detected (blue).........(unknown value)";
01376         }
01377         sReport += "\r\n";
01378 
01379         // LED for Special Function
01380         switch(ucData[2] & 0x03)
01381         {
01382         case 0: // off
01383                 sReport += "\tSpecial Function (green)....disabled";
01384                 break;
01385         case 1: // on
01386                 sReport += "\tSpecial Function (green)....enabled";
01387                 break;
01388         case 2: // flashing
01389                 sReport += "\tSpecial Function (green)....(flashing)";
01390                 break;
01391         default: // unknown
01392                 sReport += "\tSpecial Function (green)....(unknown value)";
01393         }
01394         sReport += "\r\n";
01395 
01396         // LED for Tag detected with Special Function
01397         switch( (ucData[2] & 0x30) >> 4)
01398         {
01399         case 0: // off
01400                 sReport += "\tSF: Tag detected (red)......no";
01401                 break;
01402         case 1: // on
01403                 sReport += "\tSF: Tag detected (red)......yes";
01404                 break;
01405         case 2: // flashing
01406                 sReport += "\tSF: Tag detected (red)......(flashing)";
01407                 break;
01408         default: // unknown
01409                 sReport += "\tSF: Tag detected (red)......(unknown value)";
01410         }
01411         sReport += "\r\n";
01412 
01413         // LED for Wifi
01414         switch(ucData[3] & 0x03)
01415         {
01416         case 0: // off
01417                 sReport += "\tWiFi Status (white).........connected";
01418                 break;
01419         case 1: // on
01420                 sReport += "\tWiFi Status (white).........(on)";
01421                 break;
01422         case 2: // flashing
01423                 sReport += "\tWiFi Status (white).........ambiguous";
01424                 break;
01425         default: // unknown
01426                 sReport += "\tWiFi Status (white).........(unknown value)";
01427         }
01428         sReport += "\r\n";
01429 
01430         // LED for Battery
01431         switch(ucData[4])
01432         {
01433         case 0x00: // off
01434                 sReport += "\tBattery Status..............OK";
01435                 break;
01436         case 0x01: // orange on
01437                 sReport += "\tBattery Status (orange).....<15% of charge capacity";
01438                 break;
01439         case 0x10: // red on
01440                 sReport += "\tBattery Status (red)........empty; no RF";
01441                 break;
01442         case 0x20: // red flashing
01443                 sReport += "\tBattery Status (red flash)..automatic-off";
01444                 break;
01445         default: // unknown
01446                 sReport += "\tBattery Status...............(unknown value)";
01447         }
01448         sReport += "\r\n";
01449 
01450         // LED for Normal Mode
01451         switch(ucData[5])
01452         {
01453         case 0x00: // off
01454                 sReport += "\tMode........................(off)";
01455                 break;
01456         case 0x01: // green on
01457                 sReport += "\tMode (green)................Normal";
01458                 break;
01459         case 0x10: // white on
01460                 sReport += "\tMode (white)................Boost";
01461                 break;
01462         default: // unknown
01463                 sReport += "\tMode........................(unknown value)";
01464         }
01465         sReport += "\r\n";
01466 }
01467 
01468 void FedmIscReport_ReaderDiagnostic::Add0x20InfoText(string& sReport, bool bSingle)
01469 {
01470         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
01471         Add0x20InfoText(sReport, pInfo, bSingle);
01472 }
01473 
01474 void FedmIscReport_ReaderDiagnostic::Add0x20InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
01475 {
01476         unsigned char ucData[31];
01477 
01478         memset(ucData, 0, 31);
01479 
01480         if(bSingle)
01481         {
01482                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, ucData, 31);
01483         }
01484         else
01485         {
01486                 memcpy(ucData, pInfo->ucFirmwareStatus, 31);
01487         }
01488 
01489 
01490         if(!bSingle)
01491                 sReport += "\r\n";
01492 
01493         sReport += " ";
01494         sReport += "Firmware Status:";
01495         sReport += "\r\n";
01496 
01497         sReport += "\tResult of Firmware Update:\t";
01498         sReport += (char*)ucData;
01499         sReport += "\r\n";
01500 }
01501 
01502 void FedmIscReport_ReaderDiagnostic::Add0x21InfoText(string& sReport, bool bSingle)
01503 {
01504         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
01505         Add0x21InfoText(sReport, pInfo, bSingle);
01506 }
01507 
01508 void FedmIscReport_ReaderDiagnostic::Add0x21InfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo, bool bSingle)
01509 {
01510         unsigned char ucData[31];
01511 
01512         memset(ucData, 0, 31);
01513 
01514         if(bSingle)
01515         {
01516                 m_pReader->GetData(FEDM_ISC_TMP_DIAG_DATA, ucData, 31);
01517         }
01518         else
01519         {
01520                 ucData[0] = pInfo->ucConfigParaChange;
01521         }
01522 
01523 
01524         if(!bSingle)
01525                 sReport += "\r\n";
01526 
01527         sReport += " ";
01528         sReport += "Status of Configuration Parameter:";
01529         sReport += "\r\n";
01530 
01531         if(ucData[0] == 0x00)
01532                 sReport += "\tParameter unchanged\t";
01533         else if(ucData[0] == 0x01)
01534                 sReport += "\tParameter changed after Firmware Update:\t";
01535 
01536         sReport += "\r\n";
01537 }
01538 
01539 void FedmIscReport_ReaderDiagnostic::AddAllInfoText(string& sReport)
01540 {
01541         FEDM_ISC_READER_DIAGNOSTIC* pInfo = m_pReader->GetReaderDiagnostic();
01542         unsigned int uiReaderType = m_pReader->GetReaderType();
01543         pInfo->ucReserved3                      = ((uiReaderType & 0xFF000000)>>24);
01544         pInfo->ucReaderTypeOfClass      = ((uiReaderType & 0x00FF0000)>>16);
01545         pInfo->ucReaderClassGen         = ((uiReaderType & 0x0000FF00)>> 8);
01546         pInfo->ucReaderClass            = ((uiReaderType & 0x000000FF));
01547 
01548         AddAllInfoText(sReport, pInfo);
01549 }
01550 
01551 void FedmIscReport_ReaderDiagnostic::AddAllInfoText(string& sReport, FEDM_ISC_READER_DIAGNOSTIC* pInfo)
01552 {
01553         unsigned int uiReaderType = pInfo->GetReaderType();
01554 
01555         if(pInfo->bIsMode0x01Read)
01556         {
01557                 switch(uiReaderType)
01558                 {
01559                 case FEDM_ISC_TYPE_ISCMR102:
01560                 case FEDM_ISC_TYPE_ISCMR10X:
01561                         Add0x01InfoText_MR102(sReport, pInfo, false);
01562                         break;
01563 
01564                 case FEDM_ISC_TYPE_ISCMR200:
01565                         Add0x01InfoText_MR200(sReport, pInfo, false);
01566                         break;
01567 
01568                 case FEDM_ISC_TYPE_ISCLR200:
01569                         Add0x01InfoText_LR200(sReport, pInfo, false);
01570                         break;
01571 
01572                 case FEDM_ISC_TYPE_ISCPRH200:
01573                         Add0x01InfoText_PRH200(sReport, pInfo, false);
01574                         break;
01575         
01576                 case FEDM_ISC_TYPE_ISCLR1002:
01577                         Add0x01InfoText_LR1002(sReport, pInfo, false);
01578                         break;
01579 
01580                 case FEDM_ISC_TYPE_ISCLR2000:
01581                 case FEDM_ISC_TYPE_ISCLR2500_A:
01582                 case FEDM_ISC_TYPE_ISCLR2500_B:
01583                         Add0x01InfoText_LR2000(sReport, pInfo, false);
01584                         break;
01585 
01586                 case FEDM_ISC_TYPE_ISCMRU200:
01587                 case FEDM_ISC_TYPE_ISCLRU1000:
01588                 case FEDM_ISC_TYPE_MAXU1002:
01589                 case FEDM_ISC_TYPE_ISCLRU1002:
01590                 case FEDM_ISC_TYPE_ISCLRU2000:
01591                 case FEDM_ISC_TYPE_ISCLRU3000:
01592                         Add0x01InfoText_LRU1000(sReport, pInfo, false);
01593                         break;
01594                 }
01595         }
01596 
01597         if(pInfo->bIsMode0x02Read)
01598         {
01599                 Add0x02InfoText(sReport, pInfo, false);
01600         }
01601         
01602         if(pInfo->bIsMode0x03Read)
01603         {
01604                 Add0x03InfoText(sReport, pInfo, false);
01605         }
01606         
01607         if(pInfo->bIsMode0x04Read)
01608         {
01609                 Add0x04InfoText(sReport, pInfo, false);
01610         }
01611         
01612         if(pInfo->bIsMode0x05Read)
01613         {
01614                 Add0x05InfoText(sReport, pInfo, false);
01615         }
01616         
01617         if(pInfo->bIsMode0x06Read)
01618         {
01619                 Add0x06InfoText(sReport, pInfo, false);
01620         }
01621         
01622         if(pInfo->bIsMode0x07Read)
01623         {
01624                 Add0x07InfoText(sReport, pInfo, false);
01625         }
01626         
01627         if(pInfo->bIsMode0x20Read)
01628         {
01629                 Add0x20InfoText(sReport, pInfo, false);
01630         }
01631         
01632         if(pInfo->bIsMode0x21Read)
01633         {
01634                 Add0x21InfoText(sReport, pInfo, false);
01635         }
01636 }


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