FEDM_DataBase.cpp
Go to the documentation of this file.
00001 /*-------------------------------------------------------
00002 |                                                       |
00003 |                  FEDM_DataBase.cpp                    |
00004 |                                                       |
00005 ---------------------------------------------------------
00006 
00007 Copyright © 2000-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                   :       13.05.2000
00018 
00019 Version                 :       04.06.08 / 22.10.2014 / M. Hultsch
00020                                                 - OptionalSetDataAction extended for ID ISC.PRH200
00021 
00022                                                 04.06.02 / 08.05.2012 / M. Hultsch
00023                                                 - OptionalSetDataAction extended for ID ISC.LRU3000
00024 
00025                                                 04.05.04 / 04.09.2013 / M. Hultsch
00026                                                 - OptionalSetDataAction extended for ID ISC.LRU1002
00027 
00028                                                 04.03.00 / 20.08.2012 / M. Hultsch
00029                                                 - OptionalSetDataAction extended for ID ISC.LR1002 and LR2500-B (Direction)
00030 
00031                                                 04.02.06 / 03.08.2012 / M. Hultsch
00032                                                 - OptionalSetDataAction extended for ID ISC.LR1002
00033 
00034                                                 04.00.10 / 06.02.2012 / M. Hultsch
00035                                                 - support for external logmanager (FELOGMNG.dll), when #define _FELOGMNG_SUPPORT is set
00036 
00037                                                 04.00.08 / 05.01.2012 / M. Hultsch
00038                                                 - OptionalSetDataAction extended for ID ISC.MRU102
00039 
00040                                                 04.00.04 / 28.09.2011 / M. Hultsch
00041                                                 - only for DLL: reference counter initializes module handle
00042 
00043                                                 03.03.03 / 09.05.2011 / M. Hultsch
00044                                                 - parameter m_ucReaderType moved from unsigned char to unsigned int
00045 
00046                                                 03.03.00 / 01.03.2011 / M. Hultsch
00047 
00048 Operation Systems       :       independent
00049 
00050 Function                        :       abstract class with data memories
00051 
00052 
00053 Trademarks:
00054 -----------
00055 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00056 Other Trademarks: see FEDM.h
00057 */
00058 
00059 
00060 #include "FEDM_DataBase.h"
00061 #include "FEDM_Functions.h"
00062 #include "FEDM_XmlReaderCfgDataModul.h"
00063 #include "FEDM_XmlReaderCfgProfileModul.h"
00064 #include "i_scan/FEDM_ISC.h"
00065 
00066 #if _MSC_VER >= 1400
00067         #pragma warning(disable : 4996)
00068 #endif
00069 
00070 
00071 #if defined(_FEDM_ISC_CORE_DLL) || defined(_FEDM_ISC_CORE_LIB) || defined(_OBIDISC4J_DLL) || (defined(_FEDM_NO_DLL) && defined(_FELOGMNG_SUPPORT))
00072 // reference counter for created reader objects
00073 int g_iInstallCounter = 0;
00074 #endif
00075 
00076 
00077 //#####################################################################################
00078 // Construction/Destruction
00079 //#####################################################################################
00080 
00081 FEDM_DataBase::FEDM_DataBase()
00082 {
00083         m_iReaderHnd    = 0;            // reader handle for FExxx.DLL
00084         m_ucBusAdr              = 0xFF;         // bus address for reader
00085 
00086         m_sFamCode[0]           = '\0';
00087         m_sReaderName[0]        = '\0';
00088 //      m_ucReaderType          = 0x00;
00089         m_uiReaderType          = 0;    // extended reader type number
00090 
00091         m_iRFC_DataBlockSize    = 16;
00092         m_iACC_DataBlockSize    = 32;
00093         m_iPubMemBlockSize              = 4;
00094 
00095         m_iUsedEEDataBlocks             = 0;
00096         m_iUsedRAMDataBlocks    = 0;
00097         m_iUsedAccEEDataBlocks  = 0;
00098         m_iUsedTmpDataBlocks    = 0;
00099         m_iUsedMjpDataBlocks    = 0;
00100         m_iUsedSNMemBlocks              = 0;
00101         m_iUsedIDMemBlocks              = 0;
00102         m_iUsedACMemBlocks              = 0;
00103         m_iUsedPubMemBlocks             = 0;
00104         m_iUsedSecMemBlocks             = 0;
00105         m_iUsedConfMemBlocks    = 0;
00106         m_iUsedDateMemBlocks    = 0;
00107 
00108 #if defined(_FEDM_ISC_CORE_DLL) || defined(_OBIDISC4J_DLL) || (defined(_FEDM_NO_DLL) && defined(_FELOGMNG_SUPPORT))
00109         g_iInstallCounter++;
00110         if(g_iInstallCounter > 0x0FFFFFFF)
00111                 g_iInstallCounter = 1;
00112 
00113         m_iModuleHnd = g_iInstallCounter;
00114 #else
00115         m_iModuleHnd = 0;
00116 #endif
00117 
00118 
00119 #ifdef _FELOGMNG_SUPPORT
00120         // for logmanager support
00121         string sVersion = "FEDM V";
00122         sVersion += FEDM_VERSION;
00123         sVersion += " from ";
00124         sVersion += __DATE__;
00125         sVersion += " loaded";
00126         m_pLogger = new FEDM_Logger(FELOGMNG_SRC_FEDM_CORE, g_iInstallCounter, sVersion);
00127         if(m_pLogger != NULL)
00128         {
00129                 if(m_pLogger->m_pLib == NULL)
00130                 {
00131                         delete m_pLogger;
00132                         m_pLogger = NULL;
00133                 }
00134         }
00135 #else
00136         m_pLogger = NULL;
00137 #endif
00138 }
00139 
00140 FEDM_DataBase::~FEDM_DataBase()
00141 {
00142 #ifdef _FELOGMNG_SUPPORT
00143         if(m_pLogger != NULL)
00144         {
00145                 delete m_pLogger;
00146                 m_pLogger = NULL;
00147         }
00148 #endif
00149 }
00150 
00151 
00152 //#####################################################################################
00153 // functions for important settings
00154 //#####################################################################################
00155 
00156 int FEDM_DataBase::GetReaderHnd()
00157 {
00158         return m_iReaderHnd;
00159 }
00160 
00161 
00162 void FEDM_DataBase::SetReaderHnd(int iReaderHnd)
00163 {
00164         m_iReaderHnd = iReaderHnd;
00165 }
00166 
00167 
00168 void FEDM_DataBase::SetBusAddress(unsigned char ucBusAdr)
00169 {
00170         m_ucBusAdr = ucBusAdr;
00171 }
00172 
00173 void FEDM_DataBase::SetModuleHnd(int iHnd)
00174 {
00175         m_iModuleHnd = iHnd;
00176 }
00177 
00178 int FEDM_DataBase::GetModuleHnd()
00179 {
00180         return m_iModuleHnd;
00181 }
00182 
00183 
00184 //#####################################################################################
00185 // query functions
00186 //#####################################################################################
00187 
00188 unsigned char FEDM_DataBase::GetBusAddress()
00189 {
00190         return m_ucBusAdr;
00191 }
00192 
00193 char* FEDM_DataBase::GetFamilyCode()
00194 {
00195         return m_sFamCode;
00196 }
00197 
00198 char* FEDM_DataBase::GetReaderName()
00199 {
00200         return m_sReaderName;
00201 }
00202 
00203 unsigned int FEDM_DataBase::GetReaderType()
00204 {
00205         return m_uiReaderType;
00206 }
00207 
00208 
00209 int FEDM_DataBase::GetAccessID(string sParaName, string& sAccessID, bool bEEPROM)
00210 {
00211         FEDM_MAP_ACCESS_ID_ITOR         itor;
00212 
00213         itor = m_mapAccessID.find(sParaName);
00214         if(itor == m_mapAccessID.end())
00215         {
00216                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ParaName=" << sParaName.c_str() << ", .., ..)" << GetErrorText(FEDM_ERROR_UNSUPPORTED_NAMESPACE));
00217                 FEDM_RETURN(FEDM_ERROR_UNSUPPORTED_NAMESPACE);
00218         }
00219 
00220         sAccessID = itor->second;
00221 
00222         if(! bEEPROM)
00223                 sAccessID = FEDM_ToRAM(sAccessID.c_str());
00224 
00225         return FEDM_OK;
00226 }
00227 
00228 
00229 
00230 //#####################################################################################
00231 // functions for XML serialization
00232 //#####################################################################################
00233 
00234 
00235 /***************************************************************************
00236   Begin                 :       11.04.2003 / M. Hultsch
00237   Version               :       02.04.04 / 22.08.2006 / M. Hultsch
00238 
00239   Function                      :       main-function for XML file-I/O
00240 
00241   Parameters            :       FEDM_XMLReaderCfgDataModul xml  -       pointer to the xml handler
00242                                                 bool bRead                      -       true: read from file
00243                                                                                                 false: write into file
00244                                                 char* sFileName         -       file name
00245 
00246   Return value          :       OK or error code
00247 
00248 ***************************************************************************/
00249 //#ifdef _FEDM_XML_SUPPORT
00250 int FEDM_DataBase::Serialize(FEDM_XMLReaderCfgDataModul* xml, 
00251                                                          bool bRead, 
00252                                                          char* sFileName)
00253 {
00254 #ifdef _FEDM_XML_SUPPORT
00255         if(bRead)
00256                 return xml->SerializeIn(this, sFileName);
00257         else
00258                 return xml->SerializeOut(this, sFileName);
00259 #else
00260         return FEDM_ERROR_UNSUPPORTED;
00261 #endif
00262 }
00263 
00264 /***************************************************************************
00265   Begin                 :       11.04.2003 / M. Hultsch
00266   Version               :       03.00.00 / 20.10.2008 / M. Hultsch
00267 
00268   Function                      :       sub-function for read from XML file
00269                                                 for every iMemType call SerializeIn
00270 
00271   Parameters            :       int iMemType                    - mem type identifier
00272                                                 FEDM_XMLBase* xml               - xml handler
00273                                                 FEDM_XML_TREEITEM* root - root xml tree item
00274 
00275   Return value          :       OK or error code
00276 
00277 ***************************************************************************/
00278 int FEDM_DataBase::SerializeIn( int iMemType,
00279                                                             FEDM_XMLBase* xml,
00280                                                             FEDM_XML_TREEITEM* root)
00281 {
00282 #ifdef _FEDM_XML_SUPPORT
00283         FEDM_CHK3(root);
00284 
00285         bool bMarkAsRead = false;
00286         int iFirstBlock = 0;
00287         int iMaxBlocks = 0;
00288         int iBlockSize = 0;
00289         size_t iArraySize = 0;
00290         char cAttribute[5];
00291         unsigned char ucValue;
00292         wstring sTag;
00293         string sAttribute1;
00294         string sAttribute2;
00295         string sValue;
00296         wstring wsAttribute;
00297         wstring wsValue;
00298         wchar_t wcValue[5];
00299         FEDM_XML_TREEITEM* child = NULL;
00300         FEDM_XML_TREEITEM* parent = NULL;
00301         FEDM_BYTE_ARRAY_ITOR itor;
00302 
00303         switch(iMemType)
00304         {
00305         // tag attribute for data array "Reader EEPROM-Parameter"
00306         case FEDM_RFC_EEDATA_MEM:
00307                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00308                                                           FEDM_XML_ATTRIB_NAME_UC,
00309                                                           FEDM_XML_STRING_EEPROM_DATA_UC,
00310                                                           false,
00311                                                           true);
00312                 if(child == NULL)
00313                         return xml->GetLastError();
00314 
00315                 parent = child;
00316                 itor = m_RFC_EEData.begin();
00317                 iArraySize = m_RFC_EEData.capacity();
00318                 bMarkAsRead = true;
00319                 break;
00320 
00321         // tag attribute for data array "Reader RAM-Parameter"
00322         case FEDM_RFC_RAMDATA_MEM:
00323                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00324                                                           FEDM_XML_ATTRIB_NAME_UC,
00325                                                           FEDM_XML_STRING_RAM_DATA_UC,
00326                                                           false,
00327                                                           true);
00328                 if(child == NULL)
00329                         return xml->GetLastError();
00330 
00331                 parent = child;
00332                 itor = m_RFC_RAMData.begin();
00333                 iArraySize = m_RFC_RAMData.capacity();
00334                 bMarkAsRead = true;
00335                 break;
00336 
00337         case FEDM_ACC_EEDATA_MEM:
00338                 iFirstBlock = 64;
00339                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00340                                                           FEDM_XML_ATTRIB_NAME_UC,
00341                                                           FEDM_XML_STRING_ACC_EEPROM_DATA_UC,
00342                                                           false,
00343                                                           true);
00344                 if(child == NULL)
00345                         return xml->GetLastError();
00346 
00347                 parent = child;
00348                 itor = m_ACC_EEData.begin();
00349                 iArraySize = m_ACC_EEData.capacity();
00350                 bMarkAsRead = true;
00351                 break;
00352 
00353         case FEDM_ACC_RAMDATA_MEM:
00354                 iFirstBlock = 64;
00355                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00356                                                           FEDM_XML_ATTRIB_NAME_UC,
00357                                                           FEDM_XML_STRING_ACC_RAM_DATA_UC,
00358                                                           false,
00359                                                           true);
00360                 if(child == NULL)
00361                         return xml->GetLastError();
00362 
00363                 parent = child;
00364                 itor = m_ACC_RAMData.begin();
00365                 iArraySize = m_ACC_RAMData.capacity();
00366                 bMarkAsRead = true;
00367                 break;
00368 
00369         // tag attribute for data array "Temporary Protocol Data"
00370         case FEDM_TMPDATA_MEM:
00371                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00372                                                           FEDM_XML_ATTRIB_NAME_UC,
00373                                                           FEDM_XML_STRING_TMP_DATA_UC,
00374                                                           false,
00375                                                           true);
00376                 if(child == NULL)
00377                         return xml->GetLastError();
00378 
00379                 parent = child;
00380                 itor = m_TmpData.begin();
00381                 iArraySize = m_TmpData.capacity();
00382                 break;
00383 
00384         // tag attribute for data array "Temporary Multijob Protocol Data"
00385         case FEDM_MJPDATA_MEM:
00386                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00387                                                           FEDM_XML_ATTRIB_NAME_UC,
00388                                                           FEDM_XML_STRING_MJP_DATA_UC,
00389                                                           false,
00390                                                           true);
00391                 if(child == NULL)
00392                         return xml->GetLastError();
00393 
00394                 parent = child;
00395                 itor = m_MjpData.begin();
00396                 iArraySize = m_MjpData.capacity();
00397                 break;
00398 
00399         // tag attribute for data array 
00400         case FEDM_SN_MEM:
00401                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00402                                                           FEDM_XML_ATTRIB_NAME_UC,
00403                                                           FEDM_XML_STRING_SN_DATA_UC,
00404                                                           false,
00405                                                           true);
00406                 if(child == NULL)
00407                         return xml->GetLastError();
00408 
00409                 parent = child;
00410                 itor = m_SN_Mem.begin();
00411                 iArraySize = m_SN_Mem.capacity();
00412                 break;
00413 
00414         // tag attribute for data array 
00415         case FEDM_ID_MEM:
00416                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00417                                                           FEDM_XML_ATTRIB_NAME_UC,
00418                                                           FEDM_XML_STRING_ID_DATA_UC,
00419                                                           false,
00420                                                           true);
00421                 if(child == NULL)
00422                         return xml->GetLastError();
00423 
00424                 parent = child;
00425                 itor = m_ID_Mem.begin();
00426                 iArraySize = m_ID_Mem.capacity();
00427                 break;
00428 
00429         // tag attribute for data array 
00430         case FEDM_AC_MEM:
00431                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00432                                                           FEDM_XML_ATTRIB_NAME_UC,
00433                                                           FEDM_XML_STRING_AC_DATA_UC,
00434                                                           false,
00435                                                           true);
00436                 if(child == NULL)
00437                         return xml->GetLastError();
00438 
00439                 parent = child;
00440                 itor = m_AC_Mem.begin();
00441                 iArraySize = m_AC_Mem.capacity();
00442                 break;
00443 
00444         // tag attribute for data array 
00445         case FEDM_PUB_MEM:
00446                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00447                                                           FEDM_XML_ATTRIB_NAME_UC,
00448                                                           FEDM_XML_STRING_PUB_MEM_UC,
00449                                                           false,
00450                                                           true);
00451                 if(child == NULL)
00452                         return xml->GetLastError();
00453 
00454                 parent = child;
00455                 itor = m_PubMem.begin();
00456                 iArraySize = m_PubMem.capacity();
00457                 break;
00458 
00459         // tag attribute for data array 
00460         case FEDM_SEC_MEM:
00461                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00462                                                           FEDM_XML_ATTRIB_NAME_UC,
00463                                                           FEDM_XML_STRING_SEC_MEM_UC,
00464                                                           false,
00465                                                           true);
00466                 if(child == NULL)
00467                         return xml->GetLastError();
00468 
00469                 parent = child;
00470                 itor = m_SecMem.begin();
00471                 iArraySize = m_SecMem.capacity();
00472                 break;
00473 
00474         // tag attribute for data array 
00475         case FEDM_CONF_MEM:
00476                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00477                                                           FEDM_XML_ATTRIB_NAME_UC,
00478                                                           FEDM_XML_STRING_CFG_MEM_UC,
00479                                                           false,
00480                                                           true);
00481                 if(child == NULL)
00482                         return xml->GetLastError();
00483 
00484                 parent = child;
00485                 itor = m_ConfMem.begin();
00486                 iArraySize = m_ConfMem.capacity();
00487                 break;
00488 
00489         // tag attribute for data array 
00490         case FEDM_DATE_MEM:
00491                 child = xml->FindTag( FEDM_XML_TAG_DATA_ARRAY_UC,
00492                                                           FEDM_XML_ATTRIB_NAME_UC,
00493                                                           FEDM_XML_STRING_DATE_MEM_UC,
00494                                                           false,
00495                                                           true);
00496                 if(child == NULL)
00497                         return xml->GetLastError();
00498 
00499                 parent = child;
00500                 itor = m_DateMem.begin();
00501                 iArraySize = m_DateMem.capacity();
00502                 break;
00503 
00504         default:
00505                 FEDM_RETURN(FEDM_ERROR_PARAMETER);
00506         }
00507 
00508         // get number of blocks
00509         xml->GetTagAttrib(parent, 1, wsAttribute, wsValue);
00510         if(wsAttribute == FEDM_XML_ATTRIB_BLOCKS_UC)
00511         {
00512                 #if defined(_FEDM_SUPPORT_UCLINUX)
00513                         char buf[10];
00514                         FEDM_SWSCANF(wsValue.c_str(), buf);
00515                         iMaxBlocks = atoi(buf);
00516                 #else
00517                         swscanf(wsValue.c_str(), L"%d", &iMaxBlocks);
00518                 #endif
00519                 if(iMaxBlocks <= 0)
00520                 {
00521                         delete child;
00522                         FEDM_RETURN(FEDM_XML_ERROR_NO_TAG_ATTRIBUTE);
00523                 }
00524         }
00525 
00526         // get blocksize
00527         xml->GetTagAttrib(parent, 2, wsAttribute, wsValue);
00528         if(wsAttribute == FEDM_XML_ATTRIB_SIZE_UC)
00529         {
00530                 #if defined(_FEDM_SUPPORT_UCLINUX)
00531                         char buf[10];
00532                         FEDM_SWSCANF(wsValue.c_str(), buf);
00533                         iBlockSize = atoi(buf);
00534                 #else
00535                         swscanf(wsValue.c_str(), L"%d", &iBlockSize);
00536                 #endif
00537                 if(iBlockSize != 32 && iBlockSize != 16 && iBlockSize != 4)
00538                 {
00539                         delete child;
00540                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00541                 }
00542         }
00543 
00544         if(iMaxBlocks * iBlockSize > (int)iArraySize)
00545         {
00546                 delete child;
00547                 FEDM_RETURN(FEDM_ERROR_PARAMETER);
00548         }
00549 
00550         xml->AddTagItem(root, child);
00551 
00552         // tags for data blocks
00553         for(int iBlock=0; iBlock<iMaxBlocks; ++iBlock)
00554         {
00555 #if defined(_MSC_VER) || defined(__BORLANDC__)
00556                 swprintf(wcValue, L"%d", iBlock);
00557 #else
00558                 swprintf(wcValue, 5, L"%d", iBlock);
00559 #endif
00560                 if( iMemType == FEDM_RFC_EEDATA_MEM || 
00561                         iMemType == FEDM_RFC_RAMDATA_MEM || 
00562                         iMemType == FEDM_ACC_EEDATA_MEM || 
00563                         iMemType == FEDM_ACC_RAMDATA_MEM )
00564                 {
00565                         sTag = FEDM_XML_TAG_CFG_UC;
00566                 }
00567                 else
00568                 {
00569                         sTag = FEDM_XML_TAG_DATA_UC;
00570                 }
00571                 sTag += wcValue;
00572                 child = xml->FindTag(sTag, true, false);
00573                 if(child == NULL)
00574                 {
00575                         itor += iBlockSize;
00576                         continue;
00577 //                      xml->CloseDoc();
00578 //                      return xml->GetLastError();
00579                 }
00580 
00581                 xml->AddTagItem(parent, child);
00582 
00583                 // copy all data bytes from attributes into data array
00584                 for(int iByte=0; iByte<iBlockSize; ++iByte)
00585                 {
00586                         xml->GetTagAttrib(child, iByte, sAttribute1, sValue);
00587 
00588                         sprintf(cAttribute, "b%d", iByte);
00589                         sAttribute2 = cAttribute;
00590                         FEDM_ConvHexStrToHexUChar((string)sValue.c_str(), &ucValue, 1);
00591 
00592                         if(sAttribute1.c_str() == sAttribute2)
00593                         {
00594                                 if(iByte==(iBlockSize-1) && bMarkAsRead)
00595                                 {
00596                                         (*itor) = 0x03; // mark cfg block as read with a 0x01 in last (unused) byte
00597                                                                         // mark cfg block as modified with 0x02
00598                                 }
00599                                 else
00600                                 {
00601                                         (*itor) = ucValue;
00602                                 }
00603                         }
00604                         itor++;
00605                 }
00606         }
00607 
00608         return FEDM_OK;
00609 #else
00610         return FEDM_ERROR_UNSUPPORTED;
00611 #endif
00612 }
00613 
00614 /***************************************************************************
00615   Begin                 :       11.04.2003 / M. Hultsch
00616   Version               :       03.00.00 / 20.10.2008 / M. Hultsch
00617 
00618   Function                      :       sub-function for write into XML file
00619                                                 for every iMemType call SerializeIn
00620 
00621   Parameters            :       int iMemType                    - mem type identifier
00622                                             FEDM_XMLBase* xml           - xml handler
00623                                                 FEDM_XML_TREEITEM* root - root xml tree item
00624                                                 int iMaxBlocks                  - maximal blocks
00625                                                 int iBlockSize                  - block size of each block
00626 
00627   Return value          :       OK or error code
00628 
00629 ***************************************************************************/
00630 int FEDM_DataBase::SerializeOut( int iMemType,
00631                                                              FEDM_XMLBase* xml,
00632                                                                  FEDM_XML_TREEITEM* root )
00633 {
00634 #ifdef _FEDM_XML_SUPPORT
00635         FEDM_CHK3(root);
00636 
00637         int iFirstBlock = 0;
00638         int iMaxBlocks = 0;
00639         int iBlockSize = 16;
00640         int iTmpDataBlockSize = 32;
00641 
00642         wstring str;
00643         wchar_t wcValue[5];
00644         wchar_t wcAttrib[5];
00645         FEDM_XML_TREEITEM* parent = NULL;
00646         FEDM_XML_TREEITEM* child = NULL;
00647         FEDM_BYTE_ARRAY_ITOR itor;
00648 
00649         child = xml->BuildTag(FEDM_XML_TAG_DATA_ARRAY_UC);
00650         if(child == NULL)
00651         {
00652                 xml->CloseDoc();
00653                 return xml->GetLastError();
00654         }
00655 
00656         switch(iMemType)
00657         {
00658         // tag attribute for data array "Reader EEPROM-Parameter"
00659         case FEDM_RFC_EEDATA_MEM:
00660                 iMaxBlocks = m_iUsedEEDataBlocks;
00661                 iBlockSize = m_iRFC_DataBlockSize;
00662                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_RFC_EEData.capacity())
00663                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00664                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_EEPROM_DATA_UC);
00665 #if defined(_MSC_VER) || defined(__BORLANDC__)
00666                 swprintf(wcValue, L"%d", iMaxBlocks);
00667 #else
00668                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00669 #endif
00670                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00671 #if defined(_MSC_VER) || defined(__BORLANDC__)
00672                 swprintf(wcValue, L"%d", iBlockSize);
00673 #else
00674                 swprintf(wcValue, 5, L"%d", m_iRFC_DataBlockSize);
00675 #endif
00676                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00677                 xml->AddTagItem(root, child);
00678                 parent = child;
00679                 itor = m_RFC_EEData.begin();
00680                 break;
00681 
00682         // tag attribute for data array "Reader RAM-Parameter"
00683         case FEDM_RFC_RAMDATA_MEM:
00684                 iMaxBlocks = m_iUsedRAMDataBlocks;
00685                 iBlockSize = m_iRFC_DataBlockSize;
00686                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_RFC_RAMData.capacity())
00687                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00688                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_RAM_DATA_UC);
00689 #if defined(_MSC_VER) || defined(__BORLANDC__)
00690                 swprintf(wcValue, L"%d", iMaxBlocks);
00691 #else
00692                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00693 #endif
00694                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00695 #if defined(_MSC_VER) || defined(__BORLANDC__)
00696                 swprintf(wcValue, L"%d", iBlockSize);
00697 #else
00698                 swprintf(wcValue, 5, L"%d", m_iRFC_DataBlockSize);
00699 #endif
00700                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00701                 xml->AddTagItem(root, child);
00702                 parent = child;
00703                 itor = m_RFC_RAMData.begin();
00704                 break;
00705 
00706         // tag attribute for data array "Reader EEPROM-Parameter for ACC"
00707         case FEDM_ACC_EEDATA_MEM:
00708                 iFirstBlock = 64;
00709                 iBlockSize = 32;
00710                 iMaxBlocks = m_iUsedAccEEDataBlocks;
00711                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_ACC_EEData.capacity())
00712                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00713                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_ACC_EEPROM_DATA_UC);
00714 #if defined(_MSC_VER) || defined(__BORLANDC__)
00715                 swprintf(wcValue, L"%d", iMaxBlocks);
00716 #else
00717                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00718 #endif
00719                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00720 #if defined(_MSC_VER) || defined(__BORLANDC__)
00721                 swprintf(wcValue, L"%d", iBlockSize);
00722 #else
00723                 swprintf(wcValue, 5, L"%d", iBlockSize);
00724 #endif
00725                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00726                 xml->AddTagItem(root, child);
00727                 parent = child;
00728                 itor = m_ACC_EEData.begin();
00729                 itor += iFirstBlock*iBlockSize;
00730                 break;
00731 
00732         // tag attribute for data array "Reader RAM-Parameter for ACC"
00733         case FEDM_ACC_RAMDATA_MEM:
00734                 iFirstBlock = 64;
00735                 iBlockSize = 32;
00736                 iMaxBlocks = m_iUsedAccRAMDataBlocks;
00737                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_ACC_RAMData.capacity())
00738                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00739                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_ACC_RAM_DATA_UC);
00740 #if defined(_MSC_VER) || defined(__BORLANDC__)
00741                 swprintf(wcValue, L"%d", iMaxBlocks);
00742 #else
00743                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00744 #endif
00745                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00746 #if defined(_MSC_VER) || defined(__BORLANDC__)
00747                 swprintf(wcValue, L"%d", iBlockSize);
00748 #else
00749                 swprintf(wcValue, 5, L"%d", iBlockSize);
00750 #endif
00751                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00752                 xml->AddTagItem(root, child);
00753                 parent = child;
00754                 itor = m_ACC_RAMData.begin();
00755                 itor += iFirstBlock*iBlockSize;
00756                 break;
00757 
00758         // tag attribute for data array "Temporary Protocol Data"
00759         case FEDM_TMPDATA_MEM:
00760                 iMaxBlocks = m_iUsedTmpDataBlocks;
00761                 iBlockSize = iTmpDataBlockSize;
00762                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_TmpData.capacity())
00763                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00764                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_TMP_DATA_UC);
00765 #if defined(_MSC_VER) || defined(__BORLANDC__)
00766                 swprintf(wcValue, L"%d", iMaxBlocks);
00767 #else
00768                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00769 #endif
00770                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00771 #if defined(_MSC_VER) || defined(__BORLANDC__)
00772                 swprintf(wcValue, L"%d", iBlockSize);
00773 #else
00774                 swprintf(wcValue, 5, L"%d", iBlockSize);
00775 #endif
00776                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00777                 xml->AddTagItem(root, child);
00778                 parent = child;
00779                 itor = m_TmpData.begin();
00780                 break;
00781 
00782         // tag attribute for data array "Temporary Multijob Protocol Data"
00783         case FEDM_MJPDATA_MEM:
00784                 iMaxBlocks = m_iUsedMjpDataBlocks;
00785                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_MjpData.capacity())
00786                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00787                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_MJP_DATA_UC);
00788 #if defined(_MSC_VER) || defined(__BORLANDC__)
00789                 swprintf(wcValue, L"%d", iMaxBlocks);
00790 #else
00791                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00792 #endif
00793                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00794 #if defined(_MSC_VER) || defined(__BORLANDC__)
00795                 swprintf(wcValue, L"%d", iBlockSize);
00796 #else
00797                 swprintf(wcValue, 5, L"%d", iBlockSize);
00798 #endif
00799                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00800                 xml->AddTagItem(root, child);
00801                 parent = child;
00802                 itor = m_MjpData.begin();
00803                 break;
00804 
00805         // tag attribute for data array 
00806         case FEDM_SN_MEM:
00807                 iMaxBlocks = m_iUsedSNMemBlocks;
00808                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_SN_Mem.capacity())
00809                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00810                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_SN_DATA_UC);
00811 #if defined(_MSC_VER) || defined(__BORLANDC__)
00812                 swprintf(wcValue, L"%d", iMaxBlocks);
00813 #else
00814                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00815 #endif
00816                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00817 #if defined(_MSC_VER) || defined(__BORLANDC__)
00818                 swprintf(wcValue, L"%d", iBlockSize);
00819 #else
00820                 swprintf(wcValue, 5, L"%d", iBlockSize);
00821 #endif
00822                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00823                 xml->AddTagItem(root, child);
00824                 parent = child;
00825                 itor = m_SN_Mem.begin();
00826                 break;
00827 
00828         // tag attribute for data array 
00829         case FEDM_ID_MEM:
00830                 iMaxBlocks = m_iUsedIDMemBlocks;
00831                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_ID_Mem.capacity())
00832                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00833                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_ID_DATA_UC);
00834 #if defined(_MSC_VER) || defined(__BORLANDC__)
00835                 swprintf(wcValue, L"%d", iMaxBlocks);
00836 #else
00837                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00838 #endif
00839                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00840 #if defined(_MSC_VER) || defined(__BORLANDC__)
00841                 swprintf(wcValue, L"%d", iBlockSize);
00842 #else
00843                 swprintf(wcValue, 5, L"%d", iBlockSize);
00844 #endif
00845                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00846                 xml->AddTagItem(root, child);
00847                 parent = child;
00848                 itor = m_ID_Mem.begin();
00849                 break;
00850 
00851         // tag attribute for data array 
00852         case FEDM_AC_MEM:
00853                 iMaxBlocks = m_iUsedACMemBlocks;
00854                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_AC_Mem.capacity())
00855                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00856                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_AC_DATA_UC);
00857 #if defined(_MSC_VER) || defined(__BORLANDC__)
00858                 swprintf(wcValue, L"%d", iMaxBlocks);
00859 #else
00860                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00861 #endif
00862                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00863 #if defined(_MSC_VER) || defined(__BORLANDC__)
00864                 swprintf(wcValue, L"%d", iBlockSize);
00865 #else
00866                 swprintf(wcValue, 5, L"%d", iBlockSize);
00867 #endif
00868                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00869                 xml->AddTagItem(root, child);
00870                 parent = child;
00871                 itor = m_AC_Mem.begin();
00872                 break;
00873 
00874         // tag attribute for data array 
00875         case FEDM_PUB_MEM:
00876                 iMaxBlocks = m_iUsedPubMemBlocks;
00877                 iBlockSize = m_iPubMemBlockSize;
00878                 if( iMaxBlocks == 0 || iBlockSize == 0 || iMaxBlocks*iBlockSize > (int)m_PubMem.capacity() )
00879                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00880                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_PUB_MEM_UC);
00881 #if defined(_MSC_VER) || defined(__BORLANDC__)
00882                 swprintf(wcValue, L"%d", iMaxBlocks);
00883 #else
00884                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00885 #endif
00886                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00887 #if defined(_MSC_VER) || defined(__BORLANDC__)
00888                 swprintf(wcValue, L"%d", iBlockSize);
00889 #else
00890                 swprintf(wcValue, 5, L"%d", iBlockSize);
00891 #endif
00892                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00893                 xml->AddTagItem(root, child);
00894                 parent = child;
00895                 itor = m_PubMem.begin();
00896                 break;
00897 
00898         // tag attribute for data array 
00899         case FEDM_SEC_MEM:
00900                 iMaxBlocks = m_iUsedSecMemBlocks;
00901                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_SecMem.capacity())
00902                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00903                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_SEC_MEM_UC);
00904 #if defined(_MSC_VER) || defined(__BORLANDC__)
00905                 swprintf(wcValue, L"%d", iMaxBlocks);
00906 #else
00907                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00908 #endif
00909                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00910 #if defined(_MSC_VER) || defined(__BORLANDC__)
00911                 swprintf(wcValue, L"%d", iBlockSize);
00912 #else
00913                 swprintf(wcValue, 5, L"%d", iBlockSize);
00914 #endif
00915                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00916                 xml->AddTagItem(root, child);
00917                 parent = child;
00918                 itor = m_SecMem.begin();
00919                 break;
00920 
00921         // tag attribute for data array 
00922         case FEDM_CONF_MEM:
00923                 iMaxBlocks = m_iUsedConfMemBlocks;
00924                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_ConfMem.capacity())
00925                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00926                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_CFG_MEM_UC);
00927 #if defined(_MSC_VER) || defined(__BORLANDC__)
00928                 swprintf(wcValue, L"%d", iMaxBlocks);
00929 #else
00930                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00931 #endif
00932                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00933 #if defined(_MSC_VER) || defined(__BORLANDC__)
00934                 swprintf(wcValue, L"%d", iBlockSize);
00935 #else
00936                 swprintf(wcValue, 5, L"%d", iBlockSize);
00937 #endif
00938                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00939                 xml->AddTagItem(root, child);
00940                 parent = child;
00941                 itor = m_ConfMem.begin();
00942                 break;
00943 
00944         // tag attribute for data array 
00945         case FEDM_DATE_MEM:
00946                 iMaxBlocks = m_iUsedDateMemBlocks;
00947                 if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_DateMem.capacity())
00948                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
00949                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_DATE_MEM_UC);
00950 #if defined(_MSC_VER) || defined(__BORLANDC__)
00951                 swprintf(wcValue, L"%d", iMaxBlocks);
00952 #else
00953                 swprintf(wcValue, 5, L"%d", iMaxBlocks);
00954 #endif
00955                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
00956 #if defined(_MSC_VER) || defined(__BORLANDC__)
00957                 swprintf(wcValue, L"%d", iBlockSize);
00958 #else
00959                 swprintf(wcValue, 5, L"%d", iBlockSize);
00960 #endif
00961                 xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
00962                 xml->AddTagItem(root, child);
00963                 parent = child;
00964                 itor = m_DateMem.begin();
00965                 break;
00966 
00967         default:
00968                 FEDM_RETURN(FEDM_ERROR_PARAMETER);
00969         }
00970 
00971         // tags for data blocks
00972         for(int iBlock=iFirstBlock; iBlock<iMaxBlocks; ++iBlock)
00973         {
00974 #if defined(_MSC_VER) || defined(__BORLANDC__)
00975                 swprintf(wcValue, L"%d", iBlock);
00976 #else
00977                 swprintf(wcValue, 5, L"%d", iBlock);
00978 #endif
00979                 if( iMemType == FEDM_RFC_EEDATA_MEM ||
00980                         iMemType == FEDM_RFC_RAMDATA_MEM ||
00981                         iMemType == FEDM_ACC_EEDATA_MEM ||
00982                         iMemType == FEDM_ACC_RAMDATA_MEM )
00983                         str = FEDM_XML_TAG_CFG_UC;
00984                 else
00985                         str = FEDM_XML_TAG_DATA_UC;
00986                 str += wcValue;
00987                 child = xml->BuildTag(str, false, true);
00988                 if(child == NULL)
00989                 {
00990                         xml->CloseDoc();
00991                         return xml->GetLastError();
00992                 }
00993 
00994                 // alle Datenbytes als Attribute in tags einfuegen
00995                 for(int iByte=0; iByte<iBlockSize; ++iByte)
00996                 {
00997 #if defined(_MSC_VER) || defined(__BORLANDC__)
00998                         swprintf(wcAttrib, L"b%d", iByte);
00999                         swprintf(wcValue, L"%02X", *itor);//Array[iBlock*16 + iByte]);
01000 #else
01001                         swprintf(wcAttrib, 5, L"b%d", iByte);
01002                         swprintf(wcValue, 5, L"%02X", *itor);//Array[iBlock*16 + iByte]);
01003 #endif
01004                         xml->AddTagAttrib(child, wcAttrib, wcValue);
01005                         itor++;
01006                 }
01007 
01008                 xml->AddTagItem(parent, child);
01009         }
01010 
01011         return FEDM_OK;
01012 #else
01013         return FEDM_ERROR_UNSUPPORTED;
01014 #endif
01015 }
01016 
01017 
01018 /***************************************************************************
01019   Begin                 :       13.08.2007 / M. Hultsch
01020   Version               :       03.00.02 / 14.01.2009 / M. Hultsch
01021 
01022   Function                      :       main-function for XML based reader customization
01023 
01024   Parameters            :       FEDM_XMLReaderCfgProfileModul xml       -       pointer to the xml handler
01025                                                 bool bRead                      -       true: read from file
01026                                                                                                 false: write into file
01027                                                 char* sFileName         -       file name
01028 
01029   Return value          :       OK or error code
01030 
01031 ***************************************************************************/
01032 int FEDM_DataBase::SerializeProfile(FEDM_XMLReaderCfgProfileModul* xml, 
01033                                                                         bool bRead, 
01034                                                                         char* sFileName)
01035 {
01036 #ifdef _FEDM_XML_SUPPORT
01037         if(bRead)
01038                 return xml->SerializeIn(this, sFileName);
01039         else
01040                 return xml->SerializeOut(this, sFileName);
01041 #else
01042         return FEDM_ERROR_UNSUPPORTED;
01043 #endif
01044 }
01045 
01046 /***************************************************************************
01047   Begin                 :       13.08.2007 / M. Hultsch
01048   Version               :       03.00.02 / 14.01.2009 / M. Hultsch
01049 
01050   Function                      :       read sub-function for XML based reader configuration
01051                                                 only for tag attribute name="Reader EEPROM-Parameter"
01052 
01053   Parameters            :       FEDM_XMLBase* xml               - xml handler
01054                                                 FEDM_XML_TREEITEM* root - root xml tree item
01055 
01056   Return value          :       OK or error code
01057 
01058 ***************************************************************************/
01059 int FEDM_DataBase::SerializeProfileIn(  FEDM_XMLBase* xml,
01060                                                                                 FEDM_XML_TREEITEM* root)
01061 {
01062 #ifdef _FEDM_XML_SUPPORT
01063         FEDM_CHK3(root);
01064 
01065         int iByte=0;
01066         int iMaxBlocks = 0;
01067         int iBlockSize = 0;
01068         size_t iArraySize = 0;
01069         char cAttribute[5];
01070         unsigned char ucValue;
01071         unsigned char ucMask[32];
01072         wstring sTag;
01073         string sAttribute;
01074         string sAttribute1;
01075         string sAttribute2;
01076         string sValue;
01077         wstring wsAttribute;
01078         wstring wsValue;
01079         wchar_t wcValue[5];
01080         FEDM_XML_TREEITEM* child = NULL;
01081         FEDM_XML_TREEITEM* parent = NULL;
01082         FEDM_BYTE_ARRAY_ITOR itor_data;
01083         FEDM_BYTE_ARRAY_ITOR itor_mask;
01084 
01085         child = xml->FindTag(FEDM_XML_TAG_DATA_ARRAY_UC,
01086                                                   FEDM_XML_ATTRIB_NAME_UC,
01087                                                   FEDM_XML_STRING_EEPROM_DATA_UC,
01088                                                   false,
01089                                                   true);
01090         if(child == NULL)
01091                 return xml->GetLastError();
01092 
01093         parent = child;
01094         itor_data = m_RFC_EEData.begin();
01095         iArraySize = m_RFC_EEData.capacity();
01096         itor_mask = m_RFC_CfgProfileMask.begin();
01097 
01098         // get number of blocks
01099         xml->GetTagAttrib(parent, 1, wsAttribute, wsValue);
01100         if(wsAttribute == FEDM_XML_ATTRIB_BLOCKS_UC)
01101         {
01102                 #if defined(_FEDM_SUPPORT_UCLINUX)
01103                         char buf[10];
01104                         FEDM_SWSCANF(wsValue.c_str(), buf);
01105                         iMaxBlocks = atoi(buf);
01106                 #else
01107                         swscanf(wsValue.c_str(), L"%d", &iMaxBlocks);
01108                 #endif
01109                 if(iMaxBlocks <= 0)
01110                 {
01111                         delete child;
01112                         FEDM_RETURN(FEDM_XML_ERROR_NO_TAG_ATTRIBUTE);
01113                 }
01114         }
01115 
01116         // get blocksize
01117         xml->GetTagAttrib(parent, 2, wsAttribute, wsValue);
01118         if(wsAttribute == FEDM_XML_ATTRIB_SIZE_UC)
01119         {
01120                 #if defined(_FEDM_SUPPORT_UCLINUX)
01121                         char buf[10];
01122                         FEDM_SWSCANF(wsValue.c_str(), buf);
01123                         iBlockSize = atoi(buf);
01124                 #else
01125                         swscanf(wsValue.c_str(), L"%d", &iBlockSize);
01126                 #endif
01127                 if(iBlockSize != 32 && iBlockSize != 16 && iBlockSize != 4)
01128                 {
01129                         delete child;
01130                         FEDM_RETURN(FEDM_ERROR_PARAMETER);
01131                 }
01132         }
01133 
01134         if(iMaxBlocks * iBlockSize > (int)iArraySize)
01135         {
01136                 delete child;
01137                 FEDM_RETURN(FEDM_ERROR_PARAMETER);
01138         }
01139 
01140         xml->AddTagItem(root, child);
01141 
01142         // tags for data blocks
01143         for(int iBlock=0; iBlock<iMaxBlocks; ++iBlock)
01144         {
01145 #if defined(_MSC_VER) || defined(__BORLANDC__)
01146                 swprintf(wcValue, L"%d", iBlock);
01147 #else
01148                 swprintf(wcValue, 5, L"%d", iBlock);
01149 #endif
01150                 sTag = FEDM_XML_TAG_CFG_UC;
01151                 sTag += wcValue;
01152                 child = xml->FindTag(sTag, true, false);
01153                 if(child == NULL)
01154                 {
01155                         xml->CloseDoc();
01156                         return xml->GetLastError();
01157                 }
01158 
01159                 xml->AddTagItem(parent, child);
01160 
01161                 // attributes for customization: data mask
01162                 xml->GetTagAttrib(child, 0, sAttribute, sValue);
01163                 FEDM_ConvHexStrToHexUChar((string)sValue.c_str(), ucMask, iBlockSize);
01164                 for(iByte=0; iByte<iBlockSize; ++iByte)
01165                 {
01166                         (*itor_mask) = ucMask[iByte];
01167                         itor_mask++;
01168                 }
01169 
01170                 // merge all data bytes from attributes into data array
01171                 // mask controls the merging
01172                 for(iByte=0; iByte<iBlockSize; ++iByte)
01173                 {
01174                         xml->GetTagAttrib(child, iByte+1, sAttribute1, sValue);
01175 
01176                         sprintf(cAttribute, "b%d", iByte);
01177                         sAttribute2 = cAttribute;
01178                         FEDM_ConvHexStrToHexUChar((string)sValue.c_str(), &ucValue, 1);
01179 
01180                         if(ucMask[iByte] > 0 && sAttribute1.c_str() == sAttribute2)
01181                         {
01182                                 (*itor_data) = ((*itor_data) & (~ucMask[iByte])) | (ucValue & ucMask[iByte]);
01183                         }
01184                         itor_data++;
01185                 }
01186         }
01187 
01188         return FEDM_OK;
01189 #else
01190         return FEDM_ERROR_UNSUPPORTED;
01191 #endif
01192 }
01193 
01194 /***************************************************************************
01195   Begin                 :       13.08.2007 / M. Hultsch
01196   Version               :       03.00.02 / 14.01.2009 / M. Hultsch
01197 
01198   Function                      :       write sub-function for XML based reader customization
01199                                                 only for tag attribute name="Reader EEPROM-Parameter"
01200 
01201   Parameters            :       FEDM_XMLBase* xml               - xml handler
01202                                                 FEDM_XML_TREEITEM* root - root xml tree item
01203                                                 int iMaxBlocks                  - maximal blocks
01204                                                 int iBlockSize                  - block size of each block
01205 
01206   Return value          :       OK or error code
01207 
01208 ***************************************************************************/
01209 int FEDM_DataBase::SerializeProfileOut( FEDM_XMLBase* xml,
01210                                                                                 FEDM_XML_TREEITEM* root )
01211 {
01212 #ifdef _FEDM_XML_SUPPORT
01213         FEDM_CHK3(root);
01214 
01215         int iByte=0;
01216         int iMaxBlocks = 0;
01217         int iBlockSize = 16;
01218         int iTmpDataBlockSize = 32;
01219 
01220         wstring str;
01221         wstring wsValue;
01222         wstring wsAttrib;
01223         wchar_t wcValue[5];
01224         wchar_t wcAttrib[32];
01225         FEDM_XML_TREEITEM* parent = NULL;
01226         FEDM_XML_TREEITEM* child = NULL;
01227         FEDM_BYTE_ARRAY_ITOR itor_data;
01228         FEDM_BYTE_ARRAY_ITOR itor_mask;
01229 
01230         child = xml->BuildTag(FEDM_XML_TAG_DATA_ARRAY_UC);
01231         if(child == NULL)
01232         {
01233                 xml->CloseDoc();
01234                 return xml->GetLastError();
01235         }
01236 
01237         // tag attribute for data array "Reader EEPROM-Parameter"
01238         iMaxBlocks = m_iUsedEEDataBlocks;
01239         iBlockSize = m_iRFC_DataBlockSize;
01240         if(iMaxBlocks == 0 || iMaxBlocks*iBlockSize > (int)m_RFC_EEData.capacity())
01241                 FEDM_RETURN(FEDM_ERROR_PARAMETER);
01242         xml->AddTagAttrib(child, FEDM_XML_ATTRIB_NAME_UC, FEDM_XML_STRING_EEPROM_DATA_UC);
01243 #if defined(_MSC_VER) || defined(__BORLANDC__)
01244         swprintf(wcValue, L"%d", iMaxBlocks);
01245 #else
01246         swprintf(wcValue, 5, L"%d", iMaxBlocks);
01247 #endif
01248         xml->AddTagAttrib(child, FEDM_XML_ATTRIB_BLOCKS_UC, wcValue);
01249 #if defined(_MSC_VER) || defined(__BORLANDC__)
01250         swprintf(wcValue, L"%d", iBlockSize);
01251 #else
01252         swprintf(wcValue, 5, L"%d", iBlockSize);
01253 #endif
01254         xml->AddTagAttrib(child, FEDM_XML_ATTRIB_SIZE_UC, wcValue);
01255         xml->AddTagItem(root, child);
01256         parent = child;
01257         itor_data = m_RFC_EEData.begin();
01258         itor_mask = m_RFC_CfgProfileMask.begin();
01259 
01260         // tags for data blocks
01261         for(int iBlock=0; iBlock<iMaxBlocks; ++iBlock)
01262         {
01263 #if defined(_MSC_VER) || defined(__BORLANDC__)
01264                 swprintf(wcValue, L"%d", iBlock);
01265 #else
01266                 swprintf(wcValue, 5, L"%d", iBlock);
01267 #endif
01268                 str = FEDM_XML_TAG_CFG_UC;
01269                 str += wcValue;
01270                 child = xml->BuildTag(str, false, true);
01271                 if(child == NULL)
01272                 {
01273                         xml->CloseDoc();
01274                         return xml->GetLastError();
01275                 }
01276 
01277                 // attributes for customization: data mask
01278                 wsAttrib        = L"mask";
01279                 str.erase(str.begin(), str.end());//clear();
01280                 for(iByte=0; iByte<iBlockSize; ++iByte)
01281                 {
01282 #if defined(_MSC_VER) || defined(__BORLANDC__)
01283                         swprintf(wcValue, L"%02X", *itor_mask);
01284 #else
01285                         swprintf(wcValue, 5, L"%02X", *itor_mask);
01286 #endif
01287                         itor_mask++;
01288                         str += wcValue;
01289                 }
01290                 xml->AddTagAttrib(child, wsAttrib, str);
01291 
01292                 // alle Datenbytes als Attribute in tags einfuegen
01293                 for(iByte=0; iByte<iBlockSize; ++iByte)
01294                 {
01295 #if defined(_MSC_VER) || defined(__BORLANDC__)
01296                         swprintf(wcAttrib, L"b%d", iByte);
01297                         swprintf(wcValue, L"%02X", *itor_data);
01298 #else
01299                         swprintf(wcAttrib, 5, L"b%d", iByte);
01300                         swprintf(wcValue, 5, L"%02X", *itor_data);
01301 #endif
01302                         xml->AddTagAttrib(child, wcAttrib, wcValue);
01303                         itor_data++;
01304                 }
01305 
01306                 xml->AddTagItem(parent, child);
01307         }
01308 
01309         return FEDM_OK;
01310 #else
01311         return FEDM_ERROR_UNSUPPORTED;
01312 #endif
01313 }
01314 
01315 
01316 //#####################################################################################
01317 // access functions
01318 //#####################################################################################
01319 
01320 /***************************************************************************
01321   Begin         :       13.05.2000 / M. Hultsch
01322   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01323 
01324   Function              :       read a value from specified memory
01325 
01326   Parameter             :       const char* ID  -       parameter identifier
01327                                         bool* Data              -       pointer to value
01328 
01329   Return Value  :       FEDM_OK (0) or error code (<0)
01330 ***************************************************************************/
01331 int FEDM_DataBase::GetData(const char* ID, bool* Data)
01332 {
01333         FEDM_CHK3(ID);
01334         FEDM_CHK3(Data);
01335 
01336         int iBack = 0;
01337 
01338         // extract MemID
01339         int MemID = FEDM_GetMemIDOfID(ID);
01340         
01341         switch( MemID )
01342         {
01343         case FEDM_RFC_EEDATA_MEM:
01344                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
01345                 break;
01346         case FEDM_RFC_RAMDATA_MEM:
01347                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
01348                 break;
01349         case FEDM_ACC_EEDATA_MEM:
01350                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_EEData, 32);
01351                 break;
01352         case FEDM_ACC_RAMDATA_MEM:
01353                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_RAMData, 32);
01354                 break;
01355         case FEDM_TMPDATA_MEM:
01356                 iBack = FEDM_Base::GetData(ID, Data, m_TmpData, 32);
01357                 break;
01358         case FEDM_MJPDATA_MEM:
01359                 iBack = FEDM_Base::GetData(ID, Data, m_MjpData, 16);
01360                 break;
01361         case FEDM_SN_MEM:
01362                 iBack = FEDM_Base::GetData(ID, Data, m_SN_Mem, 16);
01363                 break;
01364         case FEDM_ID_MEM:
01365                 iBack = FEDM_Base::GetData(ID, Data, m_ID_Mem, 16);
01366                 break;
01367         case FEDM_AC_MEM:
01368                 iBack = FEDM_Base::GetData(ID, Data, m_AC_Mem, 16);
01369                 break;
01370         case FEDM_PUB_MEM:
01371                 iBack = FEDM_Base::GetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
01372                 break;
01373         case FEDM_SEC_MEM:
01374                 iBack = FEDM_Base::GetData(ID, Data, m_SecMem, 4);
01375                 break;
01376         case FEDM_CONF_MEM:
01377                 iBack = FEDM_Base::GetData(ID, Data, m_ConfMem, 4);
01378                 break;
01379         case FEDM_DATE_MEM:
01380                 iBack = FEDM_Base::GetData(ID, Data, m_DateMem, 16);
01381                 break;
01382         case FEDM_RFC_DATA_MASK_MEM:
01383                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01384                 break;
01385         default:
01386                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01387                 break;
01388         }
01389 
01390         if(iBack < 0)
01391         {
01392                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", bool*) - " << GetErrorText(iBack));
01393         }
01394         return iBack;
01395 }
01396 
01397 /***************************************************************************
01398   Begin         :       13.05.2000 / M. Hultsch
01399   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01400 
01401   Function              :       read a value from specified memory
01402 
01403   Parameter             :       const char* ID  -       parameter identifier
01404                                         BOOL* Data              -       pointer to value
01405 
01406   Return Value  :       FEDM_OK (0) or error code (<0)
01407 ***************************************************************************/
01408 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
01409 int FEDM_DataBase::GetData(const char* ID, BOOL* Data)
01410 {
01411         FEDM_CHK3(ID);
01412         FEDM_CHK3(Data);
01413 
01414         int iBack = 0;
01415 
01416         // extract MemID
01417         int MemID = FEDM_GetMemIDOfID(ID);
01418         
01419         switch( MemID )
01420         {
01421         case FEDM_RFC_EEDATA_MEM:               
01422                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
01423                 break;
01424         case FEDM_RFC_RAMDATA_MEM:              
01425                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
01426                 break;
01427         case FEDM_ACC_EEDATA_MEM:
01428                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_EEData, 32);
01429                 break;
01430         case FEDM_ACC_RAMDATA_MEM:
01431                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_RAMData, 32);
01432                 break;
01433         case FEDM_TMPDATA_MEM:
01434                 iBack = FEDM_Base::GetData(ID, Data, m_TmpData, 32);
01435                 break;
01436         case FEDM_MJPDATA_MEM:
01437                 iBack = FEDM_Base::GetData(ID, Data, m_MjpData, 16);
01438                 break;
01439         case FEDM_SN_MEM:
01440                 iBack = FEDM_Base::GetData(ID, Data, m_SN_Mem, 16);
01441                 break;
01442         case FEDM_ID_MEM:
01443                 iBack = FEDM_Base::GetData(ID, Data, m_ID_Mem, 16);
01444                 break;
01445         case FEDM_AC_MEM:                       
01446                 iBack = FEDM_Base::GetData(ID, Data, m_AC_Mem, 16);
01447                 break;
01448         case FEDM_PUB_MEM:                      
01449                 iBack = FEDM_Base::GetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
01450                 break;
01451         case FEDM_SEC_MEM:                      
01452                 iBack = FEDM_Base::GetData(ID, Data, m_SecMem, 4);
01453                 break;
01454         case FEDM_CONF_MEM:             
01455                 iBack = FEDM_Base::GetData(ID, Data, m_ConfMem, 4);
01456                 break;
01457         case FEDM_DATE_MEM:
01458                 iBack = FEDM_Base::GetData(ID, Data, m_DateMem, 16);
01459                 break;
01460         case FEDM_RFC_DATA_MASK_MEM:
01461                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01462                 break;
01463         default:
01464                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01465                 break;
01466         }
01467 
01468         if(iBack < 0)
01469         {
01470                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ",BOOL*) - " << GetErrorText(iBack));
01471         }
01472         return iBack;
01473 }
01474 #endif
01475 
01476 /***************************************************************************
01477   Begin         :       13.05.2000 / M. Hultsch
01478   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01479 
01480   Function              :       read a value from specified memory
01481 
01482   Parameter             :       const char* ID  -       parameter identifier
01483                                         unsigned char* Data             -       pointer to value
01484 
01485   Return Value  :       FEDM_OK (0) or error code (<0)
01486 ***************************************************************************/
01487 int FEDM_DataBase::GetData(const char* ID, unsigned char* Data)
01488 {
01489         FEDM_CHK3(ID);
01490         FEDM_CHK3(Data);
01491 
01492         int iBack = 0;
01493 
01494         // extract MemID
01495         int MemID = FEDM_GetMemIDOfID(ID);
01496         
01497         switch( MemID )
01498         {
01499         case FEDM_RFC_EEDATA_MEM:               
01500                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
01501                 break;
01502         case FEDM_RFC_RAMDATA_MEM:              
01503                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
01504                 break;
01505         case FEDM_ACC_EEDATA_MEM:
01506                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_EEData, 32);
01507                 break;
01508         case FEDM_ACC_RAMDATA_MEM:
01509                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_RAMData, 32);
01510                 break;
01511         case FEDM_TMPDATA_MEM:
01512                 iBack = FEDM_Base::GetData(ID, Data, m_TmpData, 32);
01513                 break;
01514         case FEDM_MJPDATA_MEM:
01515                 iBack = FEDM_Base::GetData(ID, Data, m_MjpData, 16);
01516                 break;
01517         case FEDM_SN_MEM:
01518                 iBack = FEDM_Base::GetData(ID, Data, m_SN_Mem, 16);
01519                 break;
01520         case FEDM_ID_MEM:
01521                 iBack = FEDM_Base::GetData(ID, Data, m_ID_Mem, 16);
01522                 break;
01523         case FEDM_AC_MEM:                       
01524                 iBack = FEDM_Base::GetData(ID, Data, m_AC_Mem, 16);
01525                 break;
01526         case FEDM_PUB_MEM:                      
01527                 iBack = FEDM_Base::GetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
01528                 break;
01529         case FEDM_SEC_MEM:                      
01530                 iBack = FEDM_Base::GetData(ID, Data, m_SecMem, 4);
01531                 break;
01532         case FEDM_CONF_MEM:             
01533                 iBack = FEDM_Base::GetData(ID, Data, m_ConfMem,4 );
01534                 break;
01535         case FEDM_DATE_MEM:
01536                 iBack = FEDM_Base::GetData(ID, Data, m_DateMem, 16);
01537                 break;
01538         case FEDM_RFC_DATA_MASK_MEM:
01539                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01540                 break;
01541         default:
01542                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01543                 break;
01544         }
01545 
01546         if(iBack < 0)
01547         {
01548                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", unsigned char*) - " << GetErrorText(iBack));
01549         }
01550         return iBack;
01551 }
01552 
01553 /***************************************************************************
01554   Begin         :       13.05.2000 / M. Hultsch
01555   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01556 
01557   Function              :       read a value from specified memory
01558 
01559   Parameter             :       const char* ID  -       parameter identifier
01560                                         unsigned char* Data             -       pointer to value
01561                                         int Cnt                 -       length of Data
01562 
01563   Return Value  :       FEDM_OK (0) or error code (<0)
01564 ***************************************************************************/
01565 int FEDM_DataBase::GetData(const char* ID, unsigned char* Data, int Cnt)
01566 {
01567         FEDM_CHK3(ID);
01568         FEDM_CHK3(Data);
01569 
01570         int iBack = 0;
01571 
01572         // extract MemID
01573         int MemID = FEDM_GetMemIDOfID(ID);
01574         
01575         switch( MemID )
01576         {
01577         case FEDM_RFC_EEDATA_MEM:               
01578                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_RFC_EEData, m_iRFC_DataBlockSize);
01579                 break;
01580         case FEDM_RFC_RAMDATA_MEM:              
01581                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_RFC_RAMData, m_iRFC_DataBlockSize);
01582                 break;
01583         case FEDM_ACC_EEDATA_MEM:
01584                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_ACC_EEData, 32);
01585                 break;
01586         case FEDM_ACC_RAMDATA_MEM:
01587                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_ACC_RAMData, 32);
01588                 break;
01589         case FEDM_TMPDATA_MEM:
01590                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_TmpData, 32);
01591                 break;
01592         case FEDM_MJPDATA_MEM:
01593                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_MjpData, 16);
01594                 break;
01595         case FEDM_SN_MEM:
01596                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_SN_Mem, 16);
01597                 break;
01598         case FEDM_ID_MEM:
01599                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_ID_Mem, 16);
01600                 break;
01601         case FEDM_AC_MEM:                       
01602                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_AC_Mem, 16);
01603                 break;
01604         case FEDM_PUB_MEM:                      
01605                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_PubMem, m_iPubMemBlockSize);
01606                 break;
01607         case FEDM_SEC_MEM:                      
01608                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_SecMem, 4);
01609                 break;
01610         case FEDM_CONF_MEM:             
01611                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_ConfMem, 4);
01612                 break;
01613         case FEDM_DATE_MEM:
01614                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_DateMem, 16);
01615                 break;
01616         case FEDM_RFC_DATA_MASK_MEM:
01617                 iBack = FEDM_Base::GetData(ID, Data, Cnt, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01618                 break;
01619         default:
01620                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01621                 break;
01622         }
01623 
01624         if(iBack < 0)
01625         {
01626                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", unsigned char*, int) - " << GetErrorText(iBack));
01627         }
01628         return iBack;
01629 }
01630 
01631 /***************************************************************************
01632   Begin         :       13.05.2000 / M. Hultsch
01633   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01634 
01635   Function              :       read a value from specified memory
01636 
01637   Parameter             :       const char* ID  -       parameter identifier
01638                                         unsigned int* Data              -       pointer to value
01639 
01640   Return Value  :       FEDM_OK (0) or error code (<0)
01641 ***************************************************************************/
01642 int FEDM_DataBase::GetData(const char* ID, unsigned int* Data)
01643 {
01644         FEDM_CHK3(ID);
01645         FEDM_CHK3(Data);
01646 
01647         int iBack = 0;
01648 
01649         // extract MemID
01650         int MemID = FEDM_GetMemIDOfID(ID);
01651         
01652         switch( MemID )
01653         {
01654         case FEDM_RFC_EEDATA_MEM:               
01655                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
01656                 break;
01657         case FEDM_RFC_RAMDATA_MEM:              
01658                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
01659                 break;
01660         case FEDM_ACC_EEDATA_MEM:
01661                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_EEData, 32);
01662                 break;
01663         case FEDM_ACC_RAMDATA_MEM:
01664                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_RAMData, 32);
01665                 break;
01666         case FEDM_TMPDATA_MEM:
01667                 iBack = FEDM_Base::GetData(ID, Data, m_TmpData, 32);
01668                 break;
01669         case FEDM_MJPDATA_MEM:
01670                 iBack = FEDM_Base::GetData(ID, Data, m_MjpData, 16);
01671                 break;
01672         case FEDM_SN_MEM:
01673                 iBack = FEDM_Base::GetData(ID, Data, m_SN_Mem, 16);
01674                 break;
01675         case FEDM_ID_MEM:
01676                 iBack = FEDM_Base::GetData(ID, Data, m_ID_Mem, 16);
01677                 break;
01678         case FEDM_AC_MEM:                       
01679                 iBack = FEDM_Base::GetData(ID, Data, m_AC_Mem, 16);
01680                 break;
01681         case FEDM_PUB_MEM:                      
01682                 iBack = FEDM_Base::GetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
01683                 break;
01684         case FEDM_SEC_MEM:                      
01685                 iBack = FEDM_Base::GetData(ID, Data, m_SecMem, 4);
01686                 break;
01687         case FEDM_CONF_MEM:             
01688                 iBack = FEDM_Base::GetData(ID, Data, m_ConfMem, 4);
01689                 break;
01690         case FEDM_DATE_MEM:
01691                 iBack = FEDM_Base::GetData(ID, Data, m_DateMem, 16);
01692                 break;
01693         case FEDM_RFC_DATA_MASK_MEM:
01694                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01695                 break;
01696         default:
01697                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01698                 break;
01699         }
01700 
01701         if(iBack < 0)
01702         {
01703                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", unsigned int*) - " << GetErrorText(iBack));
01704         }
01705         return iBack;
01706 }
01707 
01708 /***************************************************************************
01709   Begin         :       13.05.2000 / M. Hultsch
01710   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01711 
01712   Function              :       read a value from specified memory
01713 
01714   Parameter             :       const char* ID          -       parameter identifier
01715                                         __int64* Data           -       pointer to value
01716 
01717   Return Value  :       FEDM_OK (0) or error code (<0)
01718 ***************************************************************************/
01719 int FEDM_DataBase::GetData(const char* ID, __int64* Data)
01720 {
01721         FEDM_CHK3(ID);
01722         FEDM_CHK3(Data);
01723 
01724         int iBack = 0;
01725 
01726         // extract MemID
01727         int MemID = FEDM_GetMemIDOfID(ID);
01728         
01729         switch( MemID )
01730         {
01731         case FEDM_RFC_EEDATA_MEM:               
01732                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
01733                 break;
01734         case FEDM_RFC_RAMDATA_MEM:              
01735                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
01736                 break;
01737         case FEDM_ACC_EEDATA_MEM:
01738                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_EEData, 32);
01739                 break;
01740         case FEDM_ACC_RAMDATA_MEM:
01741                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_RAMData, 32);
01742                 break;
01743         case FEDM_TMPDATA_MEM:
01744                 iBack = FEDM_Base::GetData(ID, Data, m_TmpData, 32);
01745                 break;
01746         case FEDM_MJPDATA_MEM:
01747                 iBack = FEDM_Base::GetData(ID, Data, m_MjpData, 16);
01748                 break;
01749         case FEDM_SN_MEM:
01750                 iBack = FEDM_Base::GetData(ID, Data, m_SN_Mem, 16);
01751                 break;
01752         case FEDM_ID_MEM:
01753                 iBack = FEDM_Base::GetData(ID, Data, m_ID_Mem, 16);
01754                 break;
01755         case FEDM_AC_MEM:                       
01756                 iBack = FEDM_Base::GetData(ID, Data, m_AC_Mem, 16);
01757                 break;
01758         case FEDM_PUB_MEM:                      
01759                 iBack = FEDM_Base::GetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
01760                 break;
01761         case FEDM_SEC_MEM:                      
01762                 iBack = FEDM_Base::GetData(ID, Data, m_SecMem, 4);
01763                 break;
01764         case FEDM_CONF_MEM:             
01765                 iBack = FEDM_Base::GetData(ID, Data, m_ConfMem, 4);
01766                 break;
01767         case FEDM_DATE_MEM:
01768                 iBack = FEDM_Base::GetData(ID, Data, m_DateMem, 16);
01769                 break;
01770         case FEDM_RFC_DATA_MASK_MEM:
01771                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01772                 break;
01773         default:
01774                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01775                 break;
01776         }
01777 
01778         if(iBack < 0)
01779         {
01780                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", __int64*) - " << GetErrorText(iBack));
01781         }
01782         return iBack;
01783 }
01784 
01785 /***************************************************************************
01786   Begin         :       13.05.2000 / M. Hultsch
01787   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01788 
01789   Function              :       read a value from specified memory
01790 
01791   Parameter             :       const char* ID  -       parameter identifier
01792                                         CString& Data   -       reference of value
01793 
01794   Return Value  :       FEDM_OK (0) or error code (<0)
01795 ***************************************************************************/
01796 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
01797 int FEDM_DataBase::GetData(const char* ID, CString& Data)
01798 {
01799         FEDM_CHK3(ID);
01800         FEDM_CHK3(&Data);
01801 
01802         int iBack = 0;
01803 
01804         // extract MemID
01805         int MemID = FEDM_GetMemIDOfID(ID);
01806         
01807         switch( MemID )
01808         {
01809         case FEDM_RFC_EEDATA_MEM:               
01810                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
01811                 break;
01812         case FEDM_RFC_RAMDATA_MEM:              
01813                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
01814                 break;
01815         case FEDM_ACC_EEDATA_MEM:
01816                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_EEData, 32);
01817                 break;
01818         case FEDM_ACC_RAMDATA_MEM:
01819                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_RAMData, 32);
01820                 break;
01821         case FEDM_TMPDATA_MEM:
01822                 iBack = FEDM_Base::GetData(ID, Data, m_TmpData, 32);
01823                 break;
01824         case FEDM_MJPDATA_MEM:
01825                 iBack = FEDM_Base::GetData(ID, Data, m_MjpData, 16);
01826                 break;
01827         case FEDM_SN_MEM:
01828                 iBack = FEDM_Base::GetData(ID, Data, m_SN_Mem, 16);
01829                 break;
01830         case FEDM_ID_MEM:
01831                 iBack = FEDM_Base::GetData(ID, Data, m_ID_Mem, 16);
01832                 break;
01833         case FEDM_AC_MEM:                       
01834                 iBack = FEDM_Base::GetData(ID, Data, m_AC_Mem, 16);
01835                 break;
01836         case FEDM_PUB_MEM:                      
01837                 iBack = FEDM_Base::GetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
01838                 break;
01839         case FEDM_SEC_MEM:                      
01840                 iBack = FEDM_Base::GetData(ID, Data, m_SecMem, 4);
01841                 break;
01842         case FEDM_CONF_MEM:             
01843                 iBack = FEDM_Base::GetData(ID, Data, m_ConfMem, 4);
01844                 break;
01845         case FEDM_DATE_MEM:
01846                 iBack = FEDM_Base::GetData(ID, Data, m_DateMem, 16);
01847                 break;
01848         case FEDM_RFC_DATA_MASK_MEM:
01849                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01850                 break;
01851         default:
01852                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01853                 break;
01854         }
01855 
01856         if(iBack < 0)
01857         {
01858                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", CString&) - " << GetErrorText(iBack));
01859         }
01860         return iBack;
01861 }
01862 #endif
01863 
01864 /***************************************************************************
01865   Begin         :       03.07.2000 / M. Hultsch
01866   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01867 
01868   Function              :       read a value from specified memory
01869 
01870   Parameter             :       const char* ID  -       parameter identifier
01871                                         string& Data    -       reference of value
01872 
01873   Return Value  :       FEDM_OK (0) or error code (<0)
01874 ***************************************************************************/
01875 int FEDM_DataBase::GetData(const char* ID, string& Data)
01876 {
01877         FEDM_CHK3(ID);
01878         FEDM_CHK3(&Data);
01879 
01880         int iBack = 0;
01881 
01882         // extract MemID
01883         int MemID = FEDM_GetMemIDOfID(ID);
01884         
01885         switch( MemID )
01886         {
01887         case FEDM_RFC_EEDATA_MEM:               
01888                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
01889                 break;
01890         case FEDM_RFC_RAMDATA_MEM:              
01891                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
01892                 break;
01893         case FEDM_ACC_EEDATA_MEM:
01894                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_EEData, 32);
01895                 break;
01896         case FEDM_ACC_RAMDATA_MEM:
01897                 iBack = FEDM_Base::GetData(ID, Data, m_ACC_RAMData, 32);
01898                 break;
01899         case FEDM_TMPDATA_MEM:
01900                 iBack = FEDM_Base::GetData(ID, Data, m_TmpData, 32);
01901                 break;
01902         case FEDM_MJPDATA_MEM:
01903                 iBack = FEDM_Base::GetData(ID, Data, m_MjpData, 16);
01904                 break;
01905         case FEDM_SN_MEM:
01906                 iBack = FEDM_Base::GetData(ID, Data, m_SN_Mem, 16);
01907                 break;
01908         case FEDM_ID_MEM:
01909                 iBack = FEDM_Base::GetData(ID, Data, m_ID_Mem, 16);
01910                 break;
01911         case FEDM_AC_MEM:                       
01912                 iBack = FEDM_Base::GetData(ID, Data, m_AC_Mem, 16);
01913                 break;
01914         case FEDM_PUB_MEM:                      
01915                 iBack = FEDM_Base::GetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
01916                 break;
01917         case FEDM_SEC_MEM:                      
01918                 iBack = FEDM_Base::GetData(ID, Data, m_SecMem, 4);
01919                 break;
01920         case FEDM_CONF_MEM:             
01921                 iBack = FEDM_Base::GetData(ID, Data, m_ConfMem, 4);
01922                 break;
01923         case FEDM_DATE_MEM:
01924                 iBack = FEDM_Base::GetData(ID, Data, m_DateMem, 16);
01925                 break;
01926         case FEDM_RFC_DATA_MASK_MEM:
01927                 iBack = FEDM_Base::GetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
01928                 break;
01929         default:
01930                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
01931                 break;
01932         }
01933 
01934         if(iBack < 0)
01935         {
01936                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", string&) - " << GetErrorText(iBack));
01937         }
01938         return iBack;
01939 }
01940 
01941 /***************************************************************************
01942   Begin         :       13.05.2000 / M. Hultsch
01943   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
01944 
01945   Function              :       read a value from specified memory
01946 
01947   Parameter             :       const char* ID  -       parameter identifier
01948                                         char* Data              -       pointer to value
01949                                         int DataLen             -       length of Data
01950 
01951   Return Value  :       FEDM_OK (0) or error code (<0)
01952 ***************************************************************************/
01953 int FEDM_DataBase::GetData(const char* ID, char* Data, int DataLen)
01954 {
01955         FEDM_CHK3(ID);
01956         FEDM_CHK3(Data);
01957 
01958         int iBack = 0;
01959 
01960         // extract MemID
01961         int MemID = FEDM_GetMemIDOfID(ID);
01962         
01963         switch( MemID )
01964         {
01965         case FEDM_RFC_EEDATA_MEM:               
01966                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_RFC_EEData, m_iRFC_DataBlockSize);
01967                 break;
01968         case FEDM_RFC_RAMDATA_MEM:              
01969                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_RFC_RAMData, m_iRFC_DataBlockSize);
01970                 break;
01971         case FEDM_ACC_EEDATA_MEM:
01972                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_ACC_EEData, 32);
01973                 break;
01974         case FEDM_ACC_RAMDATA_MEM:
01975                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_ACC_RAMData, 32);
01976                 break;
01977         case FEDM_TMPDATA_MEM:
01978                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_TmpData, 32);
01979                 break;
01980         case FEDM_MJPDATA_MEM:
01981                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_MjpData, 16);
01982                 break;
01983         case FEDM_SN_MEM:
01984                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_SN_Mem, 16);
01985                 break;
01986         case FEDM_ID_MEM:
01987                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_ID_Mem, 16);
01988                 break;
01989         case FEDM_AC_MEM:                       
01990                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_AC_Mem, 16);
01991                 break;
01992         case FEDM_PUB_MEM:                      
01993                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_PubMem, m_iPubMemBlockSize);
01994                 break;
01995         case FEDM_SEC_MEM:                      
01996                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_SecMem, 4);
01997                 break;
01998         case FEDM_CONF_MEM:             
01999                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_ConfMem, 4);
02000                 break;
02001         case FEDM_DATE_MEM:
02002                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_DateMem, 16);
02003                 break;
02004         case FEDM_RFC_DATA_MASK_MEM:
02005                 iBack = FEDM_Base::GetData(ID, Data, DataLen, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
02006                 break;
02007         default:
02008                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
02009                 break;
02010         }
02011 
02012         if(iBack < 0)
02013         {
02014                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", char*, int) - " << GetErrorText(iBack));
02015         }
02016         return iBack;
02017 }
02018 
02019 /***************************************************************************
02020   Begin         :       13.05.2000 / M. Hultsch
02021   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
02022 
02023   Function              :       write a value in specified memory
02024 
02025   Parameter             :       const char* ID  -       parameter identifier
02026                                         bool Data               -       value
02027 
02028   Return Value  :       FEDM_OK (0) or error code (<0)
02029 ***************************************************************************/
02030 int FEDM_DataBase::SetData( const char* ID, bool Data )
02031 {
02032         FEDM_CHK3(ID);
02033 
02034         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
02035         int iBack = 0;
02036 
02037         // extract access parameters
02038         sscanf( ID, "%d %d %d %d %d %d %d",
02039                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
02040 
02041         
02042         switch( MemID )
02043         {
02044         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
02045                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
02046                 if(iBack == FEDM_MODIFIED)
02047                 {
02048                         // mark block as modified
02049                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02050                 }
02051                 
02052                 if(iBack >= 0)
02053                 {
02054                         OptionalSetDataAction( ID, (__int64)Data );
02055                 }
02056                 break;
02057         
02058         case FEDM_RFC_RAMDATA_MEM:              
02059                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
02060                 if(iBack == FEDM_MODIFIED)
02061                 {
02062                         // mark block as modified
02063                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02064                 }
02065                 
02066                 if(iBack >= 0)
02067                 {
02068                         OptionalSetDataAction( ID, (__int64)Data );
02069                 }
02070                 break;
02071         
02072         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
02073                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_EEData, 32);
02074                 if(iBack == FEDM_MODIFIED)
02075                 {
02076                         // mark block as modified
02077                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
02078                 }
02079                 
02080                 if(iBack >= 0)
02081                 {
02082                         OptionalSetDataAction( ID, (__int64)Data );
02083                 }
02084                 break;
02085         
02086         case FEDM_ACC_RAMDATA_MEM:
02087                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_RAMData, 32);
02088                 if(iBack == FEDM_MODIFIED)
02089                 {
02090                         // mark block as modified
02091                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02092                 }
02093                 
02094                 if(iBack >= 0)
02095                 {
02096                         OptionalSetDataAction( ID, (__int64)Data );
02097                 }
02098                 break;
02099         
02100         case FEDM_TMPDATA_MEM:
02101                 iBack = FEDM_Base::SetData(ID, Data, m_TmpData, 32);
02102                 break;
02103         case FEDM_MJPDATA_MEM:
02104                 iBack = FEDM_Base::SetData(ID, Data, m_MjpData, 16);
02105                 break;
02106         case FEDM_SN_MEM:
02107                 iBack = FEDM_Base::SetData(ID, Data, m_SN_Mem, 16);
02108                 break;
02109         case FEDM_ID_MEM:
02110                 iBack = FEDM_Base::SetData(ID, Data, m_ID_Mem, 16);
02111                 break;
02112         case FEDM_AC_MEM:                       
02113                 iBack = FEDM_Base::SetData(ID, Data, m_AC_Mem, 16);
02114                 break;
02115         case FEDM_PUB_MEM:                      
02116                 iBack = FEDM_Base::SetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
02117                 break;
02118         case FEDM_SEC_MEM:                      
02119                 iBack = FEDM_Base::SetData(ID, Data, m_SecMem, 4);
02120                 break;
02121         case FEDM_CONF_MEM:             
02122                 iBack = FEDM_Base::SetData(ID, Data, m_ConfMem, 4);
02123                 break;
02124         case FEDM_DATE_MEM:
02125                 iBack = FEDM_Base::SetData(ID, Data, m_DateMem, 16);
02126                 break;
02127         case FEDM_RFC_DATA_MASK_MEM:
02128                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
02129                 break;
02130         default:
02131                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
02132                 break;
02133         }
02134 
02135         if(iBack < 0)
02136         {
02137                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << Data << ") - " << GetErrorText(iBack));
02138         }
02139         return iBack;
02140 }
02141 
02142 /***************************************************************************
02143   Begin         :       13.05.2000 / M. Hultsch
02144   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
02145 
02146   Function              :       write a value in specified memory
02147 
02148   Parameter             :       const char* ID  -       parameter identifier
02149                                         BOOL Data               -       value
02150 
02151   Return Value  :       FEDM_OK (0) or error code (<0)
02152 ***************************************************************************/
02153 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
02154 int FEDM_DataBase::SetData( const char* ID, BOOL Data )
02155 {
02156         FEDM_CHK3(ID);
02157 
02158         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
02159         int iBack = 0;
02160 
02161         // extract access parameters
02162         sscanf( ID, "%d %d %d %d %d %d %d",
02163                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
02164         
02165         switch( MemID )
02166         {
02167         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
02168                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_RFC_EEData, m_iRFC_DataBlockSize);
02169                 if(iBack == FEDM_MODIFIED)
02170                 {
02171                         // mark block as modified
02172                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02173                 }
02174                 
02175                 if(iBack >= 0)
02176                 {
02177                         OptionalSetDataAction( ID, (__int64)Data );
02178                 }
02179                 break;
02180         
02181         case FEDM_RFC_RAMDATA_MEM:
02182                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_RFC_RAMData, m_iRFC_DataBlockSize);
02183                 if(iBack == FEDM_MODIFIED)
02184                 {
02185                         // mark block as modified
02186                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02187                 }
02188                 
02189                 if(iBack >= 0)
02190                 {
02191                         OptionalSetDataAction( ID, (__int64)Data );
02192                 }
02193                 break;
02194         
02195         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
02196                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_ACC_EEData, 32);
02197                 if(iBack == FEDM_MODIFIED)
02198                 {
02199                         // mark block as modified
02200                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
02201                 }
02202                 
02203                 if(iBack >= 0)
02204                 {
02205                         OptionalSetDataAction( ID, (__int64)Data );
02206                 }
02207                 break;
02208         
02209         case FEDM_ACC_RAMDATA_MEM:
02210                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_ACC_RAMData, 32);
02211                 if(iBack == FEDM_MODIFIED)
02212                 {
02213                         // mark block as modified
02214                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02215                 }
02216                 
02217                 if(iBack >= 0)
02218                 {
02219                         OptionalSetDataAction( ID, (__int64)Data );
02220                 }
02221                 break;
02222         
02223         case FEDM_TMPDATA_MEM:
02224                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_TmpData, 32);
02225                 break;
02226         case FEDM_MJPDATA_MEM:
02227                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_MjpData, 16);
02228                 break;
02229         case FEDM_SN_MEM:
02230                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_SN_Mem, 16);
02231                 break;
02232         case FEDM_ID_MEM:
02233                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_ID_Mem, 16);
02234                 break;
02235         case FEDM_AC_MEM:                       
02236                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_AC_Mem, 16);
02237                 break;
02238         case FEDM_PUB_MEM:                      
02239                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_PubMem, m_iPubMemBlockSize);
02240                 break;
02241         case FEDM_SEC_MEM:                      
02242                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_SecMem, 4);
02243                 break;
02244         case FEDM_CONF_MEM:             
02245                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_ConfMem, 4);
02246                 break;
02247         case FEDM_DATE_MEM:
02248                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_DateMem, 16);
02249                 break;
02250         case FEDM_RFC_DATA_MASK_MEM:
02251                 iBack = FEDM_Base::SetData(ID, Data ? true : false, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
02252                 break;
02253         default:
02254                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
02255                 break;
02256         }
02257 
02258         if(iBack < 0)
02259         {
02260                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << Data << ") - " << GetErrorText(iBack));
02261         }
02262         return iBack;
02263 }
02264 #endif
02265 
02266 /***************************************************************************
02267   Begin         :       13.05.2000 / M. Hultsch
02268   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
02269 
02270   Function              :       write a value in specified memory
02271 
02272   Parameter             :       const char* ID  -       parameter identifier
02273                                         unsigned char Data              -       value
02274 
02275   Return Value  :       FEDM_OK (0) or error code (<0)
02276 ***************************************************************************/
02277 int FEDM_DataBase::SetData( const char* ID, unsigned char Data )
02278 {
02279         FEDM_CHK3(ID);
02280 
02281         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
02282         int iBack = 0;
02283 
02284         // extract access parameters
02285         sscanf( ID, "%d %d %d %d %d %d %d",
02286                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
02287         
02288         switch( MemID )
02289         {
02290         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
02291                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
02292                 if(iBack == FEDM_MODIFIED)
02293                 {
02294                         // mark block as modified
02295                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02296                 }
02297                 
02298                 if(iBack >= 0)
02299                 {
02300                         OptionalSetDataAction( ID, (__int64)Data );
02301                 }
02302                 break;
02303         
02304         case FEDM_RFC_RAMDATA_MEM:              
02305                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
02306                 if(iBack == FEDM_MODIFIED)
02307                 {
02308                         // mark block as modified
02309                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02310                 }
02311                 
02312                 if(iBack >= 0)
02313                 {
02314                         OptionalSetDataAction( ID, (__int64)Data );
02315                 }
02316                 break;
02317         
02318         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
02319                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_EEData, 32);
02320                 if(iBack == FEDM_MODIFIED)
02321                 {
02322                         // mark block as modified
02323                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
02324                 }
02325                 
02326                 if(iBack >= 0)
02327                 {
02328                         OptionalSetDataAction( ID, (__int64)Data );
02329                 }
02330                 break;
02331         
02332         case FEDM_ACC_RAMDATA_MEM:
02333                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_RAMData, 32);
02334                 if(iBack == FEDM_MODIFIED)
02335                 {
02336                         // mark block as modified
02337                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02338                 }
02339                 
02340                 if(iBack >= 0)
02341                 {
02342                         OptionalSetDataAction( ID, (__int64)Data );
02343                 }
02344                 break;
02345         
02346         case FEDM_TMPDATA_MEM:
02347                 iBack = FEDM_Base::SetData(ID, Data, m_TmpData, 32);
02348                 break;
02349         case FEDM_MJPDATA_MEM:
02350                 iBack = FEDM_Base::SetData(ID, Data, m_MjpData, 16);
02351                 break;
02352         case FEDM_SN_MEM:
02353                 iBack = FEDM_Base::SetData(ID, Data, m_SN_Mem, 16);
02354                 break;
02355         case FEDM_ID_MEM:
02356                 iBack = FEDM_Base::SetData(ID, Data, m_ID_Mem, 16);
02357                 break;
02358         case FEDM_AC_MEM:                       
02359                 iBack = FEDM_Base::SetData(ID, Data, m_AC_Mem, 16);
02360                 break;
02361         case FEDM_PUB_MEM:                      
02362                 iBack = FEDM_Base::SetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
02363                 break;
02364         case FEDM_SEC_MEM:
02365                 iBack = FEDM_Base::SetData(ID, Data, m_SecMem, 4);
02366                 break;
02367         case FEDM_CONF_MEM:             
02368                 iBack = FEDM_Base::SetData(ID, Data, m_ConfMem, 4);
02369                 break;
02370         case FEDM_DATE_MEM:
02371                 iBack = FEDM_Base::SetData(ID, Data, m_DateMem, 16);
02372                 break;
02373         case FEDM_RFC_DATA_MASK_MEM:
02374                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
02375                 break;
02376         default:
02377                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
02378                 break;
02379         }
02380 
02381         if(iBack < 0)
02382         {
02383                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=0x" << std::hex << std::uppercase << (int)Data << ") - " << GetErrorText(iBack));
02384         }
02385         return iBack;
02386 }
02387 
02388 /***************************************************************************
02389   Begin         :       13.05.2000 / M. Hultsch
02390   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
02391 
02392   Function              :       write a value in specified memory
02393 
02394   Parameter             :       const char* ID          -       parameter identifier
02395                                         unsigned char* Data     -       pointer to value
02396                                         int Cnt                         -       length of Data
02397 
02398   Return Value  :       FEDM_OK (0) or error code (<0)
02399 ***************************************************************************/
02400 int FEDM_DataBase::SetData( const char* ID, unsigned char* Data, int Cnt )
02401 {
02402         FEDM_CHK3(ID);
02403         FEDM_CHK3(Data);
02404 
02405         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
02406         int iBack = 0;
02407         int iLastIndex = 0;
02408         int iBlockAdr = 0;
02409 
02410         // extract access parameters
02411         sscanf( ID, "%d %d %d %d %d %d %d",
02412                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
02413         
02414         switch( MemID )
02415         {
02416         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
02417 /*              iBack = FEDM_Base::SetData(ID, Data, Cnt, m_RFC_RAMData, 16);
02418                 if(iBack == FEDM_MODIFIED)
02419                 {
02420                         // mark block as modified
02421                         m_RFC_RAMData[BlockAdr * 16 + 15] |= 0x02;
02422                         iBlockAdr = BlockAdr;
02423                         iLastIndex = BytePos + ByteCnt;
02424                         while(iLastIndex > 16)
02425                         {
02426                                 iBlockAdr++;
02427                                 m_RFC_RAMData[iBlockAdr * 16 + 15] |= 0x02;
02428                                 iLastIndex -= 16;
02429                         }
02430                 }*/
02431                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_RFC_EEData, m_iRFC_DataBlockSize);
02432                 if(iBack == FEDM_MODIFIED)
02433                 {
02434                         // mark block as modified
02435                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02436                         iBlockAdr = BlockAdr;
02437                         iLastIndex = BytePos + ByteCnt;
02438                         while(iLastIndex > m_iRFC_DataBlockSize)
02439                         {
02440                                 iBlockAdr++;
02441                                 m_RFC_EEData[iBlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02442                                 iLastIndex -= m_iRFC_DataBlockSize;
02443                         }
02444                 }
02445                 
02446                 break;
02447         
02448         case FEDM_RFC_RAMDATA_MEM:
02449                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_RFC_RAMData, m_iRFC_DataBlockSize);
02450                 if(iBack == FEDM_MODIFIED)
02451                 {
02452                         // mark block as modified
02453                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02454                         iLastIndex = BytePos + ByteCnt;
02455                         while(iLastIndex > m_iRFC_DataBlockSize)
02456                         {
02457                                 BlockAdr++;
02458                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02459                                 iLastIndex -= m_iRFC_DataBlockSize;
02460                         }
02461                 }
02462                 
02463                 break;
02464         
02465         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
02466 /*              iBack = FEDM_Base::SetData(ID, Data, Cnt, m_ACC_RAMData, 32);
02467                 if(iBack == FEDM_MODIFIED)
02468                 {
02469                         // mark block as modified
02470                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02471                         iBlockAdr = BlockAdr;
02472                         iLastIndex = BytePos + ByteCnt;
02473                         while(iLastIndex > 32)
02474                         {
02475                                 iBlockAdr++;
02476                                 m_ACC_RAMData[iBlockAdr * 32 + 31] |= 0x02;
02477                                 iLastIndex -= 32;
02478                         }
02479                 }*/
02480                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_ACC_EEData, 32);
02481                 if(iBack == FEDM_MODIFIED)
02482                 {
02483                         // mark block as modified
02484                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
02485                         iBlockAdr = BlockAdr;
02486                         iLastIndex = BytePos + ByteCnt;
02487                         while(iLastIndex > 32)
02488                         {
02489                                 iBlockAdr++;
02490                                 m_ACC_EEData[iBlockAdr * 32 + 31] |= 0x02;
02491                                 iLastIndex -= 32;
02492                         }
02493                 }
02494                 
02495                 break;
02496         
02497         case FEDM_ACC_RAMDATA_MEM:
02498                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_ACC_RAMData, 32);
02499                 if(iBack == FEDM_MODIFIED)
02500                 {
02501                         // mark block as modified
02502                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02503                         iLastIndex = BytePos + ByteCnt;
02504                         while(iLastIndex > 32)
02505                         {
02506                                 BlockAdr++;
02507                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02508                                 iLastIndex -= 32;
02509                         }
02510                 }
02511                 
02512                 break;
02513         
02514         case FEDM_TMPDATA_MEM:
02515                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_TmpData, 32);
02516                 break;
02517         case FEDM_MJPDATA_MEM:
02518                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_MjpData, 16);
02519                 break;
02520         case FEDM_SN_MEM:
02521                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_SN_Mem, 16);
02522                 break;
02523         case FEDM_ID_MEM:
02524                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_ID_Mem, 16);
02525                 break;
02526         case FEDM_AC_MEM:                       
02527                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_AC_Mem, 16);
02528                 break;
02529         case FEDM_PUB_MEM:
02530                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_PubMem, m_iPubMemBlockSize);
02531                 break;
02532         case FEDM_SEC_MEM:                      
02533                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_SecMem, 4);
02534                 break;
02535         case FEDM_CONF_MEM:             
02536                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_ConfMem, 4);
02537                 break;
02538         case FEDM_DATE_MEM:
02539                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_DateMem, 16);
02540                 break;
02541         case FEDM_RFC_DATA_MASK_MEM:
02542                 iBack = FEDM_Base::SetData(ID, Data, Cnt, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
02543                 break;
02544         default:
02545                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
02546                 break;
02547         }
02548 
02549         if(iBack < 0)
02550         {
02551                 string str;
02552                 FEDM_ConvHexUCharToHexStr(Data, Cnt, str);
02553                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << str << ") - " << GetErrorText(iBack));
02554         }
02555         return iBack;
02556 }
02557 
02558 /***************************************************************************
02559   Begin         :       13.05.2000 / M. Hultsch
02560   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
02561 
02562   Function              :       write a value in specified memory
02563 
02564   Parameter             :       const char* ID          -       parameter identifier
02565                                         unsigned int Data       -       value
02566 
02567   Return Value  :       FEDM_OK (0) or error code (<0)
02568 ***************************************************************************/
02569 int FEDM_DataBase::SetData( const char* ID, unsigned int Data )
02570 {
02571         FEDM_CHK3(ID);
02572 
02573         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
02574         int iBack = 0;
02575         int iLastIndex = 0;
02576         int iBlockAdr = 0;
02577 
02578         // extract access parameters
02579         sscanf( ID, "%d %d %d %d %d %d %d",
02580                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
02581         
02582         switch( MemID )
02583         {
02584         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
02585                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
02586                 if(iBack == FEDM_MODIFIED)
02587                 {
02588                         // mark block as modified
02589                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02590                         iBlockAdr = BlockAdr;
02591                         iLastIndex = BytePos + ByteCnt;
02592                         while(iLastIndex > m_iRFC_DataBlockSize)
02593                         {
02594                                 iBlockAdr++;
02595                                 m_RFC_EEData[iBlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02596                                 iLastIndex -= m_iRFC_DataBlockSize;
02597                         }
02598                 }       
02599                 
02600                 if(iBack >= 0)
02601                 {
02602                         OptionalSetDataAction( ID, (__int64)Data );
02603                 }
02604                 break;
02605         
02606         case FEDM_RFC_RAMDATA_MEM:
02607                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
02608                 if(iBack == FEDM_MODIFIED)
02609                 {
02610                         // mark block as modified
02611                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02612                         iLastIndex = BytePos + ByteCnt;
02613                         while(iLastIndex > m_iRFC_DataBlockSize)
02614                         {
02615                                 BlockAdr++;
02616                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02617                                 iLastIndex -= m_iRFC_DataBlockSize;
02618                         }
02619                 }
02620                 
02621                 if(iBack >= 0)
02622                 {
02623                         OptionalSetDataAction( ID, (__int64)Data );
02624                 }
02625                 break;
02626         
02627         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
02628                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_EEData, 32);
02629                 if(iBack == FEDM_MODIFIED)
02630                 {
02631                         // mark block as modified
02632                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
02633                         iBlockAdr = BlockAdr;
02634                         iLastIndex = BytePos + ByteCnt;
02635                         while(iLastIndex > 32)
02636                         {
02637                                 iBlockAdr++;
02638                                 m_ACC_EEData[iBlockAdr * 32 + 31] |= 0x02;
02639                                 iLastIndex -= 32;
02640                         }
02641                 }
02642                 
02643                 if(iBack >= 0)
02644                 {
02645                         OptionalSetDataAction( ID, (__int64)Data );
02646                 }
02647                 break;
02648         
02649         case FEDM_ACC_RAMDATA_MEM:
02650                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_RAMData, 32);
02651                 if(iBack == FEDM_MODIFIED)
02652                 {
02653                         // mark block as modified
02654                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02655                         iLastIndex = BytePos + ByteCnt;
02656                         while(iLastIndex > 32)
02657                         {
02658                                 BlockAdr++;
02659                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02660                                 iLastIndex -= 32;
02661                         }
02662                 }
02663                 
02664                 if(iBack >= 0)
02665                 {
02666                         OptionalSetDataAction( ID, (__int64)Data );
02667                 }
02668                 break;
02669 
02670         case FEDM_TMPDATA_MEM:
02671                 iBack = FEDM_Base::SetData(ID, Data, m_TmpData, 32);
02672                 break;
02673         case FEDM_MJPDATA_MEM:
02674                 iBack = FEDM_Base::SetData(ID, Data, m_MjpData, 16);
02675                 break;
02676         case FEDM_SN_MEM:
02677                 iBack = FEDM_Base::SetData(ID, Data, m_SN_Mem, 16);
02678                 break;
02679         case FEDM_ID_MEM:
02680                 iBack = FEDM_Base::SetData(ID, Data, m_ID_Mem, 16);
02681                 break;
02682         case FEDM_AC_MEM:                       
02683                 iBack = FEDM_Base::SetData(ID, Data, m_AC_Mem, 16);
02684                 break;
02685         case FEDM_PUB_MEM:                      
02686                 iBack = FEDM_Base::SetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
02687                 break;
02688         case FEDM_SEC_MEM:                      
02689                 iBack = FEDM_Base::SetData(ID, Data, m_SecMem, 4);
02690                 break;
02691         case FEDM_CONF_MEM:             
02692                 iBack = FEDM_Base::SetData(ID, Data, m_ConfMem, 4);
02693                 break;
02694         case FEDM_DATE_MEM:
02695                 iBack = FEDM_Base::SetData(ID, Data, m_DateMem, 16);
02696                 break;
02697         case FEDM_RFC_DATA_MASK_MEM:
02698                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
02699                 break;
02700         default:
02701                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
02702                 break;
02703         }
02704 
02705         if(iBack < 0)
02706         {
02707                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << Data << ") - " << GetErrorText(iBack));
02708         }
02709         return iBack;
02710 }
02711 
02712 /***************************************************************************
02713   Begin         :       13.05.2000 / M. Hultsch
02714   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
02715 
02716   Function              :       write a value in specified memory
02717 
02718   Parameter             :       const char* ID  -       parameter identifier
02719                                         __int64 Data    -       value
02720 
02721   Return Value  :       FEDM_OK (0) or error code (<0)
02722 ***************************************************************************/
02723 int FEDM_DataBase::SetData( const char* ID, __int64 Data )
02724 {
02725         FEDM_CHK3(ID);
02726 
02727         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
02728         int iBack = 0;
02729         int iLastIndex = 0;
02730         int iBlockAdr = 0;
02731 
02732         // extract access parameters
02733         sscanf( ID, "%d %d %d %d %d %d %d",
02734                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
02735                 
02736         switch( MemID )
02737         {
02738         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
02739                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
02740                 if(iBack == FEDM_MODIFIED)
02741                 {
02742                         // mark block as modified
02743                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02744                         iBlockAdr = BlockAdr;
02745                         iLastIndex = BytePos + ByteCnt;
02746                         while(iLastIndex > m_iRFC_DataBlockSize)
02747                         {
02748                                 iBlockAdr++;
02749                                 m_RFC_EEData[iBlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02750                                 iLastIndex -= m_iRFC_DataBlockSize;
02751                         }
02752                 }
02753                 
02754                 if(iBack >= 0)
02755                 {
02756                         OptionalSetDataAction( ID, (__int64)Data );
02757                 }
02758                 break;
02759         
02760         case FEDM_RFC_RAMDATA_MEM:
02761                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
02762                 if(iBack == FEDM_MODIFIED)
02763                 {
02764                         // mark block as modified
02765                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02766                         iLastIndex = BytePos + ByteCnt;
02767                         while(iLastIndex > m_iRFC_DataBlockSize)
02768                         {
02769                                 BlockAdr++;
02770                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02771                                 iLastIndex -= m_iRFC_DataBlockSize;
02772                         }
02773                 }
02774                 
02775                 if(iBack >= 0)
02776                 {
02777                         OptionalSetDataAction( ID, (__int64)Data );
02778                 }
02779                 break;
02780         
02781         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
02782                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_EEData, 32);
02783                 if(iBack == FEDM_MODIFIED)
02784                 {
02785                         // mark block as modified
02786                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
02787                         iBlockAdr = BlockAdr;
02788                         iLastIndex = BytePos + ByteCnt;
02789                         while(iLastIndex > 32)
02790                         {
02791                                 iBlockAdr++;
02792                                 m_ACC_EEData[iBlockAdr * 32 + 31] |= 0x02;
02793                                 iLastIndex -= 32;
02794                         }
02795                 }
02796                 
02797                 if(iBack >= 0)
02798                 {
02799                         OptionalSetDataAction( ID, (__int64)Data );
02800                 }
02801                 break;
02802         
02803         case FEDM_ACC_RAMDATA_MEM:
02804                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_RAMData, 32);
02805                 if(iBack == FEDM_MODIFIED)
02806                 {
02807                         // mark block as modified
02808                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02809                         iLastIndex = BytePos + ByteCnt;
02810                         while(iLastIndex > 32)
02811                         {
02812                                 BlockAdr++;
02813                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02814                                 iLastIndex -= 32;
02815                         }
02816                 }
02817                 
02818                 if(iBack >= 0)
02819                 {
02820                         OptionalSetDataAction( ID, (__int64)Data );
02821                 }
02822                 break;
02823 
02824         case FEDM_TMPDATA_MEM:
02825                 iBack = FEDM_Base::SetData(ID, Data, m_TmpData, 32);
02826                 break;
02827         case FEDM_MJPDATA_MEM:
02828                 iBack = FEDM_Base::SetData(ID, Data, m_MjpData, 16);
02829                 break;
02830         case FEDM_SN_MEM:
02831                 iBack = FEDM_Base::SetData(ID, Data, m_SN_Mem, 16);
02832                 break;
02833         case FEDM_ID_MEM:
02834                 iBack = FEDM_Base::SetData(ID, Data, m_ID_Mem, 16);
02835                 break;
02836         case FEDM_AC_MEM:                       
02837                 iBack = FEDM_Base::SetData(ID, Data, m_AC_Mem, 16);
02838                 break;
02839         case FEDM_PUB_MEM:                      
02840                 iBack = FEDM_Base::SetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
02841                 break;
02842         case FEDM_SEC_MEM:                      
02843                 iBack = FEDM_Base::SetData(ID, Data, m_SecMem, 4);
02844                 break;
02845         case FEDM_CONF_MEM:             
02846                 iBack = FEDM_Base::SetData(ID, Data, m_ConfMem, 4);
02847                 break;
02848         case FEDM_DATE_MEM:
02849                 iBack = FEDM_Base::SetData(ID, Data, m_DateMem, 16);
02850                 break;
02851         case FEDM_RFC_DATA_MASK_MEM:
02852                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
02853                 break;
02854         default:
02855                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
02856                 break;
02857         }
02858 
02859         if(iBack < 0)
02860         {
02861                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << Data << ") - " << GetErrorText(iBack));
02862         }
02863         return iBack;
02864 }
02865 
02866 /***************************************************************************
02867   Begin         :       13.05.2000 / M. Hultsch
02868   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
02869 
02870   Function              :       write a value in specified memory
02871 
02872   Parameter             :       const char* ID  -       parameter identifier
02873                                         CString Data    -       value
02874 
02875   Return Value  :       FEDM_OK (0) or error code (<0)
02876 ***************************************************************************/
02877 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
02878 int FEDM_DataBase::SetData( const char* ID, CString Data )
02879 {
02880         FEDM_CHK3(ID);
02881 
02882         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
02883         int iBack = 0;
02884         int iLastIndex = 0;
02885         int iBlockAdr = 0;
02886 
02887         // extract access parameters
02888         sscanf( ID, "%d %d %d %d %d %d %d",
02889                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
02890         
02891         switch( MemID )
02892         {
02893         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
02894                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
02895                 if(iBack == FEDM_MODIFIED)
02896                 {
02897                         // mark block as modified
02898                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02899                         iBlockAdr = BlockAdr;
02900                         iLastIndex = BytePos + ByteCnt;
02901                         while(iLastIndex > m_iRFC_DataBlockSize)
02902                         {
02903                                 iBlockAdr++;
02904                                 m_RFC_EEData[iBlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02905                                 iLastIndex -= m_iRFC_DataBlockSize;
02906                         }
02907                 }
02908                 
02909                 if(iBack >= 0)
02910                 {
02911                         OptionalSetDataAction( ID, Data );
02912                 }
02913                 break;
02914 
02915         case FEDM_RFC_RAMDATA_MEM:
02916                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
02917                 if(iBack == FEDM_MODIFIED)
02918                 {
02919                         // mark block as modified
02920                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02921                         iLastIndex = BytePos + ByteCnt;
02922                         while(iLastIndex > m_iRFC_DataBlockSize)
02923                         {
02924                                 BlockAdr++;
02925                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
02926                                 iLastIndex -= m_iRFC_DataBlockSize;
02927                         }
02928                 }
02929                 
02930                 if(iBack >= 0)
02931                 {
02932                         OptionalSetDataAction( ID, Data );
02933                 }
02934                 break;
02935 
02936         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
02937                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_EEData, 32);
02938                 if(iBack == FEDM_MODIFIED)
02939                 {
02940                         // mark block as modified
02941                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
02942                         iBlockAdr = BlockAdr;
02943                         iLastIndex = BytePos + ByteCnt;
02944                         while(iLastIndex > 32)
02945                         {
02946                                 iBlockAdr++;
02947                                 m_ACC_EEData[iBlockAdr * 32 + 31] |= 0x02;
02948                                 iLastIndex -= 32;
02949                         }
02950                 }
02951                 
02952                 if(iBack >= 0)
02953                 {
02954                         OptionalSetDataAction( ID, Data );
02955                 }
02956                 break;
02957 
02958         case FEDM_ACC_RAMDATA_MEM:
02959                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_RAMData, 32);
02960                 if(iBack == FEDM_MODIFIED)
02961                 {
02962                         // mark block as modified
02963                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02964                         iLastIndex = BytePos + ByteCnt;
02965                         while(iLastIndex > 32)
02966                         {
02967                                 BlockAdr++;
02968                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
02969                                 iLastIndex -= 32;
02970                         }
02971                 }
02972                 
02973                 if(iBack >= 0)
02974                 {
02975                         OptionalSetDataAction( ID, Data );
02976                 }
02977                 break;
02978         
02979         case FEDM_TMPDATA_MEM:
02980                 iBack = FEDM_Base::SetData(ID, Data, m_TmpData, 32);
02981                 break;
02982         case FEDM_MJPDATA_MEM:
02983                 iBack = FEDM_Base::SetData(ID, Data, m_MjpData, 16);
02984                 break;
02985         case FEDM_SN_MEM:
02986                 iBack = FEDM_Base::SetData(ID, Data, m_SN_Mem, 16);
02987                 break;
02988         case FEDM_ID_MEM:
02989                 iBack = FEDM_Base::SetData(ID, Data, m_ID_Mem, 16);
02990                 break;
02991         case FEDM_AC_MEM:                       
02992                 iBack = FEDM_Base::SetData(ID, Data, m_AC_Mem, 16);
02993                 break;
02994         case FEDM_PUB_MEM:                      
02995                 iBack = FEDM_Base::SetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
02996                 break;
02997         case FEDM_SEC_MEM:                      
02998                 iBack = FEDM_Base::SetData(ID, Data, m_SecMem, 4);
02999                 break;
03000         case FEDM_CONF_MEM:             
03001                 iBack = FEDM_Base::SetData(ID, Data, m_ConfMem, 4);
03002                 break;
03003         case FEDM_DATE_MEM:
03004                 iBack = FEDM_Base::SetData(ID, Data, m_DateMem, 16);
03005                 break;
03006         case FEDM_RFC_DATA_MASK_MEM:
03007                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
03008                 break;
03009         default:
03010                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
03011                 break;
03012         }
03013 
03014         if(iBack < 0)
03015         {
03016 #if !defined(_WIN32_WCE)
03017                 string str = Data;
03018                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << str << ") - " << GetErrorText(iBack));
03019 #endif
03020         }
03021         return iBack;
03022 }
03023 #endif
03024 
03025 /***************************************************************************
03026   Begin         :       03.07.2000 / M. Hultsch
03027   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
03028 
03029   Function              :       write a value in specified memory
03030 
03031   Parameter             :       const char* ID  -       parameter identifier
03032                                         string Data             -       value
03033 
03034   Return Value  :       FEDM_OK (0) or error code (<0)
03035 ***************************************************************************/
03036 int FEDM_DataBase::SetData( const char* ID, string Data )
03037 {
03038         FEDM_CHK3(ID);
03039 
03040         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
03041         int iBack = 0;
03042         int iLastIndex = 0;
03043         int iBlockAdr = 0;
03044 
03045         // extract access parameters
03046         sscanf( ID, "%d %d %d %d %d %d %d",
03047                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
03048         
03049         switch( MemID )
03050         {
03051         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
03052                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_EEData, m_iRFC_DataBlockSize);
03053                 if(iBack == FEDM_MODIFIED)
03054                 {
03055                         // mark block as modified
03056                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03057                         iBlockAdr = BlockAdr;
03058                         iLastIndex = BytePos + ByteCnt;
03059                         while(iLastIndex > m_iRFC_DataBlockSize)
03060                         {
03061                                 iBlockAdr++;
03062                                 m_RFC_EEData[iBlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03063                                 iLastIndex -= m_iRFC_DataBlockSize;
03064                         }
03065                 }
03066                 
03067                 if(iBack >= 0)
03068                 {
03069                         OptionalSetDataAction( ID, Data );
03070                 }
03071                 break;
03072 
03073         case FEDM_RFC_RAMDATA_MEM:              
03074                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_RAMData, m_iRFC_DataBlockSize);
03075                 if(iBack == FEDM_MODIFIED)
03076                 {
03077                         // mark block as modified
03078                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03079                         iLastIndex = BytePos + ByteCnt;
03080                         while(iLastIndex > m_iRFC_DataBlockSize)
03081                         {
03082                                 BlockAdr++;
03083                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03084                                 iLastIndex -= m_iRFC_DataBlockSize;
03085                         }
03086                 }
03087                 
03088                 if(iBack >= 0)
03089                 {
03090                         OptionalSetDataAction( ID, Data );
03091                 }
03092                 break;
03093         
03094         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
03095                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_EEData, 32);
03096                 if(iBack == FEDM_MODIFIED)
03097                 {
03098                         // mark block as modified
03099                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03100                         iBlockAdr = BlockAdr;
03101                         iLastIndex = BytePos + ByteCnt;
03102                         while(iLastIndex > 32)
03103                         {
03104                                 iBlockAdr++;
03105                                 m_ACC_EEData[iBlockAdr * 32 + 31] |= 0x02;
03106                                 iLastIndex -= 32;
03107                         }
03108                 }
03109                 
03110                 if(iBack >= 0)
03111                 {
03112                         OptionalSetDataAction( ID, Data );
03113                 }
03114                 break;
03115         
03116         case FEDM_ACC_RAMDATA_MEM:
03117                 iBack = FEDM_Base::SetData(ID, Data, m_ACC_RAMData, 32);
03118                 if(iBack == FEDM_MODIFIED)
03119                 {
03120                         // mark block as modified
03121                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03122                         iLastIndex = BytePos + ByteCnt;
03123                         while(iLastIndex > 32)
03124                         {
03125                                 BlockAdr++;
03126                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03127                                 iLastIndex -= 32;
03128                         }
03129                 }
03130                 
03131                 if(iBack >= 0)
03132                 {
03133                         OptionalSetDataAction( ID, Data );
03134                 }
03135                 break;
03136         
03137         case FEDM_TMPDATA_MEM:
03138                 iBack = FEDM_Base::SetData(ID, Data, m_TmpData, 32);
03139                 break;
03140         case FEDM_MJPDATA_MEM:
03141                 iBack = FEDM_Base::SetData(ID, Data, m_MjpData, 16);
03142                 break;
03143         case FEDM_SN_MEM:
03144                 iBack = FEDM_Base::SetData(ID, Data, m_SN_Mem, 16);
03145                 break;
03146         case FEDM_ID_MEM:
03147                 iBack = FEDM_Base::SetData(ID, Data, m_ID_Mem, 16);
03148                 break;
03149         case FEDM_AC_MEM:                       
03150                 iBack = FEDM_Base::SetData(ID, Data, m_AC_Mem, 16);
03151                 break;
03152         case FEDM_PUB_MEM:                      
03153                 iBack = FEDM_Base::SetData(ID, Data, m_PubMem, m_iPubMemBlockSize);
03154                 break;
03155         case FEDM_SEC_MEM:                      
03156                 iBack = FEDM_Base::SetData(ID, Data, m_SecMem, 4);
03157                 break;
03158         case FEDM_CONF_MEM:             
03159                 iBack = FEDM_Base::SetData(ID, Data, m_ConfMem, 4);
03160                 break;
03161         case FEDM_DATE_MEM:
03162                 iBack = FEDM_Base::SetData(ID, Data, m_DateMem, 16);
03163                 break;
03164         case FEDM_RFC_DATA_MASK_MEM:
03165                 iBack = FEDM_Base::SetData(ID, Data, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
03166                 break;
03167         default:
03168                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
03169                 break;
03170         }
03171 
03172         if(iBack < 0)
03173         {
03174                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << Data << ") - " << GetErrorText(iBack));
03175         }
03176         return iBack;
03177 }
03178 
03179 /***************************************************************************
03180   Begin         :       13.05.2000 / M. Hultsch
03181   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
03182 
03183   Function              :       write a value in specified memory
03184 
03185   Parameter             :       const char* ID  -       parameter identifier
03186                                         char* Data              -       pointer to value
03187                                         int DataLen             -       length of Data
03188 
03189   Return Value  :       FEDM_OK (0) or error code (<0)
03190 ***************************************************************************/
03191 int FEDM_DataBase::SetData( const char* ID, char* Data, int DataLen )
03192 {
03193         FEDM_CHK3(ID);
03194         FEDM_CHK3(Data);
03195 
03196         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
03197         int iBack = 0;
03198         int iLastIndex = 0;
03199         int iBlockAdr = 0;
03200 
03201         // extract access parameters
03202         sscanf( ID, "%d %d %d %d %d %d %d",
03203                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
03204         
03205         switch( MemID )
03206         {
03207         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
03208                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_RFC_EEData, m_iRFC_DataBlockSize);
03209                 if(iBack == FEDM_MODIFIED)
03210                 {
03211                         // mark block as modified
03212                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03213                         iBlockAdr = BlockAdr;
03214                         iLastIndex = BytePos + ByteCnt;
03215                         while(iLastIndex > m_iRFC_DataBlockSize)
03216                         {
03217                                 iBlockAdr++;
03218                                 m_RFC_EEData[iBlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03219                                 iLastIndex -= m_iRFC_DataBlockSize;
03220                         }
03221                 }
03222 
03223                 break;
03224         
03225         case FEDM_RFC_RAMDATA_MEM:              
03226                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_RFC_RAMData, m_iRFC_DataBlockSize);
03227                 if(iBack == FEDM_MODIFIED)
03228                 {
03229                         // mark block as modified
03230                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03231                         iLastIndex = BytePos + ByteCnt;
03232                         while(iLastIndex > m_iRFC_DataBlockSize)
03233                         {
03234                                 BlockAdr++;
03235                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03236                                 iLastIndex -= m_iRFC_DataBlockSize;
03237                         }
03238                 }
03239 
03240                 break;
03241 
03242         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
03243                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_ACC_EEData, 32);
03244                 if(iBack == FEDM_MODIFIED)
03245                 {
03246                         // mark block as modified
03247                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03248                         iBlockAdr = BlockAdr;
03249                         iLastIndex = BytePos + ByteCnt;
03250                         while(iLastIndex > 32)
03251                         {
03252                                 iBlockAdr++;
03253                                 m_ACC_EEData[iBlockAdr * 32 + 31] |= 0x02;
03254                                 iLastIndex -= 32;
03255                         }
03256                 }
03257 
03258                 break;
03259 
03260         case FEDM_ACC_RAMDATA_MEM:
03261                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_ACC_RAMData, 32);
03262                 if(iBack == FEDM_MODIFIED)
03263                 {
03264                         // mark block as modified
03265                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03266                         iLastIndex = BytePos + ByteCnt;
03267                         while(iLastIndex > 32)
03268                         {
03269                                 BlockAdr++;
03270                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03271                                 iLastIndex -= 32;
03272                         }
03273                 }
03274 
03275                 break;
03276 
03277         case FEDM_TMPDATA_MEM:
03278                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_TmpData, 32);
03279                 break;
03280         case FEDM_MJPDATA_MEM:
03281                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_MjpData, 16);
03282                 break;
03283         case FEDM_SN_MEM:
03284                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_SN_Mem, 16);
03285                 break;
03286         case FEDM_ID_MEM:
03287                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_ID_Mem, 16);
03288                 break;
03289         case FEDM_AC_MEM:                       
03290                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_AC_Mem, 16);
03291                 break;
03292         case FEDM_PUB_MEM:                      
03293                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_PubMem, m_iPubMemBlockSize);
03294                 break;
03295         case FEDM_SEC_MEM:                      
03296                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_SecMem, 4);
03297                 break;
03298         case FEDM_CONF_MEM:             
03299                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_ConfMem, 4);
03300                 break;
03301         case FEDM_DATE_MEM:
03302                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_DateMem, 16);
03303                 break;
03304         case FEDM_RFC_DATA_MASK_MEM:
03305                 iBack = FEDM_Base::SetData(ID, Data, DataLen, m_RFC_CfgProfileMask, m_iRFC_DataBlockSize);
03306                 break;
03307         default:
03308                 iBack = FEDM_ERROR_UNKNOWN_MEM_ID;
03309                 break;
03310         }
03311 
03312         if(iBack < 0)
03313         {
03314                 Data[DataLen] = 0;
03315                 FEDM_TRACE(m_pLogger, FELOGMNG_DBG_ERROR, __FUNCTION__ << "(ID=" << ID << ", Data=" << Data << ") - " << GetErrorText(iBack));
03316         }
03317         return iBack;
03318 }
03319 
03320 
03321 
03322 //#####################################################################################
03323 // functions for direct access with address
03324 //#####################################################################################
03325 
03326 /***************************************************************************
03327   Begin         :       19.06.2000 / M. Hultsch
03328   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
03329 
03330   Function              :       read a value from specified memory
03331 
03332   Parameter             :       int Adr         -       address
03333                                         bool* Data      -       pointer to value
03334                                         int MemID       -       memory identifier
03335 
03336   Return Value  :       FEDM_OK (0) or error code (<0)
03337 ***************************************************************************/
03338 int FEDM_DataBase::GetData( int Adr, unsigned char* Data, int MemID )
03339 {
03340         FEDM_CHK3(Data);
03341 
03342         switch( MemID )
03343         {
03344         case FEDM_RFC_EEDATA_MEM:               
03345                 return FEDM_Base::GetData(Adr, Data, m_RFC_EEData);
03346         case FEDM_RFC_RAMDATA_MEM:              
03347                 return FEDM_Base::GetData(Adr, Data, m_RFC_RAMData);
03348         case FEDM_ACC_EEDATA_MEM:
03349                 return FEDM_Base::GetData(Adr, Data, m_ACC_EEData);
03350         case FEDM_ACC_RAMDATA_MEM:
03351                 return FEDM_Base::GetData(Adr, Data, m_ACC_RAMData);
03352         case FEDM_TMPDATA_MEM:
03353                 return FEDM_Base::GetData(Adr, Data, m_TmpData);
03354         case FEDM_MJPDATA_MEM:
03355                 return FEDM_Base::GetData(Adr, Data, m_MjpData);
03356         case FEDM_SN_MEM:
03357                 return FEDM_Base::GetData(Adr, Data, m_SN_Mem);
03358         case FEDM_ID_MEM:
03359                 return FEDM_Base::GetData(Adr, Data, m_ID_Mem);
03360         case FEDM_AC_MEM:                       
03361                 return FEDM_Base::GetData(Adr, Data, m_AC_Mem);
03362         case FEDM_PUB_MEM:                      
03363                 return FEDM_Base::GetData(Adr, Data, m_PubMem);
03364         case FEDM_SEC_MEM:                      
03365                 return FEDM_Base::GetData(Adr, Data, m_SecMem);
03366         case FEDM_CONF_MEM:             
03367                 return FEDM_Base::GetData(Adr, Data, m_ConfMem);
03368         case FEDM_DATE_MEM:
03369                 return FEDM_Base::GetData(Adr, Data, m_DateMem);
03370         case FEDM_RFC_DATA_MASK_MEM:
03371                 return FEDM_Base::GetData(Adr, Data, m_RFC_CfgProfileMask);
03372         default:
03373                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03374         }
03375 
03376         return FEDM_OK;
03377 }
03378 
03379 /***************************************************************************
03380   Begin         :       19.06.2000 / M. Hultsch
03381   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
03382 
03383   Function              :       read a value from specified memory
03384 
03385   Parameter             :       int Adr                         -       address
03386                                         unsigned char* Data     -       pointer to value
03387                                         int Cnt                         -       length of Data
03388                                         int MemID                       -       memory identifier
03389 
03390   Return Value  :       FEDM_OK (0) or error code (<0)
03391 ***************************************************************************/
03392 int FEDM_DataBase::GetData( int Adr, unsigned char* Data, int Cnt, int MemID )
03393 {
03394         FEDM_CHK3(Data);
03395 
03396         switch( MemID )
03397         {
03398         case FEDM_RFC_EEDATA_MEM:               
03399                 return FEDM_Base::GetData(Adr, Data, Cnt, m_RFC_EEData);
03400         case FEDM_RFC_RAMDATA_MEM:              
03401                 return FEDM_Base::GetData(Adr, Data, Cnt, m_RFC_RAMData);
03402         case FEDM_ACC_EEDATA_MEM:
03403                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ACC_EEData);
03404         case FEDM_ACC_RAMDATA_MEM:
03405                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ACC_RAMData);
03406         case FEDM_TMPDATA_MEM:
03407                 return FEDM_Base::GetData(Adr, Data, Cnt, m_TmpData);
03408         case FEDM_MJPDATA_MEM:
03409                 return FEDM_Base::GetData(Adr, Data, Cnt, m_MjpData);
03410         case FEDM_SN_MEM:
03411                 return FEDM_Base::GetData(Adr, Data, Cnt, m_SN_Mem);
03412         case FEDM_ID_MEM:
03413                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ID_Mem);
03414         case FEDM_AC_MEM:                       
03415                 return FEDM_Base::GetData(Adr, Data, Cnt, m_AC_Mem);
03416         case FEDM_PUB_MEM:                      
03417                 return FEDM_Base::GetData(Adr, Data, Cnt, m_PubMem);
03418         case FEDM_SEC_MEM:                      
03419                 return FEDM_Base::GetData(Adr, Data, Cnt, m_SecMem);
03420         case FEDM_CONF_MEM:
03421                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ConfMem);
03422         case FEDM_DATE_MEM:
03423                 return FEDM_Base::GetData(Adr, Data, Cnt, m_DateMem);
03424         case FEDM_RFC_DATA_MASK_MEM:
03425                 return FEDM_Base::GetData(Adr, Data, Cnt, m_RFC_CfgProfileMask);
03426         default:
03427                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03428         }
03429 
03430         return FEDM_OK;
03431 }
03432 
03433 
03434 /***************************************************************************
03435   Begin         :       19.06.2000 / M. Hultsch
03436   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
03437 
03438   Function              :       read a value from specified memory
03439 
03440   Parameter             :       int Adr                         -       address
03441                                         unsigned int* Data      -       pointer to value
03442                                         int MemID                       -       memory identifier
03443 
03444   Return Value  :       FEDM_OK (0) or error code (<0)
03445 ***************************************************************************/
03446 int FEDM_DataBase::GetData( int Adr, unsigned int* Data, int MemID )
03447 {
03448         FEDM_CHK3(Data);
03449 
03450         switch( MemID )
03451         {
03452         case FEDM_RFC_EEDATA_MEM:               
03453                 return FEDM_Base::GetData(Adr, Data, m_RFC_EEData);
03454         case FEDM_RFC_RAMDATA_MEM:              
03455                 return FEDM_Base::GetData(Adr, Data, m_RFC_RAMData);
03456         case FEDM_ACC_EEDATA_MEM:
03457                 return FEDM_Base::GetData(Adr, Data, m_ACC_EEData);
03458         case FEDM_ACC_RAMDATA_MEM:
03459                 return FEDM_Base::GetData(Adr, Data, m_ACC_RAMData);
03460         case FEDM_TMPDATA_MEM:
03461                 return FEDM_Base::GetData(Adr, Data, m_TmpData);
03462         case FEDM_MJPDATA_MEM:
03463                 return FEDM_Base::GetData(Adr, Data, m_MjpData);
03464         case FEDM_SN_MEM:
03465                 return FEDM_Base::GetData(Adr, Data, m_SN_Mem);
03466         case FEDM_ID_MEM:
03467                 return FEDM_Base::GetData(Adr, Data, m_ID_Mem);
03468         case FEDM_AC_MEM:                       
03469                 return FEDM_Base::GetData(Adr, Data, m_AC_Mem);
03470         case FEDM_PUB_MEM:                      
03471                 return FEDM_Base::GetData(Adr, Data, m_PubMem);
03472         case FEDM_SEC_MEM:                      
03473                 return FEDM_Base::GetData(Adr, Data, m_SecMem);
03474         case FEDM_CONF_MEM:             
03475                 return FEDM_Base::GetData(Adr, Data, m_ConfMem);
03476         case FEDM_DATE_MEM:
03477                 return FEDM_Base::GetData(Adr, Data, m_DateMem);
03478         case FEDM_RFC_DATA_MASK_MEM:
03479                 return FEDM_Base::GetData(Adr, Data, m_RFC_CfgProfileMask);
03480         default:
03481                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03482         }
03483 
03484         return FEDM_OK;
03485 }
03486 
03487 /***************************************************************************
03488   Begin         :       19.06.2000 / M. Hultsch
03489   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
03490 
03491   Function              :       read a value from specified memory
03492 
03493   Parameter             :       int Adr                 -       address
03494                                         __int64* Data   -       pointer to value
03495                                         int MemID               -       memory identifier
03496 
03497   Return Value  :       FEDM_OK (0) or error code (<0)
03498 ***************************************************************************/
03499 int FEDM_DataBase::GetData( int Adr, __int64* Data, int MemID )
03500 {
03501         FEDM_CHK3(Data);
03502 
03503         switch( MemID )
03504         {
03505         case FEDM_RFC_EEDATA_MEM:               
03506                 return FEDM_Base::GetData(Adr, Data, m_RFC_EEData);
03507         case FEDM_RFC_RAMDATA_MEM:              
03508                 return FEDM_Base::GetData(Adr, Data, m_RFC_RAMData);
03509         case FEDM_ACC_EEDATA_MEM:
03510                 return FEDM_Base::GetData(Adr, Data, m_ACC_EEData);
03511         case FEDM_ACC_RAMDATA_MEM:
03512                 return FEDM_Base::GetData(Adr, Data, m_ACC_RAMData);
03513         case FEDM_TMPDATA_MEM:
03514                 return FEDM_Base::GetData(Adr, Data, m_TmpData);
03515         case FEDM_MJPDATA_MEM:
03516                 return FEDM_Base::GetData(Adr, Data, m_MjpData);
03517         case FEDM_SN_MEM:
03518                 return FEDM_Base::GetData(Adr, Data, m_SN_Mem);
03519         case FEDM_ID_MEM:
03520                 return FEDM_Base::GetData(Adr, Data, m_ID_Mem);
03521         case FEDM_AC_MEM:                       
03522                 return FEDM_Base::GetData(Adr, Data, m_AC_Mem);
03523         case FEDM_PUB_MEM:                      
03524                 return FEDM_Base::GetData(Adr, Data, m_PubMem);
03525         case FEDM_SEC_MEM:                      
03526                 return FEDM_Base::GetData(Adr, Data, m_SecMem);
03527         case FEDM_CONF_MEM:             
03528                 return FEDM_Base::GetData(Adr, Data, m_ConfMem);
03529         case FEDM_DATE_MEM:
03530                 return FEDM_Base::GetData(Adr, Data, m_DateMem);
03531         case FEDM_RFC_DATA_MASK_MEM:
03532                 return FEDM_Base::GetData(Adr, Data, m_RFC_CfgProfileMask);
03533         default:
03534                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03535         }
03536 
03537         return FEDM_OK;
03538 }
03539 
03540 /***************************************************************************
03541   Begin         :       19.06.2000 / M. Hultsch
03542   Version       :       03.00.00 / 02.04.2008 / M. Hultsch
03543 
03544   Function              :       read a value from specified memory
03545 
03546   Parameter             :       int Adr                 -       address
03547                                         CString& Data   -       reference of value
03548                                         int Cnt                 -       length of Data
03549                                         int MemID               -       memory identifier
03550 
03551   Return Value  :       FEDM_OK (0) or error code (<0)
03552 ***************************************************************************/
03553 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
03554 int FEDM_DataBase::GetData( int Adr, CString& Data, int Cnt, int MemID )
03555 {
03556         FEDM_CHK3(&Data);
03557 
03558         switch( MemID )
03559         {
03560         case FEDM_RFC_EEDATA_MEM:               
03561                 return FEDM_Base::GetData(Adr, Data, Cnt, m_RFC_EEData);
03562         case FEDM_RFC_RAMDATA_MEM:              
03563                 return FEDM_Base::GetData(Adr, Data, Cnt, m_RFC_RAMData);
03564         case FEDM_ACC_EEDATA_MEM:
03565                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ACC_EEData);
03566         case FEDM_ACC_RAMDATA_MEM:
03567                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ACC_RAMData);
03568         case FEDM_TMPDATA_MEM:
03569                 return FEDM_Base::GetData(Adr, Data, Cnt, m_TmpData);
03570         case FEDM_MJPDATA_MEM:
03571                 return FEDM_Base::GetData(Adr, Data, Cnt, m_MjpData);
03572         case FEDM_SN_MEM:
03573                 return FEDM_Base::GetData(Adr, Data, Cnt, m_SN_Mem);
03574         case FEDM_ID_MEM:
03575                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ID_Mem);
03576         case FEDM_AC_MEM:                       
03577                 return FEDM_Base::GetData(Adr, Data, Cnt, m_AC_Mem);
03578         case FEDM_PUB_MEM:                      
03579                 return FEDM_Base::GetData(Adr, Data, Cnt, m_PubMem);
03580         case FEDM_SEC_MEM:                      
03581                 return FEDM_Base::GetData(Adr, Data, Cnt, m_SecMem);
03582         case FEDM_CONF_MEM:             
03583                 return FEDM_Base::GetData(Adr, Data, Cnt, m_ConfMem);
03584         case FEDM_DATE_MEM:
03585                 return FEDM_Base::GetData(Adr, Data, Cnt, m_DateMem);
03586         case FEDM_RFC_DATA_MASK_MEM:
03587                 return FEDM_Base::GetData(Adr, Data, Cnt, m_RFC_CfgProfileMask);
03588         default:
03589                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03590         }
03591 
03592         return FEDM_OK;
03593 }
03594 #endif
03595 
03596 /***************************************************************************
03597   Begin         :       13.06.2000 / M. Hultsch
03598   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
03599 
03600   Function              :       write a value in specified memory
03601 
03602   Parameter             :       int Adr                         -       address
03603                                         unsigned char Data      -       value
03604                                         int MemID                       -       memory identifier
03605 
03606   Return Value  :       FEDM_OK (0) or error code (<0)
03607 ***************************************************************************/
03608 int FEDM_DataBase::SetData( int Adr, unsigned char Data, int MemID )
03609 {
03610         int iBack = 0;
03611         int BlockAdr = 0;
03612 
03613         switch( MemID )
03614         {
03615         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
03616                 iBack = FEDM_Base::SetData(Adr, Data, m_RFC_EEData);
03617                 if(iBack == FEDM_MODIFIED)
03618                 {
03619                         // mark block as modified
03620                         BlockAdr = Adr >> 4;
03621                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03622                 }
03623                 return iBack;
03624         
03625         case FEDM_RFC_RAMDATA_MEM:              
03626                 iBack = FEDM_Base::SetData(Adr, Data, m_RFC_RAMData);
03627                 if(iBack == FEDM_MODIFIED)
03628                 {
03629                         // mark block as modified
03630                         BlockAdr = Adr >> 4;
03631                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03632                 }
03633                 return iBack;
03634         
03635         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
03636                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_EEData);
03637                 if(iBack == FEDM_MODIFIED)
03638                 {
03639                         // mark block as modified
03640                         BlockAdr = Adr >> 5;
03641                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03642                 }
03643                 return iBack;
03644         
03645         case FEDM_ACC_RAMDATA_MEM:
03646                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_RAMData);
03647                 if(iBack == FEDM_MODIFIED)
03648                 {
03649                         // mark block as modified
03650                         BlockAdr = Adr >> 5;
03651                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03652                 }
03653                 return iBack;
03654         
03655         case FEDM_TMPDATA_MEM:
03656                 return FEDM_Base::SetData(Adr, Data, m_TmpData);
03657         case FEDM_MJPDATA_MEM:
03658                 return FEDM_Base::SetData(Adr, Data, m_MjpData);
03659         case FEDM_SN_MEM:
03660                 return FEDM_Base::SetData(Adr, Data, m_SN_Mem);
03661         case FEDM_ID_MEM:
03662                 return FEDM_Base::SetData(Adr, Data, m_ID_Mem);
03663         case FEDM_AC_MEM:                       
03664                 return FEDM_Base::SetData(Adr, Data, m_AC_Mem);
03665         case FEDM_PUB_MEM:                      
03666                 return FEDM_Base::SetData(Adr, Data, m_PubMem);
03667         case FEDM_SEC_MEM:                      
03668                 return FEDM_Base::SetData(Adr, Data, m_SecMem);
03669         case FEDM_CONF_MEM:             
03670                 return FEDM_Base::SetData(Adr, Data, m_ConfMem);
03671         case FEDM_DATE_MEM:
03672                 return FEDM_Base::SetData(Adr, Data, m_DateMem);
03673         case FEDM_RFC_DATA_MASK_MEM:
03674                 return FEDM_Base::SetData(Adr, Data, m_RFC_CfgProfileMask);
03675         default:
03676                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03677         }
03678 
03679         return FEDM_OK;
03680 }
03681 
03682 /***************************************************************************
03683   Begin         :       13.06.2000 / M. Hultsch
03684   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
03685 
03686   Function              :       write a value in specified memory
03687 
03688   Parameter             :       int Adr                         -       address
03689                                         unsigned char* Data     -       pointer of value
03690                                         int Cnt                         -       length of Data
03691                                         int MemID                       -       memory identifier
03692 
03693   Return Value  :       FEDM_OK (0) or error code (<0)
03694 ***************************************************************************/
03695 int FEDM_DataBase::SetData( int Adr, unsigned char* Data, int Cnt, int MemID )
03696 {
03697         FEDM_CHK3(Data);
03698 
03699         int iBack = 0;
03700         int BlockAdr = 0;
03701         int iCnt = Cnt;
03702 
03703         switch( MemID )
03704         {
03705         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
03706                 iBack = FEDM_Base::SetData(Adr, Data, Cnt, m_RFC_EEData);
03707                 if(iBack == FEDM_MODIFIED)
03708                 {
03709                         // mark block as modified
03710                         BlockAdr = Adr >> 4;
03711                         iCnt = Cnt;
03712                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03713                         while(iCnt > m_iRFC_DataBlockSize)
03714                         {
03715                                 BlockAdr++;
03716                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03717                                 iCnt -= m_iRFC_DataBlockSize;
03718                         }
03719                 }
03720                 return iBack;
03721         
03722         case FEDM_RFC_RAMDATA_MEM:
03723                 iBack = FEDM_Base::SetData(Adr, Data, Cnt, m_RFC_RAMData);
03724                 if(iBack == FEDM_MODIFIED)
03725                 {
03726                         // mark block as modified
03727                         BlockAdr = Adr >> 4;
03728                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03729                         while(Cnt > m_iRFC_DataBlockSize)
03730                         {
03731                                 BlockAdr++;
03732                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03733                                 Cnt -= m_iRFC_DataBlockSize;
03734                         }
03735                 }
03736                 return iBack;
03737         
03738         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
03739                 iBack = FEDM_Base::SetData(Adr, Data, Cnt, m_ACC_EEData);
03740                 if(iBack == FEDM_MODIFIED)
03741                 {
03742                         // mark block as modified
03743                         BlockAdr = Adr >> 5;
03744                         iCnt = Cnt;
03745                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03746                         while(Cnt > 32)
03747                         {
03748                                 BlockAdr++;
03749                                 m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03750                                 Cnt -= 32;
03751                         }
03752                 }
03753                 return iBack;
03754         
03755         case FEDM_ACC_RAMDATA_MEM:
03756                 iBack = FEDM_Base::SetData(Adr, Data, Cnt, m_ACC_RAMData);
03757                 if(iBack == FEDM_MODIFIED)
03758                 {
03759                         // mark block as modified
03760                         BlockAdr = Adr >> 5;
03761                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03762                         while(Cnt > 32)
03763                         {
03764                                 BlockAdr++;
03765                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03766                                 Cnt -= 32;
03767                         }
03768                 }
03769                 return iBack;
03770         
03771         case FEDM_TMPDATA_MEM:
03772                 return FEDM_Base::SetData(Adr, Data, Cnt, m_TmpData);
03773         case FEDM_MJPDATA_MEM:
03774                 return FEDM_Base::SetData(Adr, Data, Cnt, m_MjpData);
03775         case FEDM_SN_MEM:
03776                 return FEDM_Base::SetData(Adr, Data, Cnt, m_SN_Mem);
03777         case FEDM_ID_MEM:
03778                 return FEDM_Base::SetData(Adr, Data, Cnt, m_ID_Mem);
03779         case FEDM_AC_MEM:                       
03780                 return FEDM_Base::SetData(Adr, Data, Cnt, m_AC_Mem);
03781         case FEDM_PUB_MEM:                      
03782                 return FEDM_Base::SetData(Adr, Data, Cnt, m_PubMem);
03783         case FEDM_SEC_MEM:                      
03784                 return FEDM_Base::SetData(Adr, Data, Cnt, m_SecMem);
03785         case FEDM_CONF_MEM:             
03786                 return FEDM_Base::SetData(Adr, Data, Cnt, m_ConfMem);
03787         case FEDM_DATE_MEM:
03788                 return FEDM_Base::SetData(Adr, Data, Cnt, m_DateMem);
03789         case FEDM_RFC_DATA_MASK_MEM:
03790                 return FEDM_Base::SetData(Adr, Data, Cnt, m_RFC_CfgProfileMask);
03791         default:
03792                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03793         }
03794 
03795         return FEDM_OK;
03796 }
03797 
03798 /***************************************************************************
03799   Begin         :       13.06.2000 / M. Hultsch
03800   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
03801 
03802   Function              :       write a value in specified memory
03803 
03804   Parameter             :       int Adr                         -       address
03805                                         unsigned int Data       -       value
03806                                         int MemID                       -       memory identifier
03807 
03808   Return Value  :       FEDM_OK (0) or error code (<0)
03809 ***************************************************************************/
03810 int FEDM_DataBase::SetData( int Adr, unsigned int Data, int MemID )
03811 {
03812         int iBack = 0;
03813         int BlockAdr = 0;
03814 
03815         switch( MemID )
03816         {
03817         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
03818                 iBack = FEDM_Base::SetData(Adr, Data, m_RFC_EEData);
03819                 if(iBack == FEDM_MODIFIED)
03820                 {
03821                         // mark block as modified
03822                         BlockAdr = Adr >> 4;
03823                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03824                         if( BlockAdr < ((Adr + 4) >> 4))
03825                         {
03826                                 BlockAdr++;
03827                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03828                         }
03829                 }
03830                 return iBack;
03831 
03832         case FEDM_RFC_RAMDATA_MEM:              
03833                 iBack = FEDM_Base::SetData(Adr, Data, m_RFC_RAMData);
03834                 if(iBack == FEDM_MODIFIED)
03835                 {
03836                         // mark block as modified
03837                         BlockAdr = Adr >> 4;
03838                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03839                         if( BlockAdr < ((Adr + 4) >> 4))
03840                         {
03841                                 BlockAdr++;
03842                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03843                         }
03844                 }
03845                 return iBack;
03846 
03847         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
03848                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_EEData);
03849                 if(iBack == FEDM_MODIFIED)
03850                 {
03851                         // mark block as modified
03852                         BlockAdr = Adr >> 5;
03853                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03854                         if( BlockAdr < ((Adr + 4) >> 5))
03855                         {
03856                                 BlockAdr++;
03857                                 m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03858                         }
03859                 }
03860                 return iBack;
03861 
03862         case FEDM_ACC_RAMDATA_MEM:
03863                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_RAMData);
03864                 if(iBack == FEDM_MODIFIED)
03865                 {
03866                         // mark block as modified
03867                         BlockAdr = Adr >> 5;
03868                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03869                         if( BlockAdr < ((Adr + 4) >> 5))
03870                         {
03871                                 BlockAdr++;
03872                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03873                         }
03874                 }
03875                 return iBack;
03876 
03877         case FEDM_TMPDATA_MEM:
03878                 return FEDM_Base::SetData(Adr, Data, m_TmpData);
03879         case FEDM_MJPDATA_MEM:
03880                 return FEDM_Base::SetData(Adr, Data, m_MjpData);
03881         case FEDM_SN_MEM:
03882                 return FEDM_Base::SetData(Adr, Data, m_SN_Mem);
03883         case FEDM_ID_MEM:
03884                 return FEDM_Base::SetData(Adr, Data, m_ID_Mem);
03885         case FEDM_AC_MEM:                       
03886                 return FEDM_Base::SetData(Adr, Data, m_AC_Mem);
03887         case FEDM_PUB_MEM:                      
03888                 return FEDM_Base::SetData(Adr, Data, m_PubMem);
03889         case FEDM_SEC_MEM:                      
03890                 return FEDM_Base::SetData(Adr, Data, m_SecMem);
03891         case FEDM_CONF_MEM:             
03892                 return FEDM_Base::SetData(Adr, Data, m_ConfMem);
03893         case FEDM_DATE_MEM:
03894                 return FEDM_Base::SetData(Adr, Data, m_DateMem);
03895         case FEDM_RFC_DATA_MASK_MEM:
03896                 return FEDM_Base::SetData(Adr, Data, m_RFC_CfgProfileMask);
03897         default:
03898                 return FEDM_ERROR_UNKNOWN_MEM_ID;
03899         }
03900 
03901         return FEDM_OK;
03902 }
03903 
03904 /***************************************************************************
03905   Begin         :       13.06.2000 / M. Hultsch
03906   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
03907 
03908   Function              :       write a value in specified memory
03909 
03910   Parameter             :       int Adr                 -       address
03911                                         __int64 Data    -       value
03912                                         int MemID               -       memory identifier
03913 
03914   Return Value  :       FEDM_OK (0) or error code (<0)
03915 ***************************************************************************/
03916 int FEDM_DataBase::SetData( int Adr, __int64 Data, int MemID )
03917 {
03918         int iBack = 0;
03919         int BlockAdr = 0;
03920 
03921         switch( MemID )
03922         {
03923         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
03924                 iBack =  FEDM_Base::SetData(Adr, Data, m_RFC_EEData);
03925                 if(iBack == FEDM_MODIFIED)
03926                 {
03927                         // mark block as modified
03928                         BlockAdr = Adr >> 4;
03929                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03930                         if( BlockAdr < ((Adr + 8) >> 4))
03931                         {
03932                                 BlockAdr++;
03933                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03934                         }
03935                 }
03936                 return iBack;
03937 
03938         case FEDM_RFC_RAMDATA_MEM:
03939                 iBack = FEDM_Base::SetData(Adr, Data, m_RFC_RAMData);
03940                 if(iBack == FEDM_MODIFIED)
03941                 {
03942                         // mark block as modified
03943                         BlockAdr = Adr >> 4;
03944                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03945                         if( BlockAdr < ((Adr + 8) >> 4))
03946                         {
03947                                 BlockAdr++;
03948                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
03949                         }
03950                 }
03951                 return iBack;
03952 
03953         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
03954                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_EEData);
03955                 if(iBack == FEDM_MODIFIED)
03956                 {
03957                         // mark block as modified
03958                         BlockAdr = Adr >> 5;
03959                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03960                         if( BlockAdr < ((Adr + 8) >> 5))
03961                         {
03962                                 BlockAdr++;
03963                                 m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
03964                         }
03965                 }
03966                 return iBack;
03967 
03968         case FEDM_ACC_RAMDATA_MEM:
03969                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_RAMData);
03970                 if(iBack == FEDM_MODIFIED)
03971                 {
03972                         // mark block as modified
03973                         BlockAdr = Adr >> 5;
03974                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03975                         if( BlockAdr < ((Adr + 8) >> 5))
03976                         {
03977                                 BlockAdr++;
03978                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
03979                         }
03980                 }
03981                 return iBack;
03982 
03983         case FEDM_TMPDATA_MEM:
03984                 return FEDM_Base::SetData(Adr, Data, m_TmpData);
03985         case FEDM_MJPDATA_MEM:
03986                 return FEDM_Base::SetData(Adr, Data, m_MjpData);
03987         case FEDM_SN_MEM:
03988                 return FEDM_Base::SetData(Adr, Data, m_SN_Mem);
03989         case FEDM_ID_MEM:
03990                 return FEDM_Base::SetData(Adr, Data, m_ID_Mem);
03991         case FEDM_AC_MEM:                       
03992                 return FEDM_Base::SetData(Adr, Data, m_AC_Mem);
03993         case FEDM_PUB_MEM:                      
03994                 return FEDM_Base::SetData(Adr, Data, m_PubMem);
03995         case FEDM_SEC_MEM:                      
03996                 return FEDM_Base::SetData(Adr, Data, m_SecMem);
03997         case FEDM_CONF_MEM:             
03998                 return FEDM_Base::SetData(Adr, Data, m_ConfMem);
03999         case FEDM_DATE_MEM:
04000                 return FEDM_Base::SetData(Adr, Data, m_DateMem);
04001         case FEDM_RFC_DATA_MASK_MEM:
04002                 return FEDM_Base::SetData(Adr, Data, m_RFC_CfgProfileMask);
04003         default:
04004                 return FEDM_ERROR_UNKNOWN_MEM_ID;
04005         }
04006 
04007         return FEDM_OK;
04008 }
04009 
04010 /***************************************************************************
04011   Begin         :       13.06.2000 / M. Hultsch
04012   Version       :       03.00.03 / 26.01.2009 / M. Hultsch
04013 
04014   Function              :       write a value in specified memory
04015 
04016   Parameter             :       int Adr                 -       address
04017                                         CString Data    -       value
04018                                         int MemID               -       memory identifier
04019 
04020   Return Value  :       FEDM_OK (0) or error code (<0)
04021 ***************************************************************************/
04022 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
04023 int FEDM_DataBase::SetData( int Adr, CString Data, int MemID )
04024 {
04025         int iBack = 0;
04026         int BlockAdr = 0;
04027         int iLen = 0;
04028 
04029         switch( MemID )
04030         {
04031         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
04032                 iBack = FEDM_Base::SetData(Adr, Data, m_RFC_EEData);
04033                 if(iBack == FEDM_MODIFIED)
04034                 {
04035                         // mark block as modified
04036                         BlockAdr = Adr >> 4;
04037 #if defined(_FEDM_MFC_SUPPORT)
04038                         iLen = (Data.GetLength() >> 2);
04039 #endif
04040 #if defined(__BORLANDC__)
04041                         iLen = (Data.Length() >> 2);
04042 #endif
04043                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04044                         while(iLen > m_iRFC_DataBlockSize)
04045                         {
04046                                 BlockAdr++;
04047                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04048                                 iLen -= m_iRFC_DataBlockSize;
04049                         }
04050                 }
04051                 return iBack;
04052 
04053         case FEDM_RFC_RAMDATA_MEM:
04054                 iBack = FEDM_Base::SetData(Adr, Data, m_RFC_RAMData);
04055                 if(iBack == FEDM_MODIFIED)
04056                 {
04057                         // mark block as modified
04058                         BlockAdr = Adr >> 4;
04059 #if defined(_FEDM_MFC_SUPPORT)
04060                         iLen = (Data.GetLength() >> 2);
04061 #endif
04062 #if defined(__BORLANDC__)
04063                         iLen = (Data.Length() >> 2);
04064 #endif
04065                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04066                         while(iLen > m_iRFC_DataBlockSize)
04067                         {
04068                                 BlockAdr++;
04069                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04070                                 iLen -= m_iRFC_DataBlockSize;
04071                         }
04072                 }
04073                 return iBack;
04074 
04075         case FEDM_ACC_EEDATA_MEM: // modifies RAM and EEPROM
04076                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_EEData);
04077                 if(iBack == FEDM_MODIFIED)
04078                 {
04079                         // mark block as modified
04080                         BlockAdr = Adr >> 5;
04081 #if defined(_FEDM_MFC_SUPPORT)
04082                         iLen = (Data.GetLength() >> 2);
04083 #endif
04084 #if defined(__BORLANDC__)
04085                         iLen = (Data.Length() >> 2);
04086 #endif
04087                         m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
04088                         while(iLen > 32)
04089                         {
04090                                 BlockAdr++;
04091                                 m_ACC_EEData[BlockAdr * 32 + 31] |= 0x02;
04092                                 iLen -= 32;
04093                         }
04094                 }
04095                 return iBack;
04096 
04097         case FEDM_ACC_RAMDATA_MEM:
04098                 iBack = FEDM_Base::SetData(Adr, Data, m_ACC_RAMData);
04099                 if(iBack == FEDM_MODIFIED)
04100                 {
04101                         // mark block as modified
04102                         BlockAdr = Adr >> 5;
04103 #if defined(_FEDM_MFC_SUPPORT)
04104                         iLen = (Data.GetLength() >> 2);
04105 #endif
04106 #if defined(__BORLANDC__)
04107                         iLen = (Data.Length() >> 2);
04108 #endif
04109                         m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
04110                         while(iLen > 32)
04111                         {
04112                                 BlockAdr++;
04113                                 m_ACC_RAMData[BlockAdr * 32 + 31] |= 0x02;
04114                                 iLen -= 32;
04115                         }
04116                 }
04117                 return iBack;
04118 
04119         case FEDM_TMPDATA_MEM:
04120                 return FEDM_Base::SetData(Adr, Data, m_TmpData);
04121         case FEDM_MJPDATA_MEM:
04122                 return FEDM_Base::SetData(Adr, Data, m_MjpData);
04123         case FEDM_SN_MEM:
04124                 return FEDM_Base::SetData(Adr, Data, m_SN_Mem);
04125         case FEDM_ID_MEM:
04126                 return FEDM_Base::SetData(Adr, Data, m_ID_Mem);
04127         case FEDM_AC_MEM:                       
04128                 return FEDM_Base::SetData(Adr, Data, m_AC_Mem);
04129         case FEDM_PUB_MEM:                      
04130                 return FEDM_Base::SetData(Adr, Data, m_PubMem);
04131         case FEDM_SEC_MEM:                      
04132                 return FEDM_Base::SetData(Adr, Data, m_SecMem);
04133         case FEDM_CONF_MEM:             
04134                 return FEDM_Base::SetData(Adr, Data, m_ConfMem);
04135         case FEDM_DATE_MEM:
04136                 return FEDM_Base::SetData(Adr, Data, m_DateMem);
04137         case FEDM_RFC_DATA_MASK_MEM:
04138                 return FEDM_Base::SetData(Adr, Data, m_RFC_CfgProfileMask);
04139         default:
04140                 return FEDM_ERROR_UNKNOWN_MEM_ID;
04141         }
04142 
04143         return FEDM_OK;
04144 }
04145 #endif
04146 
04147 
04148 /***************************************************************************
04149   Begin         :       08.08.2008 / M. Hultsch
04150   Version       :       04.06.08 / 22.10.2014 / M. Hultsch
04151                                         - extended for ID ISC.PRH200
04152 
04153                                         04.06.02 / 08.05.2012 / M. Hultsch
04154                                         - extended for parameters:
04155                                           AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04156                                           AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04157 
04158                                         04.03.00 / 20.08.2012 / M. Hultsch
04159 
04160   Function              :       write additional value in specified memory
04161                                         NOTE: actually support only for boolean parameters
04162 
04163   Parameter             :       const char* ID  -       parameter identifier
04164                                         __int64 Data    -       value
04165 
04166   Return Value  :       FEDM_OK (0) or error code (<0)
04167 ***************************************************************************/
04168 void FEDM_DataBase::OptionalSetDataAction( const char* ID, __int64 Data )
04169 {
04170         bool bPara1 = false;
04171         bool bPara2 = false;
04172         bool bPara3 = false;
04173         bool bPara4 = false;
04174         bool bPara5 = false;
04175         unsigned char ucPara = 0;
04176         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
04177         int iBack = 0;
04178 
04179         // extract access parameters
04180         sscanf( ID, "%d %d %d %d %d %d %d",
04181                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
04182 
04183         switch( MemID )
04184         {
04185         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
04186                 if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.InputEvents
04187                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04188                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04189                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04190                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04191                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04192                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04193                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04194                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04195                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04196                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04197                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04198                 {
04199                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04200                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04201                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04202                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04203                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04204                         
04205                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04206                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04207                         if(iBack == FEDM_MODIFIED)
04208                         {
04209                                 // mark block as modified
04210                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04211                         }
04212                 }
04213                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==1 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.MacAddress
04214                         (m_uiReaderType==FEDM_ISC_TYPE_CPR50_XX ||
04215                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04216                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04217                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04218                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04219                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04220                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04221                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04222                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04223                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04224                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04225                 {
04226                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04227                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04228                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04229                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04230                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04231                         
04232                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04233                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04234                         if(iBack == FEDM_MODIFIED)
04235                         {
04236                                 // mark block as modified
04237                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04238                         }
04239                 }
04240                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.AFI
04241                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04242                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04243                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B) )
04244                 {
04245                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04246                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04247                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04248                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04249                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04250                         
04251                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04252                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04253                         if(iBack == FEDM_MODIFIED)
04254                         {
04255                                 // mark block as modified
04256                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04257                         }
04258                 }
04259                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==4 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.RSSI
04260                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRHD102 ||
04261                          m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04262                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04263                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR1002 ||
04264                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04265                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04266                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04267                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU102 ||
04268                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04269                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04270                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04271                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04272                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04273                 {
04274                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AntennaExtended
04275                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04276                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04277                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04278                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04279                         
04280                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04281                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04282                         if(iBack == FEDM_MODIFIED)
04283                         {
04284                                 // mark block as modified
04285                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04286                         }
04287                 }
04288                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==5 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.Direction
04289                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B )
04290                 {
04291                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AntennaExtended
04292                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04293                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04294                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04295                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04296                         
04297                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04298                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04299                         if(iBack == FEDM_MODIFIED)
04300                         {
04301                                 // mark block as modified
04302                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04303                         }
04304                 }
04305                 else if( BlockAdr==11 && BytePos==2 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04306                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04307                 {
04308                         FEDM_Base::GetData("03 03 11 02 01 02 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04309                         
04310                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData3
04311                         iBack = FEDM_Base::SetData("03 03 11 01 01 07 01", bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);
04312                         if(iBack == FEDM_MODIFIED)
04313                         {
04314                                 // mark block as modified
04315                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04316                         }
04317                 }
04318                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==3 && BitCnt==4 && // AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04319                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04320                 {
04321                         FEDM_Base::GetData("03 03 15 01 01 03 04", &ucPara, m_RFC_EEData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04322                         
04323                         if(ucPara > 0)
04324                         {
04325                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04326                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", true, m_RFC_EEData, m_iRFC_DataBlockSize);
04327                                 if(iBack == FEDM_MODIFIED)
04328                                 {
04329                                         // mark block as modified
04330                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04331                                 }
04332                         }
04333                         else
04334                         {
04335                                 // reset also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04336                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_EEData, m_iRFC_DataBlockSize);
04337                                 if(iBack == FEDM_MODIFIED)
04338                                 {
04339                                         // mark block as modified
04340                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04341                                 }
04342                         }
04343                 }
04344                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==3 && // AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04345                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04346                 {
04347                         FEDM_Base::GetData("03 03 15 01 01 00 03", &ucPara, m_RFC_EEData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04348                         
04349                         if(ucPara > 0)
04350                         {
04351                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04352                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_EEData, m_iRFC_DataBlockSize);
04353                                 if(iBack == FEDM_MODIFIED)
04354                                 {
04355                                         // mark block as modified
04356                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04357                                 }
04358                         }
04359                 }
04360                 break;
04361         
04362         case FEDM_RFC_RAMDATA_MEM:
04363                 if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.InputEvents
04364                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04365                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04366                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04367                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04368                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04369                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04370                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04371                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04372                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04373                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04374                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04375                 {
04376                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04377                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04378                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04379                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04380                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04381                         
04382                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04383                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04384                         if(iBack == FEDM_MODIFIED)
04385                         {
04386                                 // mark block as modified
04387                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04388                         }
04389                 }
04390                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==1 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.MacAddress
04391                         (m_uiReaderType==FEDM_ISC_TYPE_CPR50_XX ||
04392                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04393                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04394                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04395                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04396                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04397                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04398                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04399                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04400                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04401                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04402                 {
04403                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04404                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04405                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04406                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04407                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04408                         
04409                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04410                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04411                         if(iBack == FEDM_MODIFIED)
04412                         {
04413                                 // mark block as modified
04414                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04415                         }
04416                 }
04417                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.AFI
04418                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04419                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04420                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B) )
04421                 {
04422                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04423                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04424                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04425                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04426                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04427                         
04428                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04429                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04430                         if(iBack == FEDM_MODIFIED)
04431                         {
04432                                 // mark block as modified
04433                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04434                         }
04435                 }
04436                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==4 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.RSSI
04437                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRHD102 ||
04438                          m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04439                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04440                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR1002 ||
04441                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04442                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04443                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04444                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU102 ||
04445                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04446                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04447                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04448                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04449                 {
04450                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04451                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04452                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04453                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04454                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04455                         
04456                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04457                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04458                         if(iBack == FEDM_MODIFIED)
04459                         {
04460                                 // mark block as modified
04461                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04462                         }
04463                 }
04464                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==5 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.Direction
04465                         m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B )
04466                 {
04467                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04468                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04469                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04470                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04471                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04472                         
04473                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04474                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04475                         if(iBack == FEDM_MODIFIED)
04476                         {
04477                                 // mark block as modified
04478                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04479                         }
04480                 }
04481                 else if( BlockAdr==11 && BytePos==2 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04482                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04483                 {
04484                         FEDM_Base::GetData("03 03 11 02 01 02 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04485                         
04486                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData3
04487                         iBack = FEDM_Base::SetData("03 03 11 01 01 07 01", bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);
04488                         if(iBack == FEDM_MODIFIED)
04489                         {
04490                                 // mark block as modified
04491                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04492                         }
04493                 }
04494                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==3 && BitCnt==4 && // AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04495                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04496                 {
04497                         FEDM_Base::GetData("03 03 15 01 01 03 04", &ucPara, m_RFC_RAMData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04498                         
04499                         if(ucPara > 0)
04500                         {
04501                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04502                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", true, m_RFC_RAMData, m_iRFC_DataBlockSize);
04503                                 if(iBack == FEDM_MODIFIED)
04504                                 {
04505                                         // mark block as modified
04506                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04507                                 }
04508                         }
04509                         else
04510                         {
04511                                 // reset also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04512                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_RAMData, m_iRFC_DataBlockSize);
04513                                 if(iBack == FEDM_MODIFIED)
04514                                 {
04515                                         // mark block as modified
04516                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04517                                 }
04518                         }
04519                 }
04520                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==3 && // AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04521                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04522                 {
04523                         FEDM_Base::GetData("03 03 15 01 01 00 03", &ucPara, m_RFC_RAMData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04524                         
04525                         if(ucPara > 0)
04526                         {
04527                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04528                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_RAMData, m_iRFC_DataBlockSize);
04529                                 if(iBack == FEDM_MODIFIED)
04530                                 {
04531                                         // mark block as modified
04532                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04533                                 }
04534                         }
04535                 }
04536                 break;
04537         }
04538 }
04539 
04540 /***************************************************************************
04541   Begin         :       08.08.2008 / M. Hultsch
04542   Version       :       04.06.08 / 22.10.2014 / M. Hultsch
04543                                         - extended for ID ISC.PRH200
04544 
04545                                         04.06.02 / 08.05.2012 / M. Hultsch
04546                                         - extended for parameters:
04547                                           AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04548                                           AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04549 
04550                                         04.03.00 / 20.08.2012 / M. Hultsch
04551 
04552   Function              :       write additional value in specified memory
04553                                         NOTE: actually support only for boolean parameters
04554 
04555   Parameter             :       const char* ID  -       parameter identifier
04556                                         string Data             -       value
04557 
04558   Return Value  :       FEDM_OK (0) or error code (<0)
04559 ***************************************************************************/
04560 void FEDM_DataBase::OptionalSetDataAction( const char* ID, string Data )
04561 {
04562         bool bPara1 = false;
04563         bool bPara2 = false;
04564         bool bPara3 = false;
04565         bool bPara4 = false;
04566         bool bPara5 = false;
04567         unsigned char ucPara = 0;
04568         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
04569         int iBack = 0;
04570 
04571         // extract access parameters
04572         sscanf( ID, "%d %d %d %d %d %d %d",
04573                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
04574 
04575         switch( MemID )
04576         {
04577         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
04578                 if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.InputEvents
04579                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04580                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04581                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04582                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04583                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04584                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04585                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04586                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04587                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04588                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04589                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04590                 {
04591                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04592                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04593                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04594                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04595                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04596                         
04597                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04598                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04599                         if(iBack == FEDM_MODIFIED)
04600                         {
04601                                 // mark block as modified
04602                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04603                         }
04604                 }
04605                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==1 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.MacAddress
04606                         (m_uiReaderType==FEDM_ISC_TYPE_CPR50_XX ||
04607                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04608                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04609                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04610                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04611                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04612                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04613                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04614                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04615                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04616                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04617                 {
04618                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04619                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04620                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04621                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04622                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04623                         
04624                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04625                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04626                         if(iBack == FEDM_MODIFIED)
04627                         {
04628                                 // mark block as modified
04629                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04630                         }
04631                 }
04632                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.AFI
04633                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04634                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04635                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B) )
04636                 {
04637                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04638                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04639                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04640                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04641                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04642                         
04643                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04644                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04645                         if(iBack == FEDM_MODIFIED)
04646                         {
04647                                 // mark block as modified
04648                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04649                         }
04650                 }
04651                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==4 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.RSSI
04652                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRHD102 ||
04653                          m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04654                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04655                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR1002 ||
04656                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04657                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04658                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04659                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU102 ||
04660                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04661                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04662                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04663                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04664                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04665                 {
04666                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04667                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04668                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04669                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04670                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04671                         
04672                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04673                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04674                         if(iBack == FEDM_MODIFIED)
04675                         {
04676                                 // mark block as modified
04677                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04678                         }
04679                 }
04680                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==5 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.Direction
04681                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B )
04682                 {
04683                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04684                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04685                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04686                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04687                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04688                         
04689                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04690                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04691                         if(iBack == FEDM_MODIFIED)
04692                         {
04693                                 // mark block as modified
04694                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04695                         }
04696                 }
04697                 else if( BlockAdr==11 && BytePos==2 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04698                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04699                 {
04700                         FEDM_Base::GetData("03 03 11 02 01 02 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04701                         
04702                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData3
04703                         iBack = FEDM_Base::SetData("03 03 11 01 01 07 01", (bool)(bPara1), m_RFC_EEData, m_iRFC_DataBlockSize);
04704                         if(iBack == FEDM_MODIFIED)
04705                         {
04706                                 // mark block as modified
04707                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04708                         }
04709                 }
04710                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==3 && BitCnt==4 && // AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04711                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04712                 {
04713                         FEDM_Base::GetData("03 03 15 01 01 03 04", &ucPara, m_RFC_EEData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04714                         
04715                         if(ucPara > 0)
04716                         {
04717                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04718                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", true, m_RFC_EEData, m_iRFC_DataBlockSize);
04719                                 if(iBack == FEDM_MODIFIED)
04720                                 {
04721                                         // mark block as modified
04722                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04723                                 }
04724                         }
04725                         else
04726                         {
04727                                 // reset also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04728                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_EEData, m_iRFC_DataBlockSize);
04729                                 if(iBack == FEDM_MODIFIED)
04730                                 {
04731                                         // mark block as modified
04732                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04733                                 }
04734                         }
04735                 }
04736                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==3 && // AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04737                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04738                 {
04739                         FEDM_Base::GetData("03 03 15 01 01 00 03", &ucPara, m_RFC_EEData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04740                         
04741                         if(ucPara > 0)
04742                         {
04743                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04744                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_EEData, m_iRFC_DataBlockSize);
04745                                 if(iBack == FEDM_MODIFIED)
04746                                 {
04747                                         // mark block as modified
04748                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04749                                 }
04750                         }
04751                 }
04752                 break;
04753         
04754         case FEDM_RFC_RAMDATA_MEM:
04755                 if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.InputEvents
04756                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04757                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04758                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04759                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04760                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04761                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04762                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04763                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04764                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04765                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04766                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04767                 {
04768                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04769                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04770                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04771                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04772                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04773                         
04774                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04775                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04776                         if(iBack == FEDM_MODIFIED)
04777                         {
04778                                 // mark block as modified
04779                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04780                         }
04781                 }
04782                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==1 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.MacAddress
04783                         (m_uiReaderType==FEDM_ISC_TYPE_CPR50_XX ||
04784                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04785                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04786                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04787                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04788                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04789                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04790                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04791                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04792                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04793                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04794                 {
04795                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04796                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04797                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04798                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04799                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04800                         
04801                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04802                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04803                         if(iBack == FEDM_MODIFIED)
04804                         {
04805                                 // mark block as modified
04806                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04807                         }
04808                 }
04809                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.AFI
04810                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04811                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04812                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B) )
04813                 {
04814                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04815                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04816                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04817                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04818                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04819                         
04820                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04821                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04822                         if(iBack == FEDM_MODIFIED)
04823                         {
04824                                 // mark block as modified
04825                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04826                         }
04827                 }
04828                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==4 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.RSSI
04829                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRHD102 ||
04830                          m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04831                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04832                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR1002 ||
04833                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04834                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04835                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04836                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU102 ||
04837                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04838                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04839                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04840                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04841                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04842                 {
04843                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04844                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04845                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04846                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04847                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04848                         
04849                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04850                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04851                         if(iBack == FEDM_MODIFIED)
04852                         {
04853                                 // mark block as modified
04854                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04855                         }
04856                 }
04857                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==5 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.Direction
04858                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B )
04859                 {
04860                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04861                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04862                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04863                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04864                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04865                         
04866                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04867                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
04868                         if(iBack == FEDM_MODIFIED)
04869                         {
04870                                 // mark block as modified
04871                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04872                         }
04873                 }
04874                 else if( BlockAdr==11 && BytePos==2 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04875                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04876                 {
04877                         FEDM_Base::GetData("03 03 11 02 01 02 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.DistanceMeasurement
04878                         
04879                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData3
04880                         iBack = FEDM_Base::SetData("03 03 11 01 01 07 01", (bool)(bPara1), m_RFC_RAMData, m_iRFC_DataBlockSize);
04881                         if(iBack == FEDM_MODIFIED)
04882                         {
04883                                 // mark block as modified
04884                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04885                         }
04886                 }
04887                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==3 && BitCnt==4 && // AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04888                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04889                 {
04890                         FEDM_Base::GetData("03 03 15 01 01 03 04", &ucPara, m_RFC_RAMData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04891                         
04892                         if(ucPara > 0)
04893                         {
04894                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04895                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", true, m_RFC_RAMData, m_iRFC_DataBlockSize);
04896                                 if(iBack == FEDM_MODIFIED)
04897                                 {
04898                                         // mark block as modified
04899                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04900                                 }
04901                         }
04902                         else
04903                         {
04904                                 // reset also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04905                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_RAMData, m_iRFC_DataBlockSize);
04906                                 if(iBack == FEDM_MODIFIED)
04907                                 {
04908                                         // mark block as modified
04909                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04910                                 }
04911                         }
04912                 }
04913                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==3 && // AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04914                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04915                 {
04916                         FEDM_Base::GetData("03 03 15 01 01 00 03", &ucPara, m_RFC_RAMData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04917                         
04918                         if(ucPara > 0)
04919                         {
04920                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
04921                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_RAMData, m_iRFC_DataBlockSize);
04922                                 if(iBack == FEDM_MODIFIED)
04923                                 {
04924                                         // mark block as modified
04925                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04926                                 }
04927                         }
04928                 }
04929                 break;
04930         }
04931 }
04932 
04933 /***************************************************************************
04934   Begin         :       08.08.2008 / M. Hultsch
04935   Version       :       04.06.08 / 22.10.2014 / M. Hultsch
04936                                         - extended for ID ISC.PRH200
04937 
04938                                         04.06.02 / 08.05.2012 / M. Hultsch
04939                                         - extended for parameters:
04940                                           AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
04941                                           AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
04942 
04943                                         04.03.00 / 20.08.2012 / M. Hultsch
04944                                         NOTE: actually support only for boolean parameters
04945 
04946   Function              :       write additional value in specified memory
04947 
04948   Parameter             :       const char* ID  -       parameter identifier
04949                                         CString Data    -       value
04950 
04951   Return Value  :       FEDM_OK (0) or error code (<0)
04952 ***************************************************************************/
04953 #if defined(_FEDM_MFC_SUPPORT) //|| defined(__BORLANDC__)
04954 void FEDM_DataBase::OptionalSetDataAction( const char* ID, CString Data )
04955 {
04956         bool bPara1 = false;
04957         bool bPara2 = false;
04958         bool bPara3 = false;
04959         bool bPara4 = false;
04960         bool bPara5 = false;
04961         unsigned char ucPara = 0;
04962         int FamID=0, MemID=0, BlockAdr=0, BytePos=0, ByteCnt=0, BitPos=0, BitCnt=0;
04963         int iBack = 0;
04964 
04965         // extract access parameters
04966         sscanf( ID, "%d %d %d %d %d %d %d",
04967                         &FamID, &MemID, &BlockAdr, &BytePos, &ByteCnt, &BitPos, &BitCnt );
04968 
04969         switch( MemID )
04970         {
04971         case FEDM_RFC_EEDATA_MEM: // modifies RAM and EEPROM
04972                 if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.InputEvents
04973                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
04974                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
04975                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
04976                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
04977                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
04978                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
04979                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
04980                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
04981                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
04982                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
04983                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
04984                 {
04985                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
04986                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
04987                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
04988                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
04989                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
04990                         
04991                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
04992                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
04993                         if(iBack == FEDM_MODIFIED)
04994                         {
04995                                 // mark block as modified
04996                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
04997                         }
04998                 }
04999                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==1 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.MacAddress
05000                         (m_uiReaderType==FEDM_ISC_TYPE_CPR50_XX ||
05001                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
05002                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
05003                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
05004                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
05005                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
05006                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
05007                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
05008                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
05009                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
05010                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05011                 {
05012                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05013                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05014                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05015                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05016                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05017                         
05018                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05019                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
05020                         if(iBack == FEDM_MODIFIED)
05021                         {
05022                                 // mark block as modified
05023                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05024                         }
05025                 }
05026                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.AFI
05027                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
05028                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
05029                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B) )
05030                 {
05031                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05032                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05033                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05034                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05035                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05036                         
05037                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05038                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
05039                         if(iBack == FEDM_MODIFIED)
05040                         {
05041                                 // mark block as modified
05042                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05043                         }
05044                 }
05045                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==4 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.RSSI
05046                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRHD102 ||
05047                          m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
05048                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
05049                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR1002 ||
05050                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
05051                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
05052                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
05053                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU102 ||
05054                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
05055                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
05056                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
05057                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
05058                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05059                 {
05060                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05061                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05062                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05063                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05064                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05065                         
05066                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05067                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
05068                         if(iBack == FEDM_MODIFIED)
05069                         {
05070                                 // mark block as modified
05071                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05072                         }
05073                 }
05074                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==5 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.Direction
05075                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B )
05076                 {
05077                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05078                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05079                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05080                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05081                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05082                         
05083                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05084                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_EEData, m_iRFC_DataBlockSize);
05085                         if(iBack == FEDM_MODIFIED)
05086                         {
05087                                 // mark block as modified
05088                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05089                         }
05090                 }
05091                 else if( BlockAdr==11 && BytePos==2 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.DistanceMeasurement
05092                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05093                 {
05094                         FEDM_Base::GetData("03 03 11 02 01 02 01", &bPara1, m_RFC_EEData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.DistanceMeasurement
05095                         
05096                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData3
05097                         iBack = FEDM_Base::SetData("03 03 11 01 01 07 01", (bool)(bPara1), m_RFC_EEData, m_iRFC_DataBlockSize);
05098                         if(iBack == FEDM_MODIFIED)
05099                         {
05100                                 // mark block as modified
05101                                 m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05102                         }
05103                 }
05104                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==3 && BitCnt==4 && // AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
05105                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05106                 {
05107                         FEDM_Base::GetData("03 03 15 01 01 03 04", &ucPara, m_RFC_EEData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
05108                         
05109                         if(ucPara > 0)
05110                         {
05111                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
05112                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", true, m_RFC_EEData, m_iRFC_DataBlockSize);
05113                                 if(iBack == FEDM_MODIFIED)
05114                                 {
05115                                         // mark block as modified
05116                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05117                                 }
05118                         }
05119                         else
05120                         {
05121                                 // reset also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
05122                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_EEData, m_iRFC_DataBlockSize);
05123                                 if(iBack == FEDM_MODIFIED)
05124                                 {
05125                                         // mark block as modified
05126                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05127                                 }
05128                         }
05129                 }
05130                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==3 && // AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
05131                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05132                 {
05133                         FEDM_Base::GetData("03 03 15 01 01 00 03", &ucPara, m_RFC_EEData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
05134                         
05135                         if(ucPara > 0)
05136                         {
05137                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
05138                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_EEData, m_iRFC_DataBlockSize);
05139                                 if(iBack == FEDM_MODIFIED)
05140                                 {
05141                                         // mark block as modified
05142                                         m_RFC_EEData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05143                                 }
05144                         }
05145                 }
05146                 break;
05147         
05148         case FEDM_RFC_RAMDATA_MEM:
05149                 if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.InputEvents
05150                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
05151                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
05152                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
05153                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
05154                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
05155                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
05156                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
05157                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
05158                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
05159                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
05160                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05161                 {
05162                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05163                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05164                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05165                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05166                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05167                         
05168                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05169                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
05170                         if(iBack == FEDM_MODIFIED)
05171                         {
05172                                 // mark block as modified
05173                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05174                         }
05175                 }
05176                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==1 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.MacAddress
05177                         (m_uiReaderType==FEDM_ISC_TYPE_CPR50_XX ||
05178                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
05179                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
05180                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
05181                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
05182                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
05183                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1000 ||
05184                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
05185                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
05186                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
05187                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05188                 {
05189                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05190                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05191                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05192                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05193                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05194                         
05195                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05196                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
05197                         if(iBack == FEDM_MODIFIED)
05198                         {
05199                                 // mark block as modified
05200                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05201                         }
05202                 }
05203                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.AFI
05204                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
05205                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
05206                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B) )
05207                 {
05208                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05209                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05210                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05211                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05212                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05213                         
05214                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05215                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
05216                         if(iBack == FEDM_MODIFIED)
05217                         {
05218                                 // mark block as modified
05219                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05220                         }
05221                 }
05222                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==4 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.RSSI
05223                         (m_uiReaderType==FEDM_ISC_TYPE_ISCPRHD102 ||
05224                          m_uiReaderType==FEDM_ISC_TYPE_ISCPRH200 ||
05225                          m_uiReaderType==FEDM_ISC_TYPE_ISCMR200 ||
05226                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR1002 ||
05227                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2000 ||
05228                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_A ||
05229                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B ||
05230                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU102 ||
05231                          m_uiReaderType==FEDM_ISC_TYPE_ISCMRU200 ||
05232                          m_uiReaderType==FEDM_ISC_TYPE_MAXU1002 ||
05233                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU1002 ||
05234                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU2000 ||
05235                          m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05236                 {
05237                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05238                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05239                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05240                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05241                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05242                         
05243                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05244                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
05245                         if(iBack == FEDM_MODIFIED)
05246                         {
05247                                 // mark block as modified
05248                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05249                         }
05250                 }
05251                 else if( BlockAdr==11 && BytePos==1 && ByteCnt==1 && BitPos==5 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.Direction
05252                          m_uiReaderType==FEDM_ISC_TYPE_ISCLR2500_B )
05253                 {
05254                         FEDM_Base::GetData("03 03 11 01 01 00 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.InputEvents
05255                         FEDM_Base::GetData("03 03 11 01 01 01 01", &bPara2, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.MacAddress
05256                         FEDM_Base::GetData("03 03 11 01 01 02 01", &bPara3, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.AFI
05257                         FEDM_Base::GetData("03 03 11 01 01 04 01", &bPara4, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.RSSI
05258                         FEDM_Base::GetData("03 03 11 01 01 05 01", &bPara5, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.Direction
05259                         
05260                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData2
05261                         iBack = FEDM_Base::SetData("03 03 11 00 01 07 01", (bool)(bPara1 | bPara2 | bPara3 | bPara4 | bPara5), m_RFC_RAMData, m_iRFC_DataBlockSize);
05262                         if(iBack == FEDM_MODIFIED)
05263                         {
05264                                 // mark block as modified
05265                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05266                         }
05267                 }
05268                 else if( BlockAdr==11 && BytePos==2 && ByteCnt==1 && BitPos==2 && BitCnt==1 && // OperatingMode.AutoRead.DataSelector.DistanceMeasurement
05269                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05270                 {
05271                         FEDM_Base::GetData("03 03 11 02 01 02 01", &bPara1, m_RFC_RAMData, m_iRFC_DataBlockSize);// OperatingMode.AutoRead.DataSelector.DistanceMeasurement
05272                         
05273                         // set also: OperatingMode.AutoRead.DataSelector.ExtensionFlag_TrData3
05274                         iBack = FEDM_Base::SetData("03 03 11 01 01 07 01", (bool)(bPara1), m_RFC_RAMData, m_iRFC_DataBlockSize);
05275                         if(iBack == FEDM_MODIFIED)
05276                         {
05277                                 // mark block as modified
05278                                 m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05279                         }
05280                 }
05281                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==3 && BitCnt==4 && // AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
05282                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05283                 {
05284                         FEDM_Base::GetData("03 03 15 01 01 03 04", &ucPara, m_RFC_RAMData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.SelectedAntennas
05285                         
05286                         if(ucPara > 0)
05287                         {
05288                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
05289                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", true, m_RFC_RAMData, m_iRFC_DataBlockSize);
05290                                 if(iBack == FEDM_MODIFIED)
05291                                 {
05292                                         // mark block as modified
05293                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05294                                 }
05295                         }
05296                         else
05297                         {
05298                                 // reset also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
05299                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_RAMData, m_iRFC_DataBlockSize);
05300                                 if(iBack == FEDM_MODIFIED)
05301                                 {
05302                                         // mark block as modified
05303                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05304                                 }
05305                         }
05306                 }
05307                 else if( BlockAdr==15 && BytePos==1 && ByteCnt==1 && BitPos==0 && BitCnt==3 && // AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
05308                         (m_uiReaderType==FEDM_ISC_TYPE_ISCLRU3000) )
05309                 {
05310                         FEDM_Base::GetData("03 03 15 01 01 00 03", &ucPara, m_RFC_RAMData, m_iRFC_DataBlockSize);// AirInterface.Multiplexer.UHF.Internal.NoOfAntennas
05311                         
05312                         if(ucPara > 0)
05313                         {
05314                                 // set also: AirInterface.Multiplexer.UHF.Internal.SelectionMode
05315                                 iBack = FEDM_Base::SetData("03 03 15 01 01 07 01", false, m_RFC_RAMData, m_iRFC_DataBlockSize);
05316                                 if(iBack == FEDM_MODIFIED)
05317                                 {
05318                                         // mark block as modified
05319                                         m_RFC_RAMData[BlockAdr * m_iRFC_DataBlockSize + m_iRFC_DataBlockSize-1] |= 0x02;
05320                                 }
05321                         }
05322                 }
05323                 break;
05324         }
05325 }
05326 #endif


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