From 06baa6c156dba0be37a21bddee96994a2c44f5bd Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 23 Mar 2013 12:27:37 +0100 Subject: digital/io-hub/src/apbirthday: add chrono --- digital/io-hub/src/apbirthday/robot.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'digital/io-hub/src/apbirthday/robot.hh') diff --git a/digital/io-hub/src/apbirthday/robot.hh b/digital/io-hub/src/apbirthday/robot.hh index 1c6af976..08cb9cf6 100644 --- a/digital/io-hub/src/apbirthday/robot.hh +++ b/digital/io-hub/src/apbirthday/robot.hh @@ -26,6 +26,7 @@ #include "hardware.hh" #include "asserv.hh" #include "fsm_queue.hh" +#include "chrono.hh" #include "ucoolib/base/proto/proto.hh" @@ -41,6 +42,8 @@ class Robot : public ucoo::Proto::Handler bool fsm_gen_event (); /// Receive proto messages. void proto_handle (ucoo::Proto &proto, char cmd, const uint8_t *args, int size); + /// Send stats. + void proto_stats (); public: /// Public access to hardware class. Hardware hardware; @@ -56,6 +59,15 @@ class Robot : public ucoo::Proto::Handler public: /// Public access to deferred events FSM queue. FsmQueue fsm_queue; + /// Public access to chrono. + Chrono chrono; + private: + /// Proto used for stats. + ucoo::Proto *stats_proto_; + /// Enable chrono stats. + bool stats_chrono_; + /// Last stated second. + int stats_chrono_last_s_; }; /// Global instance pointer. -- cgit v1.2.3