Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Processes/CMD/Logger.h

Go to the documentation of this file.
00001 /** 
00002 * @file Logger.h
00003 * 
00004 * Declaration of class Logger.
00005 *
00006 * @author Max Risler
00007 */
00008 
00009 #ifndef __Logger_h_
00010 #define __Logger_h_
00011 
00012 #include "Tools/Process.h"
00013 #include "Tools/Debugging/QueueFillRequest.h"
00014 
00015 #include "Platform/Sensors.h"
00016 
00017 /**
00018 * @class Logger
00019 * 
00020 * A process for logging sensor data.
00021 *
00022 * Messages from the PC are processed and sensor data can be sent to the PC or saved
00023 * to the stick.
00024 *
00025 * @author Max Risler
00026 */
00027 class Logger : public Process, public Sensors
00028 {
00029 private:
00030   DEBUGGING;
00031   RECEIVER(SensorDataBuffer);
00032 
00033 public:
00034   /** Constructor */
00035   Logger();
00036 
00037   /** Destructor */
00038   ~Logger();
00039   
00040   /** The main function of the process */
00041   int main();
00042 
00043   /** Is called before the first main() */
00044   virtual void init();
00045 
00046   /** 
00047   * Is called for every incoming debug message.
00048   * @param message the message to handle
00049   * @return if the message was handled
00050   */
00051   virtual bool handleMessage(InMessage& message);
00052 
00053   /**
00054   * The QueueFillMode for the outgoing Queue
00055   */
00056   QueueFillRequest::QueueFillMode mode;
00057   
00058   /**
00059   * The time when the outgoing queue is written to the stick or allowed to be accessed via wlan
00060   */
00061   unsigned long saveOrSendTime;
00062 
00063 private:
00064   /**
00065   * this is used to read messages from a file called requests.dat
00066   */
00067   InBinaryFile* fin;
00068 
00069   /** If true, a message was received from the WLan or OVirtualRobotComm */
00070   bool messageWasReceived;
00071 };
00072 
00073 #endif // __Logger_h_
00074 
00075 /*
00076  * Change log :
00077  * 
00078  * $Log: Logger.h,v $
00079  * Revision 1.1.1.1  2004/05/22 17:24:57  cvsadm
00080  * created new repository GT2004_WM
00081  *
00082  * Revision 1.1  2003/10/07 10:07:01  cvsadm
00083  * Created GT2004 (M.J.)
00084  *
00085  * Revision 1.2  2003/09/26 11:41:17  juengel
00086  * - sorted tools
00087  * - clean-up in DataTypes
00088  *
00089  * Revision 1.1  2003/07/24 13:33:15  risler
00090  * new process logger
00091  *
00092  */

Generated on Thu Sep 23 19:57:35 2004 for GT2004 by doxygen 1.3.6