orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
snapshotlogger.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 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 ORCA_LOGGER_SNAPSHOT_LOGGER_H 00012 #define ORCA_LOGGER_SNAPSHOT_LOGGER_H 00013 00014 #include <orcalog/logwriterinfo.h> 00015 #include <orcalog/masterfilewriter.h> 00016 00017 namespace orcalog 00018 { 00019 00022 class SnapshotLogger { 00023 public: 00024 virtual ~SnapshotLogger() {} 00025 00026 // format is any string. timeWindowSec is the length of history 00027 // that will be logged in a snapshot. 00028 virtual void init( const std::string &format, double timeWindowSec )=0; 00029 virtual void subscribe( orcaice::Context &context, const std::string &interfaceTag )=0; 00030 00031 // Call these before and after taking the snapshot 00032 virtual void prepareForSnapshot( const LogWriterInfo &logWriterInfo, 00033 MasterFileWriter &masterFileWriter ) = 0; 00034 // This is always safe to call, even if prepareForSnapshot() hasn't been called. 00035 virtual void finaliseSnapshot()=0; 00036 00037 // Call these during snapshotting 00038 virtual uint snapshotBufferSize() const=0; 00039 virtual const orca::Time &oldestArrivalTime() const=0; 00040 virtual void writeOldestObjToLogAndDiscard()=0; 00041 }; 00042 00043 } 00044 00045 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)