InterfaceConfig.cpp
Go to the documentation of this file.
00001 /*-------------------------------------------------------
00002 |                                                       |
00003 |                  InterfaceConfig.cpp                  |
00004 |                                                       |
00005 ---------------------------------------------------------
00006 
00007 Copyright  2007         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   : info@feig.de
00014                                                 Internet : http://www.feig.de
00015                                         
00016 Author                  :       Benjamin Stadin
00017 Begin                   :       15.12.2006
00018 
00019 Version                 :       01.00.00 / 11.01.2007 / Benjamin Stadin
00020 
00021 Operation Systems       :       Linux
00022 */
00023 
00024 #include <cstdlib>
00025 #include <iostream>
00026 #include <fstream>
00027 #include <map>
00028 #include <string>
00029 #include <string.h>
00030 #include <sys/socket.h>
00031 #include <netinet/in.h>
00032 #include <arpa/inet.h>
00033 
00034 #include "../../../../fecom-lib/include/fecom.h"
00035 
00036 #include "InterfaceConfig.h"
00037 
00038 using namespace std; 
00039 
00040 //------------------------------------------------------------------------------
00041 // Name: InterfaceConfig()
00042 // Desc: constructor
00043 //------------------------------------------------------------------------------
00044 InterfaceConfig::InterfaceConfig()
00045 {
00046         m_iError = 0;
00047         m_ifSettings.init();
00048 }
00049 
00050 //------------------------------------------------------------------------------
00051 // Name: ~InterfaceConfig()
00052 // Desc: destructor
00053 //------------------------------------------------------------------------------
00054 InterfaceConfig::~InterfaceConfig()
00055 {
00056 }
00057 
00058 //------------------------------------------------------------------------------
00059 // Name: init()
00060 // Desc: sets default values to the config settings
00061 //------------------------------------------------------------------------------
00062 void InterfaceConfig::init()
00063 {
00064         m_ifSettings.init();
00065 }
00066 
00067 //------------------------------------------------------------------------------
00068 // Name: checkIfIPAddress(char *ip, int len)
00069 // Desc: returns 0 if a given IP address is a valid ipv4 address, otherwise -1
00070 //------------------------------------------------------------------------------
00071 int InterfaceConfig::checkIfIPAddress(char *ip, int len)
00072 {
00073         // Check if only digits
00074         for (int i=0; i<len; i++)
00075         {
00076                 if (ip[i] == '.')
00077                         continue;
00078                 if (!isdigit(ip[i]))
00079                         return -1;
00080         }
00081 
00082         in_addr a;      
00083         int t = inet_aton(ip, &a);
00084         if (t == 0)
00085                 return -1;
00086         
00087         return 0;
00088 }
00089 
00090 //------------------------------------------------------------------------------
00091 // Name: writeConfigToFile(char* fileName)
00092 // Desc: writes the configuration to a file (default is feconfig.dat)
00093 //------------------------------------------------------------------------------
00094 int InterfaceConfig::writeConfigToFile(char* fileName)
00095 {
00096         map<string, string> values;
00097         string var;
00098         char value[32] = {0};
00099         int ret = 0;
00100         
00101         sprintf(value, "%d", m_ifSettings.iCommMode);
00102         values["CommMode"] = value;
00103         
00104         values["Host"] = m_ifSettings.cHost;
00105         
00106         sprintf(value, "%d", m_ifSettings.iIpPort);
00107         values["IpPort"] = value; 
00108         
00109         sprintf(value, "%d", m_ifSettings.iComPortNumber);
00110         values["ComPortNumber"] = value;
00111         
00112         sprintf(value, "%d", m_ifSettings.iBaud);
00113         values["Baud"] = value;
00114         
00115         sprintf(value, "%d", m_ifSettings.iBusAddress);
00116         values["BusAddress"] = value;
00117         
00118         values["Frame"] =  m_ifSettings.cFrame;
00119         
00120         sprintf(value, "%d", m_ifSettings.iTimeout);
00121         values["Timeout"] = value;
00122 
00123         values["TxTimeControl"] = m_ifSettings.bTxTimeControl == true ? "1" : "0";
00124         
00125         sprintf(value, "%d", m_ifSettings.iTxDelayTime);
00126         values["TxDelayTime"] = value;
00127         
00128         sprintf(value, "%d", m_ifSettings.iCharTimeoutMpy);
00129         values["CharTimeoutMpy"] = value;
00130         
00131         values["Rts"] = m_ifSettings.bRts == true ? "1" : "0";
00132         values["Dtr"] = m_ifSettings.bDtr == true ? "1" : "0";
00133         
00134         ofstream cfgFile;
00135         cfgFile.open (fileName);
00136         if (cfgFile.is_open())
00137         {
00138                 map<string, string>::const_iterator iter;
00139                 for (iter=values.begin(); iter != values.end(); ++iter)
00140                 {
00141                         char configVar[32];
00142                         char configValue[32];
00143                         
00144                         strcpy(configVar, iter->first.data());
00145                         strcpy(configValue, iter->second.data());
00146                         
00147                         cfgFile << configVar << " " << configValue << endl;
00148                 }       
00149                 cfgFile.close();
00150         }
00151         else
00152                 ret = -1;
00153         
00154         return ret;
00155 }
00156 
00157 //------------------------------------------------------------------------------
00158 // Name: readConfigFromFile(char* fileName)
00159 // Desc: reads a configuration from file
00160 //------------------------------------------------------------------------------
00161 int InterfaceConfig::readConfigFromFile(char* fileName)
00162 {
00163         char configVar[64] = {0};
00164         char configValue[64] = {0};
00165         int ret = 0;
00166         
00167         m_ifSettings.init();
00168         
00169         ifstream cfgFile;
00170         cfgFile.open (fileName);
00171         if (cfgFile.is_open())
00172         {
00173                 int wordCount = 0;
00174                 while (cfgFile.good())
00175                 {                       
00176                         // read word / value pair
00177                         if (wordCount % 2 == 0)
00178                         {
00179                                 wordCount++;
00180                                 cfgFile >> configVar;
00181                                 continue;
00182                         }
00183                         else
00184                                 cfgFile >> configValue;
00185                                 
00186                         wordCount++;
00187                 
00188                         if (strcmp(configVar, "CommMode") == 0)
00189                         {
00190                                 int mode;
00191                                 mode = atoi(configValue);
00192                                 if (mode == 0 || mode == 1 || mode == 2)
00193                                         m_ifSettings.iCommMode = mode;
00194                         }
00195                         else if (strcmp(configVar, "Host") == 0)
00196                         {
00197                                 if (checkIfIPAddress(configValue, strlen(configValue)) == 0)
00198                                         strcpy(m_ifSettings.cHost, configValue);
00199                         }
00200                         else if (strcmp(configVar, "IpPort") == 0)
00201                         {
00202                                 int port;
00203                                 port = atoi(configValue);
00204                                 if (port >= 0)
00205                                         m_ifSettings.iIpPort = port;
00206                         }
00207                         else if (strcmp(configVar, "ComPortNumber") == 0)
00208                         {
00209                                 int comPort;
00210                                 comPort = atoi(configValue);
00211                                 if (comPort >= 1 && comPort <= 256)
00212                                         m_ifSettings.iComPortNumber = comPort;
00213                         }
00214                         else if (strcmp(configVar, "Baud") == 0)
00215                         {
00216                                 int baud;
00217                                 baud = atoi(configValue);
00218                                 if (baud > 0)
00219                                         m_ifSettings.iBaud = baud;
00220                         }
00221                         else if (strcmp(configVar, "BusAddress") == 0)
00222                         {
00223                                 int busAddress;
00224                                 busAddress = atoi(configValue);
00225                                 if (busAddress > 0 && busAddress < 256)
00226                                         m_ifSettings.iBusAddress = busAddress;
00227                         }                       
00228                         else if (strcmp(configVar, "Frame") == 0)
00229                         {
00230                                 strcpy(m_ifSettings.cFrame, configValue);
00231                         }
00232                         else if (strcmp(configVar, "Timeout") == 0)
00233                         {
00234                                 int timeout;
00235                                 timeout = atoi(configValue);
00236                                 if (timeout >= 0)
00237                                         m_ifSettings.iTimeout = timeout;
00238                         }
00239                         else if (strcmp(configVar, "TxTimeControl") == 0)
00240                         {
00241                                 int timeCtrl;
00242                                 timeCtrl = atoi(configValue);
00243                                 if (timeCtrl == 1)
00244                                         m_ifSettings.bTxTimeControl = true;
00245                                 else
00246                                         m_ifSettings.bTxTimeControl = false;
00247                         }
00248                         else if (strcmp(configVar, "CharTimeoutMpy") == 0)
00249                         {
00250                                 int timeoutMpy;
00251                                 timeoutMpy = atoi(configValue);
00252                                 if (timeoutMpy >= 0)
00253                                         m_ifSettings.iCharTimeoutMpy = timeoutMpy;
00254                         }
00255                         else if (strcmp(configVar, "Rts") == 0)
00256                         {
00257                                 int rts;
00258                                 rts = atoi(configValue);
00259                                 if (rts == 1)
00260                                         m_ifSettings.bRts = true;
00261                                 else
00262                                         m_ifSettings.bRts = false;
00263                         }
00264                         else if (strcmp(configVar, "Dtr") == 0)
00265                         {
00266                                 int dtr;
00267                                 dtr = atoi(configValue);
00268                                 if (dtr == 1)
00269                                         m_ifSettings.bDtr = true;
00270                                 else
00271                                         m_ifSettings.bDtr = false;
00272                         }
00273                 }
00274                 cfgFile.close();
00275         }
00276         else
00277                 ret = -1; // Not fatal, file doesn't exist yet
00278         
00279         return ret;
00280 }
00281 
00282 //------------------------------------------------------------------------------
00283 // Name: getComPorts()
00284 // Desc: writes all available com ports to a given array of int pointers
00285 //------------------------------------------------------------------------------
00286 int InterfaceConfig::getComPorts(int* comPorts) 
00287 {
00288         int count = 0;
00289         
00290         for (int port = 1; port <= 256; port++)
00291         {
00292                 if (0 == FECOM_DetectPort(port))
00293                 {
00294                         comPorts[count] = port;
00295                         count++;
00296                 }
00297         }
00298 
00299         return count;
00300 }
00301 
00302 //------------------------------------------------------------------------------
00303 // Name: setComPortConfiguration(int portHandle) 
00304 // Desc: sets the com port configuration from the config settings
00305 //------------------------------------------------------------------------------
00306 int InterfaceConfig::setComPortConfiguration(int portHandle) 
00307 {
00308         char str[256];
00309 
00310         sprintf(str, "%d", m_ifSettings.iBaud);
00311         m_iError = FECOM_SetPortPara(portHandle, "Baud", str);
00312         if (m_iError < 0) 
00313                 return m_iError;
00314         
00315         m_iError = FECOM_SetPortPara(portHandle, "Frame", m_ifSettings.cFrame);
00316         if (m_iError < 0) 
00317                 return m_iError;
00318 
00319         sprintf(str, "%d", m_ifSettings.iTimeout);
00320         m_iError = FECOM_SetPortPara(portHandle, "Timeout", str);
00321         if (m_iError < 0) 
00322                 return m_iError;
00323         
00324         if (m_ifSettings.bTxTimeControl) {
00325                 m_iError = FECOM_SetPortPara(portHandle, "TxTimeControl", "1");
00326         }
00327         else {
00328                 m_iError = FECOM_SetPortPara(portHandle, "TxTimeControl", "0");
00329         }
00330         if (m_iError < 0) 
00331                 return m_iError;
00332 
00333         if (m_ifSettings.bDtr) {
00334                 m_iError = FECOM_DoPortCmd(portHandle, "SetDTR", "ON");
00335         }
00336         else {
00337                 m_iError = FECOM_DoPortCmd(portHandle, "SetDTR", "OFF");
00338         }
00339         if (m_iError < 0) 
00340                 return m_iError;
00341 
00342         if (m_ifSettings.bRts) {
00343                 m_iError = FECOM_DoPortCmd(portHandle, "SetRTS", "ON");
00344         }
00345         else {
00346                 m_iError = FECOM_DoPortCmd(portHandle, "SetRTS", "OFF");
00347         }
00348         if (m_iError < 0) 
00349                 return m_iError;
00350 
00351         sprintf(str, "%d", m_ifSettings.iTxDelayTime);
00352         m_iError = FECOM_SetPortPara(portHandle, "TxDelayTime", str);
00353         if (m_iError < 0) 
00354                 return m_iError;
00355 
00356         sprintf(str, "%d", m_ifSettings.iCharTimeoutMpy);
00357         m_iError = FECOM_SetPortPara(portHandle, "CharTimeoutMpy", str);
00358         if (m_iError < 0) 
00359                 return m_iError;
00360 
00361         return 0;
00362 }
00363 
00364 //------------------------------------------------------------------------------
00365 // Name: getComPortConfiguration(int portHandle) 
00366 // Desc: gets the port configuration and writes it to the config settings
00367 //------------------------------------------------------------------------------
00368 int InterfaceConfig::getComPortConfiguration(int portHandle) 
00369 {
00370         char str[256];
00371 
00372         m_iError = FECOM_GetPortPara(portHandle, "PortNr", str);
00373         if (m_iError < 0) 
00374                 return m_iError;
00375         m_ifSettings.iComPortNumber = atoi(str);
00376 
00377         m_iError = FECOM_GetPortPara(portHandle, "Baud", str);
00378         if (m_iError < 0) 
00379                 return m_iError;
00380         m_ifSettings.iBaud = atoi(str);
00381 
00382         m_iError = FECOM_GetPortPara(portHandle, "Frame", str);
00383         if (m_iError < 0) 
00384                 return m_iError;
00385         strcpy(m_ifSettings.cFrame, str);
00386         
00387         m_iError = FECOM_GetPortPara(portHandle, "Timeout", str);
00388         if (m_iError < 0) 
00389                 return m_iError;
00390         m_ifSettings.iTimeout = atoi(str);
00391 
00392         m_iError = FECOM_GetPortPara(portHandle, "TxTimeControl", str);
00393         if (m_iError < 0) 
00394                 return m_iError;
00395         if (strcmp(str, "1") == 0) {
00396                 m_ifSettings.bTxTimeControl = true;
00397         }
00398         else {
00399                 m_ifSettings.bTxTimeControl = false;
00400         }
00401 
00402         m_iError = FECOM_GetPortPara(portHandle, "GetDTR", str);
00403         if (m_iError < 0) 
00404                 return m_iError;
00405         if (strcmp(str,"ON")==0) {
00406                 m_ifSettings.bDtr = true;
00407         }
00408         else {
00409                 m_ifSettings.bDtr = false;
00410         }
00411 
00412         m_iError = FECOM_GetPortPara(portHandle, "GetRTS", str);
00413         if (m_iError < 0) 
00414                 return m_iError;
00415         if (strcmp(str,"ON")==0) {
00416                 m_ifSettings.bRts = true;
00417         }
00418         else {
00419                 m_ifSettings.bRts = false;
00420         }
00421 
00422         m_iError = FECOM_GetPortPara(portHandle, "TxDelayTime", str);
00423         if (m_iError < 0) 
00424                 return m_iError;
00425         m_ifSettings.iTxDelayTime = atoi(str);
00426 
00427         m_iError = FECOM_GetPortPara(portHandle, "CharTimeoutMpy", str);
00428         if (m_iError < 0) 
00429                 return m_iError;
00430         m_ifSettings.iCharTimeoutMpy = atoi(str);
00431 
00432         return 0;
00433 }
00434 
00435 //------------------------------------------------------------------------------
00436 // Name: getLastError() 
00437 // Desc: get last error
00438 //------------------------------------------------------------------------------
00439 int InterfaceConfig::getLastError() 
00440 {
00441         return m_iError;
00442 }
00443 
00444 //------------------------------------------------------------------------------
00445 // Name: setCommMode(int iCommMode) 
00446 // Desc: saves the communication mode (com, usb, tcp)
00447 //------------------------------------------------------------------------------
00448 void InterfaceConfig::setCommMode(int iCommMode) 
00449 {
00450         m_ifSettings.iCommMode = iCommMode;
00451 }
00452 
00453 //------------------------------------------------------------------------------
00454 // Name: getCommMode() 
00455 // Desc: gets the communication mode that was used te last time
00456 //------------------------------------------------------------------------------
00457 int InterfaceConfig::getCommMode() 
00458 {
00459         return m_ifSettings.iCommMode;
00460 }
00461 
00462 //------------------------------------------------------------------------------
00463 // Name: setHost(char* host) 
00464 // Desc: writes the host name to the config settings
00465 //------------------------------------------------------------------------------
00466 void InterfaceConfig::setHost(char* host) 
00467 {
00468         if (checkIfIPAddress(host, strlen(host)) == 0)
00469         {
00470                 memset(m_ifSettings.cHost, 0, sizeof(m_ifSettings.cHost));
00471                 strcpy(m_ifSettings.cHost, host);
00472         }
00473 }
00474 
00475 //------------------------------------------------------------------------------
00476 // Name: getHost() 
00477 // Desc: returns the host name from the settings
00478 //------------------------------------------------------------------------------
00479 char* InterfaceConfig::getHost() 
00480 {
00481         return m_ifSettings.cHost;
00482 }
00483 
00484 //------------------------------------------------------------------------------
00485 // Name: setIPPort(int ipPort) 
00486 // Desc: sets the IP port
00487 //------------------------------------------------------------------------------
00488 void InterfaceConfig::setIPPort(int ipPort) 
00489 {
00490         if (ipPort > 65536 || ipPort < 0)
00491                 return;
00492         m_ifSettings.iIpPort = ipPort;
00493 }
00494 
00495 //------------------------------------------------------------------------------
00496 // Name: getIPPort() 
00497 // Desc: gets the IP port
00498 //------------------------------------------------------------------------------
00499 int InterfaceConfig::getIPPort() 
00500 {
00501         return m_ifSettings.iIpPort;
00502 }
00503 
00504 //------------------------------------------------------------------------------
00505 // Name: setComPortNumber(int comPortNumber) 
00506 // Desc: sets the com port number
00507 //------------------------------------------------------------------------------
00508 void InterfaceConfig::setComPortNumber(int comPortNumber) 
00509 {
00510         m_ifSettings.iComPortNumber = comPortNumber;
00511 }
00512 
00513 //------------------------------------------------------------------------------
00514 // Name: getComPortNumber() 
00515 // Desc: gets the com port number that was used the last time
00516 //------------------------------------------------------------------------------
00517 int InterfaceConfig::getComPortNumber() 
00518 {
00519         return m_ifSettings.iComPortNumber;
00520 }
00521         
00522 //------------------------------------------------------------------------------
00523 // Name: setBaud(int baud) 
00524 // Desc: saves the baud rate to the config settings
00525 //------------------------------------------------------------------------------
00526 void InterfaceConfig::setBaud(int baud) 
00527 {
00528         m_ifSettings.iBaud = baud;
00529 }
00530         
00531 //------------------------------------------------------------------------------
00532 // Name: getBaud() 
00533 // Desc: gets the baud rate from the settings
00534 //------------------------------------------------------------------------------
00535 int InterfaceConfig::getBaud() 
00536 {
00537         return m_ifSettings.iBaud;
00538 }
00539 
00540 //------------------------------------------------------------------------------
00541 // Name: setBusAddress(int address) 
00542 // Desc: saves the bus address to the config settings
00543 //------------------------------------------------------------------------------
00544 void InterfaceConfig::setBusAddress(int address)
00545 {
00546         m_ifSettings.iBusAddress = address;
00547 }
00548 
00549 //------------------------------------------------------------------------------
00550 // Name: getBusAddress() 
00551 // Desc: gets the bus address from the settings
00552 //------------------------------------------------------------------------------
00553 int InterfaceConfig::getBusAddress() 
00554 {
00555         return m_ifSettings.iBusAddress;
00556 }
00557         
00558 //------------------------------------------------------------------------------
00559 // Name: setFrame(char* frame) 
00560 // Desc: sets the serial port frame to the settings
00561 //------------------------------------------------------------------------------
00562 void InterfaceConfig::setFrame(char* frame) 
00563 {
00564         if (strlen(frame) > 0)
00565         {
00566                 memset(m_ifSettings.cFrame, 0, sizeof(m_ifSettings.cFrame));
00567                 strcpy(m_ifSettings.cFrame, frame);
00568         }
00569 }
00570 
00571 //------------------------------------------------------------------------------
00572 // Name: getFrame() 
00573 // Desc: gets the serial port frame from the settings
00574 //------------------------------------------------------------------------------
00575 char* InterfaceConfig::getFrame() 
00576 {
00577         return (char*)m_ifSettings.cFrame;
00578 }
00579         
00580 //------------------------------------------------------------------------------
00581 // Name: setTimeout(int timeout) 
00582 // Desc: sets the timeout
00583 //------------------------------------------------------------------------------
00584 void InterfaceConfig::setTimeout(int timeout) 
00585 {
00586         m_ifSettings.iTimeout = timeout;
00587 }
00588         
00589 //------------------------------------------------------------------------------
00590 // Name: getTimeout() 
00591 // Desc: gets the timeout
00592 //------------------------------------------------------------------------------
00593 int InterfaceConfig::getTimeout() 
00594 {
00595         return m_ifSettings.iTimeout;
00596 }
00597         
00598 //------------------------------------------------------------------------------
00599 // Name: setTxTimeControl(bool txTimeControl) 
00600 // Desc: sets the tx timecontrol for the com port
00601 //------------------------------------------------------------------------------
00602 void InterfaceConfig::setTxTimeControl(bool txTimeControl) 
00603 {
00604         m_ifSettings.bTxTimeControl = txTimeControl;
00605 }
00606         
00607 //------------------------------------------------------------------------------
00608 // Name: getTxTimeControl() 
00609 // Desc: gets the tx timecontrol for the com port
00610 //------------------------------------------------------------------------------
00611 bool InterfaceConfig::getTxTimeControl() 
00612 {
00613         return m_ifSettings.bTxTimeControl;
00614 }
00615         
00616 //------------------------------------------------------------------------------
00617 // Name: setTxDelayTime(int txDelayTime) 
00618 // Desc: sets the tx delay time for the com port
00619 //------------------------------------------------------------------------------
00620 void InterfaceConfig::setTxDelayTime(int txDelayTime) 
00621 {
00622         m_ifSettings.iTxDelayTime = txDelayTime;
00623 }
00624         
00625 //------------------------------------------------------------------------------
00626 // Name: getTxDelayTime() 
00627 // Desc: sets the tx delay time for the com port
00628 //------------------------------------------------------------------------------
00629 int InterfaceConfig::getTxDelayTime() 
00630 {
00631         return m_ifSettings.iTxDelayTime;
00632 }
00633         
00634 //------------------------------------------------------------------------------
00635 // Name: setCharTimeoutMpy(int charTimeoutMpy) 
00636 // Desc: sets the char timeout multiplier for the com port
00637 //------------------------------------------------------------------------------
00638 void InterfaceConfig::setCharTimeoutMpy(int charTimeoutMpy) 
00639 {
00640         m_ifSettings.iCharTimeoutMpy = charTimeoutMpy;
00641 }
00642         
00643 //------------------------------------------------------------------------------
00644 // Name: getCharTimeoutMpy() 
00645 // Desc: gets the char timeout multiplier for the com port
00646 //------------------------------------------------------------------------------
00647 int InterfaceConfig::getCharTimeoutMpy() 
00648 {
00649         return m_ifSettings.iCharTimeoutMpy;
00650 }
00651 
00652 //------------------------------------------------------------------------------
00653 // Name: setRTS(bool rts) 
00654 // Desc: sets Rts mode of com port on/off
00655 //------------------------------------------------------------------------------
00656 void InterfaceConfig::setRTS(bool rts) 
00657 {
00658         m_ifSettings.bRts = rts;
00659 }
00660         
00661 //------------------------------------------------------------------------------
00662 // Name: getRTS() 
00663 // Desc: sets Rts mode of com port on/off
00664 //------------------------------------------------------------------------------
00665 bool InterfaceConfig::getRTS() 
00666 {
00667         return m_ifSettings.bRts;
00668 }
00669 
00670 //------------------------------------------------------------------------------
00671 // Name: setDTR(bool dtr) 
00672 // Desc: sets the dtr mode of the com port on/off
00673 //------------------------------------------------------------------------------
00674 void InterfaceConfig::setDTR(bool dtr) 
00675 {
00676         m_ifSettings.bDtr = dtr;
00677 }
00678         
00679 //------------------------------------------------------------------------------
00680 // Name: getDTR() 
00681 // Desc: gets the dtr mode of the com port on/off
00682 //------------------------------------------------------------------------------
00683 bool InterfaceConfig::getDTR() 
00684 {
00685         return m_ifSettings.bDtr;
00686 }


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