#include <utils.h>
class Utils implements utility functions for SIM Localization.
Definition at line 120 of file test/emulator/include/sick_scan/utils.h.
◆ flattenString()
void sick_scan_xd::Utils::flattenString |
( |
std::string & |
s | ) |
|
|
static |
Shortcut to replace linefeeds by colon-separators
Definition at line 128 of file utils.cpp.
◆ flattenToString() [1/4]
◆ flattenToString() [2/4]
◆ flattenToString() [3/4]
◆ flattenToString() [4/4]
template<typename T >
static std::string sick_scan_xd::Utils::flattenToString |
( |
const T & |
x | ) |
|
|
inlinestatic |
◆ identicalByStream() [1/4]
Compares two SickLocColaTelegramMsg by streaming them to strings. Returns true, if string representation of x and y is identical, otherwise false. The message headers with timestamp and frame_id are ignored.
Definition at line 263 of file test/emulator/include/sick_scan/utils.h.
◆ identicalByStream() [2/4]
Compares two SickLocResultPortTelegramMsgs by streaming them to strings. Returns true, if string representation of x and y is identical, otherwise false. The message headers with timestamp and frame_id are ignored.
Definition at line 244 of file test/emulator/include/sick_scan/utils.h.
◆ identicalByStream() [3/4]
template<typename T >
static bool sick_scan_xd::Utils::identicalByStream |
( |
const std::vector< T > & |
x, |
|
|
const std::vector< T > & |
y |
|
) |
| |
|
inlinestatic |
◆ identicalByStream() [4/4]
template<typename T >
static bool sick_scan_xd::Utils::identicalByStream |
( |
const T & |
x, |
|
|
const T & |
y |
|
) |
| |
|
inlinestatic |
◆ normalizeAngle()
static double sick_scan_xd::Utils::normalizeAngle |
( |
double |
angle | ) |
|
|
inlinestatic |
Returns the normalized angle, i.e. the angle in the range -PI to +PI.
- Parameters
-
[in] | angle | angle in radians |
- Returns
- normalized angle in radians
Definition at line 273 of file test/emulator/include/sick_scan/utils.h.
◆ replaceAll()
void sick_scan_xd::Utils::replaceAll |
( |
std::string & |
str, |
|
|
const std::string & |
from, |
|
|
const std::string & |
to |
|
) |
| |
|
static |
◆ splitSpaces()
std::vector< std::string > sick_scan_xd::Utils::splitSpaces |
( |
const std::string & |
s | ) |
|
|
static |
Splits a string into its space separated substrings
Definition at line 139 of file utils.cpp.
◆ toAsciiString()
std::string sick_scan_xd::Utils::toAsciiString |
( |
const uint8_t * |
binary_data, |
|
|
int |
length |
|
) |
| |
|
static |
Converts and returns binary data to ascii string with non-ascii data represented as "\x<hexvalue>"
- Parameters
-
[in] | binary_data | binary input data |
- Returns
- hex string
Definition at line 86 of file utils.cpp.
◆ toHexString()
std::string sick_scan_xd::Utils::toHexString |
( |
const std::vector< uint8_t > & |
binary_data | ) |
|
|
static |
Converts and returns binary data to hex string
- Parameters
-
[in] | binary_data | binary input data |
- Returns
- hex string
Definition at line 69 of file utils.cpp.
The documentation for this class was generated from the following files: