00001 /** 00002 * @file Processes/CMD/Debug.h 00003 * 00004 * Declaration of class Debug. 00005 * 00006 * @author Martin Lötzsch 00007 */ 00008 00009 #ifndef __Debug_h_ 00010 #define __Debug_h_ 00011 00012 #include "Tools/Process.h" 00013 #include "Platform/TCPHandler.h" 00014 //#include "Platform/Aperios1.3.2/TCPEndpoint.h" 00015 #include "Tools/Debugging/QueueFillRequest.h" 00016 00017 /** 00018 * @class Debug 00019 * 00020 * A process for collection and distribution of debug messages. 00021 * 00022 * All messages from the processes to the PC are collected here and all messages from the 00023 * PC to the processes are distributed by the Debug process. 00024 * 00025 * @author Martin Lötzsch 00026 */ 00027 class Debug : public Process 00028 { 00029 private: 00030 //DEBUGGING; 00031 EXTERNAL_DEBUGGING; 00032 DEBUG_RECEIVER(Cognition); 00033 DEBUG_RECEIVER(Motion); 00034 DEBUG_SENDER(Cognition); 00035 DEBUG_SENDER(Motion); 00036 00037 public: 00038 00039 /** Constructor */ 00040 Debug(); 00041 00042 /** Destructor */ 00043 ~Debug(); 00044 00045 /** The main function of the process */ 00046 int main(); 00047 00048 /** Is called before the first main() */ 00049 virtual void init(); 00050 00051 /** 00052 * Is called for every incoming debug message. 00053 * @param message the message to handle 00054 * @return if the message was handled 00055 */ 00056 virtual bool handleMessage(InMessage& message); 00057 00058 /** 00059 * The QueueFillMode for the outgoing Queue 00060 */ 00061 QueueFillRequest::QueueFillMode mode; 00062 00063 /** 00064 * The time when the outgoing queue is written to the stick or allowed to be accessed via wlan 00065 */ 00066 unsigned long saveOrSendTime; 00067 00068 private: 00069 /** If true, a message was received from the WLan or OVirtualRobotComm */ 00070 bool messageWasReceived; 00071 }; 00072 00073 #endif // __Debug_h_ 00074 00075 /* 00076 * Change log : 00077 * 00078 * $Log: Debug.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.4 2004/02/24 13:30:20 kindler 00083 * - requests.dat is now only read once, and is no longer held open. 00084 * 00085 * Revision 1.3 2004/01/03 19:15:17 wachter 00086 * Debug-communication without router working now 00087 * 00088 * Revision 1.2 2003/11/29 07:40:19 roefer 00089 * Doxygen comments corrected 00090 * 00091 * Revision 1.1 2003/10/07 10:07:01 cvsadm 00092 * Created GT2004 (M.J.) 00093 * 00094 * Revision 1.2 2003/09/26 11:41:17 juengel 00095 * - sorted tools 00096 * - clean-up in DataTypes 00097 * 00098 * Revision 1.1.1.1 2003/07/02 09:40:25 cvsadm 00099 * created new repository for the competitions in Padova from the 00100 * tamara CVS (Tuesday 2:00 pm) 00101 * 00102 * removed unused solutions 00103 * 00104 * Revision 1.7 2003/01/21 15:35:18 loetzsch 00105 * on the robot messages now are only sent if a message was received from the PC 00106 * 00107 * Revision 1.6 2003/01/10 15:48:20 loetzsch 00108 * added a hack that does not send any messages to the WLan or OVirtualRobotComm 00109 * in the first 5 seconds after the first execution of main() 00110 * 00111 * Revision 1.5 2002/11/27 13:50:27 dueffert 00112 * QueueFillMode beautified 00113 * 00114 * Revision 1.4 2002/11/25 12:27:15 dueffert 00115 * first steps towards reading growing files 00116 * 00117 * Revision 1.3 2002/11/19 12:57:54 dueffert 00118 * queuefillrequest added, debugkey toolbar extended, memorystick toolbar removed 00119 * 00120 * Revision 1.2 2002/11/18 10:35:05 juengel 00121 * Added "block debug sender" mechanism 00122 * 00123 * Revision 1.1 2002/09/10 15:41:25 cvsadm 00124 * Created new project GT2003 (M.L.) 00125 * - Cleaned up the /Src/DataTypes directory 00126 * - Removed challenge related source code 00127 * - Removed processing of incoming audio data 00128 * - Renamed AcousticMessage to SoundRequest 00129 * - Removed all process layouts 00130 * - Added process layout CMD 00131 * 00132 * Revision 1.3 2002/07/23 13:40:51 loetzsch 00133 * - new streaming classes 00134 * - removed many #include statements 00135 * - new design of debugging architecture 00136 * - exchanged StaticQueue with MessageQueue 00137 * - new debug message handling 00138 * - general clean up 00139 * 00140 * Revision 1.2 2002/05/16 22:36:11 roefer 00141 * Team communication and GTMath bugs fixed 00142 * 00143 * Revision 1.12 2002/04/10 11:09:19 piepenstock 00144 * added platform dependable SerialComm-Files 00145 * 00146 * Revision 1.11 2002/03/27 12:58:12 piepenstock 00147 * Added serial communication support 00148 * 00149 * Revision 1.10 2002/02/05 20:02:16 risler 00150 * handleDebugMessage now returns bool, added debug message handling to ImageProcessor 00151 * 00152 * Revision 1.9 2002/01/30 17:29:56 loetzsch 00153 * handleDebugMessage um Parameter timestamp erweitert 00154 * 00155 * Revision 1.8 2001/12/20 17:14:35 loetzsch 00156 * Using debug requests from the memory stick. 00157 * 00158 * Revision 1.7 2001/12/15 20:32:09 roefer 00159 * Senders and receivers are now part of the processes 00160 * 00161 * Revision 1.6 2001/12/14 12:34:09 dueffert 00162 * no message 00163 * 00164 * Revision 1.5 2001/12/12 18:08:56 loetzsch 00165 * Streaming- Operatoren für Bilder eingebaut, DebugKeyTable nicht- statisch gemacht, Debuggin Mechanismen weitergemacht, Bilder aus Logfiles in RobotControl anzeigen, Logfiles in HU1/Debug auf den Stick schreiben 00166 * 00167 * Revision 1.4 2001/12/10 17:47:08 risler 00168 * change log added 00169 * 00170 */