Fast Research Interface Library  Manual and Documentation
include/DataLogging.h
Go to the documentation of this file.
00001 //  ---------------------- Doxygen info ----------------------
00050 //  ----------------------------------------------------------
00051 //   For a convenient reading of this file's source code,
00052 //   please use a tab width of four characters.
00053 //  ----------------------------------------------------------
00054 
00055 
00056 #ifndef __DataLogging__
00057 #define __DataLogging__
00058 
00059 
00060 #include <stdio.h>
00061 #include <stdlib.h>
00062 #include <errno.h>
00063 #include <friComm.h>
00064 
00065 
00066 //  ---------------------- Doxygen info ----------------------
00146 //  ----------------------------------------------------------
00147 class DataLogging
00148 {
00149 public:
00150 
00151 //  ---------------------- Doxygen info ----------------------
00183 //  ----------------------------------------------------------
00184     DataLogging(    const char          *RobotName
00185                 ,   const char          *LoggingPath
00186                 ,   const char          *LoggingFileName
00187                 ,   const unsigned int  &MaxNumberOfEntries);
00188 
00189 
00190 //  ---------------------- Doxygen info ----------------------
00204 //  ----------------------------------------------------------
00205     ~DataLogging(void);
00206 
00207 
00208 //  ---------------------- Doxygen info ----------------------
00244 //  ----------------------------------------------------------
00245     int PrepareLogging(     const unsigned int  &ControlScheme
00246                         ,   const char          *FileIdentifier = NULL);
00247 
00248 
00249 //  ---------------------- Doxygen info ----------------------
00275 //  ----------------------------------------------------------
00276     void AddEntry(      const tFriMsrData       &ReceivedFRIData
00277                     ,   const tFriCmdData       &SentFRIData        );
00278 
00279 
00280 
00281 //  ---------------------- Doxygen info ----------------------
00307 //  ----------------------------------------------------------
00308     int WriteToFile(void);
00309 
00310 protected:
00311 
00312 
00313 //  ---------------------- Doxygen info ----------------------
00318 //  ----------------------------------------------------------
00319     enum ObjectState
00320     {
00321         PrepareLoggingCalled    =   1,
00322         WriteToFileCalled       =   2
00323     };
00324 
00325 
00326 //  ---------------------- Doxygen info ----------------------
00331 //  ----------------------------------------------------------
00332     ObjectState         CurrentObjectState;
00333 
00334 
00335 //  ---------------------- Doxygen info ----------------------
00340 //  ----------------------------------------------------------
00341     char                *MachineName;
00342 
00343 
00344 //  ---------------------- Doxygen info ----------------------
00349 //  ----------------------------------------------------------
00350     char                *OutputPath;
00351 
00352 
00353 //  ---------------------- Doxygen info ----------------------
00358 //  ----------------------------------------------------------
00359     char                *OutputFileName;
00360 
00361 
00362 //  ---------------------- Doxygen info ----------------------
00367 //  ----------------------------------------------------------
00368     char                *CompleteOutputFileString;
00369 
00370 
00371 //  ---------------------- Doxygen info ----------------------
00376 //  ----------------------------------------------------------
00377     unsigned int        MaximumNumberOfEntries;
00378 
00379 
00380 //  ---------------------- Doxygen info ----------------------
00391 //  ----------------------------------------------------------
00392     unsigned int        OutputCounter;
00393 
00394 
00395 //  ---------------------- Doxygen info ----------------------
00403 //  ----------------------------------------------------------
00404     unsigned int        CurrentControlScheme;
00405 
00406 
00407 //  ---------------------- Doxygen info ----------------------
00412 //  ----------------------------------------------------------
00413     float               **LoggingMemory;
00414 
00415 
00416 //  ---------------------- Doxygen info ----------------------
00421 //  ----------------------------------------------------------
00422     FILE*               OutputFileHandler;
00423 
00424 };  // class DataLogging
00425 
00426 #endif
This document was generated with Doxygen on Thu Apr 12 2012 11:18:53. User documentation of the Fast Research Interface Library for the KUKA Lightweight Robot IV by the Stanford Robotics Research Group. Copyright 2010–2012.