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
|
masterfilewriter.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_ORCALOG_MASTER_FILE_WRITER_H 00012 #define ORCA_ORCALOG_MASTER_FILE_WRITER_H 00013 00014 #include <IceUtil/Mutex.h> 00015 #include <orcaice/context.h> 00016 #include <orca/orca.h> 00017 00018 namespace orcalog 00019 { 00020 00026 class MasterFileWriter 00027 { 00028 public: 00029 MasterFileWriter( const std::string &filename, 00030 const orcaice::Context &context ); 00031 ~MasterFileWriter(); 00032 00034 int loggerCount() const; 00035 00040 int addLog( const std::string &filename, 00041 const std::string &interfaceType, 00042 const std::string &encodingType, 00043 const std::string &comment ); 00044 00046 void notifyOfLogfileAddition( int loggerId, 00047 int indexInSubLogfile, 00048 const orca::Time &arrivalTime ); 00049 00050 private: 00051 00052 std::ofstream* file_; 00053 00054 // use this to assign unique ID's to loggers. 00055 int numLoggers_; 00056 // use this for feedback at the end of the run. 00057 int numItemsLogged_; 00058 00059 bool isStarted_; 00060 00061 orcaice::Context context_; 00062 00063 IceUtil::Mutex mutex_; 00064 }; 00065 00066 } 00067 00068 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)