40 #ifndef DIAGNOSTICMESSAGEWRAPPER_HH
41 #define DIAGNOSTICMESSAGEWRAPPER_HH
77 void summary(
unsigned char lvl,
const std::string
s)
104 if ((lvl>0) && (level>0))
110 else if (lvl > level)
141 void mergeSummaryf(
unsigned char lvl,
const char *format, ...)
145 va_start(va, format);
146 if (vsnprintf(buff, 1000, format, va) >= 1000)
147 ROS_DEBUG(
"Really long string in DiagnosticStatusWrapper::addf, it was truncated.");
148 std::string value = std::string(buff);
164 void summaryf(
unsigned char lvl,
const char *format, ...)
168 va_start(va, format);
169 if (vsnprintf(buff, 1000, format, va) >= 1000)
170 ROS_DEBUG(
"Really long string in DiagnosticStatusWrapper::addf, it was truncated.");
171 std::string value = std::string(buff);
205 void add(
const std::string &key,
const T &val)
207 std::stringstream ss;
209 std::string sval = ss.str();
221 void addf(
const std::string &key,
const char *format, ...);
236 inline void DiagnosticStatusWrapper::add<std::string>(
const std::string &key,
const std::string &
s)
246 inline void DiagnosticStatusWrapper::add<bool>(
const std::string &key,
const bool &b)
250 ds.
value = b ?
"True" :
"False";
261 va_start(va, format);
262 if (vsnprintf(buff, 1000, format, va) >= 1000)
263 ROS_DEBUG(
"Really long string in DiagnosticStatusWrapper::addf, it was truncated.");
264 std::string value = std::string(buff);