Note: This tutorial assumes that you have completed the previous tutorials: Introduction to Sigslots, Relaying Signals.
(!) Please ask about problems and questions regarding this tutorial on Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Debugging Sigslots

Description: Tools to help debug sigslots problems.

Keywords: ecl sigslots

Tutorial Level: INTERMEDIATE

Often you may wish to see what is actually connected. This can be done by calling the SigSlotsManager<T>::printStatistics() function. Note that there is a manager for each templatised family of sigslots (i.e. SigSlotsManager<>, SigSlotsManager<int>). Some example code:

   1 A a;
   2 Signal<> sig_void;
   4 Slot<> slot_void0(g);
   5 Slot<> slot_void1(&A::g,a);
   7 sig_void.connect("void_test");
   8 slot_void0.connect("void_test");
   9 slot_void1.connect("void_test");
  11 sig_void.emit();
  12 ecl::SigSlotsManager<>::printStatistics();

would output:

   1   Topics
   2     Name: void_test
   3     # Subscribers: 2
   4     # Publishers : 1

Wiki: ecl_sigslots/Tutorials/Debugging Sigslots (last edited 2012-01-28 08:19:32 by DanielStonier)