/usr/include/urg/UrgUtils.h is in liburg0-dev 0.8.18-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #ifndef QRK_URG_UTILS_H
#define QRK_URG_UTILS_H
/*!
\file
\brief Utility functions of URG
\author Satofumi KAMIMURA
$Id: UrgUtils.h 1715 2010-02-21 21:03:13Z satofumi $
*/
#include <cstdlib>
namespace qrk
{
/*!
\brief Get serial ID
\param[in] urg urg object
\retval >= serial id
\retval <0 error
*/
template <class T>
long urgSerialId(T* urg)
{
std::vector<std::string> version_lines;
if (! urg->versionLines(version_lines)) {
return -1;
}
if (version_lines.size() < 5) {
return -1;
}
std::string& serial_line = version_lines[4];
if (serial_line.size() < 7) {
return -1;
}
return atol(serial_line.substr(6).c_str());
}
}
#endif /* !QRK_URG_UTILS_H */
|