INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

heartbeater.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef ORCAICE_HEARTBEATER_H
00012 #define ORCAICE_HEARTBEATER_H
00013 
00014 #include <orcaice/context.h>
00015 #include <gbxsickacfr/gbxiceutilacfr/timer.h>
00016 #include <string>
00017 
00018 namespace orcaice {
00019 
00025 class Heartbeater
00026 {
00027 
00028 public: 
00029     // we only need Tracer here, not the whole context
00030     Heartbeater( const orcaice::Context & context, double secBetweenHeartbeats = 10.0, double urgencyDivider=4.0 );
00031 
00033     bool isHeartbeatTime();
00034 
00036     bool isHeartbeatTimeUrgent();
00037 
00039     void beat( const std::string &heartbeatMessage );
00040 
00041 private: 
00042 
00043 //     orca::Time lastHeartbeatTime_;
00044     gbxiceutilacfr::Timer timer_;
00045 
00046     double secBetweenHeartbeats_;
00047     double urgencyDivider_;
00048 
00049     gbxutilacfr::Tracer& tracer_;
00050 };
00051 
00052 }
00053 
00054 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5