sick_scan_config_internal.cpp
Go to the documentation of this file.
00001 //
00002 // Created by michael on 10/11/18.
00003 //
00004 
00005 #include "sick_scan/sick_scan_config_internal.h"
00006 #include <string>
00007 #include <map>
00008 void SickScanConfigInternal::setValue(std::string key, std::string val)
00009 {
00010       storedConfig[key] = val;
00011 
00012 }
00013 
00014 
00015 void SickScanConfigInternal::setValue(std::string key, bool val)
00016   {
00017   std::string valStr;
00018   if (val == true)
00019   {
00020     valStr = "True";
00021   }
00022   else
00023   {
00024     valStr = "False";
00025   }
00026   storedConfig[key] = valStr;
00027 
00028   }
00029 
00030 std::string SickScanConfigInternal::getValue(std::string key)
00031 {
00032   std::string tmp;
00033   tmp = storedConfig[key];
00034   return tmp;
00035 }
00036 
00037 bool SickScanConfigInternal::getBoolValue(std::string key)
00038 {
00039   bool retVal = false;
00040   std::string tmp;
00041   tmp = storedConfig[key];
00042   if (tmp.size()>0)
00043   {
00044     if ((tmp[0] == 't') || (tmp[0] == 'T'))
00045     {
00046       retVal = false;
00047     }
00048 
00049   }
00050   return(retVal);
00051 }


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Tue Jul 9 2019 05:05:35