Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ProfilerCheckControl.ccGo to the documentation of this file.00001 #include "ControlBase.h" 00002 #include "Shared/Profiler.h" 00003 #include "Wireless/Socket.h" 00004 00005 //! causes the WorldState::mainProfile and WorldState::motionProfile to display reports to #sout 00006 class ProfilerCheckControl : public ControlBase { 00007 public: 00008 //! Constructor 00009 ProfilerCheckControl() : ControlBase("Profiler Check","Reports time spent in all of the profiled sections in all processes") {} 00010 00011 //! Prints a report to sout 00012 virtual ControlBase * activate(MC_ID, Socket *) { 00013 sout->printf("~~~ Main: ~~~\n%s\n",mainProfiler==NULL?"Main profile unavailable":mainProfiler->report().c_str()); 00014 sout->printf("~~~ Motion: ~~~\n%s\n",motionProfiler==NULL?"Motion profile unavailable":motionProfiler->report().c_str()); 00015 sout->printf("~~~ Sound: ~~~\n%s\n",soundProfiler==NULL?"Sound profile unavailable":soundProfiler->report().c_str()); 00016 return NULL; 00017 } 00018 }; 00019 00020 REGISTER_CONTROL(ProfilerCheckControl,"Status Reports"); 00021 00022 /*! @file 00023 * @brief Defines ProfilerCheckControl, which causes the WorldState::mainProfile and WorldState::motionProfile to display reports to #sout 00024 * @author ejt (Creator) 00025 */ |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:58:49 2016 by Doxygen 1.6.3 |