|
From: <rob...@us...> - 2009-08-14 05:13:07
|
Revision: 21859
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=21859&view=rev
Author: rob_wheeler
Date: 2009-08-14 04:55:44 +0000 (Fri, 14 Aug 2009)
Log Message:
-----------
Add a method to clear the DiagnosticStatus values in DiagnosticStatusWrapper.
Clear old values when reusing DiagnosticStatusWrapper.
Modified Paths:
--------------
pkg/trunk/stacks/hardware_test/diagnostic_updater/include/diagnostic_updater/DiagnosticStatusWrapper.h
pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ek1122.cpp
pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg014.cpp
pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp
Modified: pkg/trunk/stacks/hardware_test/diagnostic_updater/include/diagnostic_updater/DiagnosticStatusWrapper.h
===================================================================
--- pkg/trunk/stacks/hardware_test/diagnostic_updater/include/diagnostic_updater/DiagnosticStatusWrapper.h 2009-08-14 04:44:42 UTC (rev 21858)
+++ pkg/trunk/stacks/hardware_test/diagnostic_updater/include/diagnostic_updater/DiagnosticStatusWrapper.h 2009-08-14 04:55:44 UTC (rev 21859)
@@ -113,6 +113,11 @@
}
void addf(const std::string &key, const char *format, ...); // In practice format will always be a char *
+
+ void clear()
+ {
+ values.clear();
+ }
};
template<>
Modified: pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ek1122.cpp
===================================================================
--- pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ek1122.cpp 2009-08-14 04:44:42 UTC (rev 21858)
+++ pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/ek1122.cpp 2009-08-14 04:55:44 UTC (rev 21859)
@@ -66,5 +66,6 @@
snprintf(serial, sizeof(serial), "%d-%05d-%05d", sh_->get_product_code()/ 100000 , sh_->get_product_code() % 100000, sh_->get_serial());
d.hardware_id = serial;
+ d.clear();
d.addf("Product code", "EK1122 (%u)", sh_->get_product_code());
}
Modified: pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg014.cpp
===================================================================
--- pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg014.cpp 2009-08-14 04:44:42 UTC (rev 21858)
+++ pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg014.cpp 2009-08-14 04:55:44 UTC (rev 21859)
@@ -67,6 +67,7 @@
snprintf(serial, sizeof(serial), "%d-%05d-%05d", sh_->get_product_code()/ 100000 , sh_->get_product_code() % 100000, sh_->get_serial());
d.hardware_id = serial;
+ d.clear();
d.addf("Product code", "WG014 (%d)", sh_->get_product_code());
d.addf("Serial Number", "%s", serial);
}
Modified: pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp
===================================================================
--- pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp 2009-08-14 04:44:42 UTC (rev 21858)
+++ pkg/trunk/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp 2009-08-14 04:55:44 UTC (rev 21859)
@@ -877,6 +877,7 @@
d.hardware_id = serial;
d.level = level_;
+ d.clear();
d.add("Configuration", config_info_.configuration_status_ ? "good" : "error loading configuration");
d.add("Name", actuator_info_.name_);
d.addf("Position", "%02d", sh_->get_ring_position());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|