sick_scan_config_internal.cpp
Go to the documentation of this file.
1 //
2 // Created by michael on 10/11/18.
3 //
4 
6 #include <string>
7 #include <map>
8 
9 void SickScanConfigInternal::setValue(std::string key, std::string val)
10 {
11  storedConfig[key] = val;
12 
13 }
14 
15 
16 void SickScanConfigInternal::setValue(std::string key, bool val)
17 {
18  std::string valStr;
19  if (val == true)
20  {
21  valStr = "True";
22  }
23  else
24  {
25  valStr = "False";
26  }
27  storedConfig[key] = valStr;
28 
29 }
30 
31 std::string SickScanConfigInternal::getValue(std::string key)
32 {
33  std::string tmp;
34  tmp = storedConfig[key];
35  return tmp;
36 }
37 
39 {
40  bool retVal = false;
41  std::string tmp;
42  tmp = storedConfig[key];
43  if (tmp.size() > 0)
44  {
45  if ((tmp[0] == 't') || (tmp[0] == 'T'))
46  {
47  retVal = false;
48  }
49 
50  }
51  return (retVal);
52 }
SickScanConfigInternal::storedConfig
std::map< std::string, std::string > storedConfig
Definition: sick_scan_config_internal.h:37
SickScanConfigInternal::getValue
std::string getValue(std::string key)
Definition: sick_scan_config_internal.cpp:31
SickScanConfigInternal::getBoolValue
bool getBoolValue(std::string key)
Definition: sick_scan_config_internal.cpp:38
SickScanConfigInternal::setValue
void setValue(std::string key, std::string val)
Definition: sick_scan_config_internal.cpp:9
sick_scan_config_internal.h


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Thu Sep 8 2022 02:30:19