Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
driver
src
sick_scan_config_internal.cpp
Go to the documentation of this file.
1
//
2
// Created by michael on 10/11/18.
3
//
4
5
#include "
sick_scan/sick_scan_config_internal.h
"
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
38
bool
SickScanConfigInternal::getBoolValue
(std::string key)
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::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
SickScanConfigInternal::getValue
std::string getValue(std::string key)
Definition:
sick_scan_config_internal.cpp:31
sick_scan_config_internal.h
SickScanConfigInternal::storedConfig
std::map< std::string, std::string > storedConfig
Definition:
sick_scan_config_internal.h:37
sick_scan
Author(s): Michael Lehning
, Jochen Sprickerhof
, Martin Günther
autogenerated on Wed May 5 2021 03:05:48