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/Sensors.h" 00015 //#include "Platform/Aperios1.3.2/TCPEndpoint.h" 00016 #include "Tools/Debugging/QueueFillRequest.h" 00017 00018 /** 00019 * @class Debug 00020 * 00021 * A process for collection and distribution of debug messages. 00022 * 00023 * All messages from the processes to the PC are collected here and all messages from the 00024 * PC to the processes are distributed by the Debug process. 00025 * 00026 * @author Martin Lötzsch 00027 */ 00028 class Debug : public Process 00029 { 00030 private: 00031 //DEBUGGING; 00032 EXTERNAL_DEBUGGING; 00033 RECEIVER(SensorDataBuffer); 00034 DEBUG_RECEIVER(Cognition); 00035 DEBUG_RECEIVER(Motion); 00036 DEBUG_SENDER(Cognition); 00037 DEBUG_SENDER(Motion); 00038 00039 public: 00040 00041 /** Constructor */ 00042 Debug(); 00043 00044 /** Destructor */ 00045 ~Debug(); 00046 00047 /** The main function of the process */ 00048 int main(); 00049 00050 /** Is called before the first main() */ 00051 virtual void init(); 00052 00053 /** 00054 * Is called for every incoming debug message. 00055 * @param message the message to handle 00056 * @return if the message was handled 00057 */ 00058 virtual bool handleMessage(InMessage& message); 00059 00060 /** 00061 * The QueueFillMode for the outgoing Queue 00062 */ 00063 QueueFillRequest::QueueFillMode mode; 00064 00065 /** 00066 * The time when the outgoing queue is written to the stick or allowed to be accessed via wlan 00067 */ 00068 unsigned long saveOrSendTime; 00069 00070 private: 00071 /** If true, a message was received from the WLan or OVirtualRobotComm */ 00072 bool messageWasReceived; 00073 }; 00074 00075 #endif // __Debug_h_
1.3.6