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

# Tools/MessageQueue/MessageIDs.h

Go to the documentation of this file.

    00001 /**
    00002 * @file MessageIDs.h
    00003 *
    00004 * Declaration of ids for debug messages.
    00005 *
    00006 * @author Martin Lötzsch
    00007 */
    00008
    00009 #ifndef __MessageIDs_h_
    00010 #define __MessageIDs_h_
    00011
    00012
    00013 /**
    00014 * IDs for debug messages
    00015 *
    00016 * To distinguish debug messages, they all have an id.
    00017 */
    00018 enum MessageID
    00019 {
    00020   undefined = 0, /*!< undefined message type */
    00021
    00022     idText, /*!< the message contains plain unstructured text */
    00023
    00024     // percepts, models
    00025     idSensorData = 3, /*!< the message is SensorData */
    00026     idPercepts = 8, /*!< the message contains percepts (see macro SEND_PERCEPTS) */
    00027     idSpecialPercept, /*!< the message is a SpecialPercept */
    00028     idWorldState, /*!< the message contains the world state (see macro SEND_WORLDSTATE) */
    00029     idOracledWorldState, /*!< the message is an oracled WorldState */
    00030     idGTCamWorldState,   /*!< the message is a GTCam WorldState */
    00031     idRemoteCamWorldState, /*!< the message is a WorldState from the remote camera */
    00032
    00033     // images
    00034     idLowResImage = 2, /*!< the message is an old image (this should be id 2 for compatibility with old logfiles) */
    00035     idJPEGImage = 37, /*!< the message is a JPEGImage */ ////////////////////////////////////
    00036     idImage, /*!< the message is an Image (see macro SEND_IMAGE) */
    00037
    00038     idDebugImage, /*!< the message is a debug image (see macro SEND_DEBUG_IMAGE) */
    00039     idDebugColorClassImage, /*!< the message is a debug color class image (see macro SEND_DEBUG_COLOR_CLASS_IMAGE) */
    00040
    00041
    00042     // debugging
    00043     idDebugKeyTable, /*!< the message is a DebugKeyTable */
    00044     idQueueFillRequest, /*!< the message is a QueueFillRequest */
    00045     idGenericDebugData, /*!< data/parameters used for debugging and parameter optimization */
    00046     idSolutionRequest, /*!< the message is a SolutionRequest */
    00047     idDebugDrawing, /*!< the message is a DebugDrawing */
    00048     idDebugDrawing2, /*!< the message is a DebugDrawing */
    00049     idDebugDrawingFinished, /*!< the message is a DebugDrawing */
    00050     idStopwatch, /*!< the message contains stopwatch data */
    00051     idHistogram, /*!< contains a histogram */
    00052     idSyncTimestampRobot, /*!< contains the robots system time on time synchronization with remote cam */
    00053     idSyncTimestampRemoteCam, /*!< contains the remote-cam-servers system time on time synchronization with the robot */
    00054
    00055
    00056     // motion
    00057     idMotionRequest, /*!< the message is a MotionRequest */
    00058     idOdometryData, /*!< the message is OdometryData */
    00059     idJointData, /*!< the message is a JointData */
    00060     idJointDataSequence, /*!< the message is a JointDataSequence */
    00061     idHeadMotionRequest, /*!< the message is a HeadMotionRequest */
    00062     idHeadControlMode, /*!< the message is a HeadControlMode */
    00063     idFourierCoefficients,     /*!< the message contains a set of fourier coefficients */
    00064     idLEDRequest, /*!< the message is a LEDRequest */
    00065     idInvKinWalkingParameters, /*!< the message contains parameters for the InvKinWalkingEngine */
    00066     idYetAnotherInvKinParams, /*!< contains a parameters for an inv kin engine */
    00067     idYetAnotherInvKinPaws, /*!< contains a parameters for the paws positions of an inv kin engine */
    00068     idMotionInfo, /*!< the message is the MotionInfo including the executed MotionRequest */
    00069     idBodyPosture, /*!< the message is the a BodyPosture */
    00070     idPIDData, /*!< The message is a PIDData */
    00071     idJoystickData, /*!< the message is a JoystickData */
    00072     idSoundRequest, /*!< The message is a SoundRequest */
    00073     idGT2004Parameters, /*!< the message contains UDParameters set for the UDWalkingEngine */
    00074     idGT2004EvolutionRequest, /*!< the message contains a request like 'current individual to measure is #7' */
    00075     idMotionNet, /*!< The message contains a complete motion net for the special actions */
    00076     idOdometryScale, /*!< the message is the generic debug data for odoemtry scale. */
    00077     idMotionRatingBehaviorMessage, /*!< the message is a MotionRatingBehavior debug message */
    00078
    00079     // configuration
    00080     idCameraParameters, /*!< the message is CameraParameters */
    00081     idColorTable64, /*!< the message is a ColorTable64 */
    00082     idGameSpeed, /*! the message contains a desired game speed */
    00083     idMotionControlSlowMotion, /*! the message contains a number configuring the times MotionControl is run within Motion */
    00084     idBodyOffsets, /*!< the message is the generic debug data for body offsets. */
    00085     idImageProcessorParameters, /*!< parameters for the image processor. */
    00086
    00087     //behavior
    00088     idXabsl2DebugRequest, /*!< the message is a Xabsl2DebugRequest */
    00089     idXabsl2DebugMessage, /*!< the message contains a debug message from the Xabsl2BehaviorControl */
    00090     idXabsl2IntermediateCode, /*!< intermediate code for a Xabsl2BehaviorControl */
    00091     idKickSelectionTable, /*!< A KickSelectionTable */
    00092     idKickRecord, /*!< the message contains information about a kick performed and the resulting ball position */
    00093     idGlobalGameControlData, /*!< the message is a GlobalGameControlData */
    00094     idGameControlData, /*!< the message is a GameControlData */
    00095
    00096     //perception
    00097     idBallPercept, /*!<  contains the ballpercept from the cognition process*/
    00098     idCollisionPercept, /*!<  contains the collision percept from the cognition process*/
    00099     idLandmarksPercept, /*!<  contains the landmarks percept from the cognition process*/
    00100     idLinesPercept, /*!<  contains the lines percept from the cognition process*/
    00101     idEdgesPercept, /*!<  contains the edges percept from the cognition process*/
    00102     idObstaclesPercept, /*!<  contains the obstacles percept from the cognition process*/
    00103     idPlayersPercept, /*!<  contains the players percept from the cognition process*/
    00104     idColorTableCuboids, /*!< contains a colorTableCuboids */
    00105     idColorTableReferenceColor, /*!< contains a colorTableReferenceColor */
    00106     idColorTableTSL, /*!< the message is a ColorTableTSL */
    00107
    00108     //modelling
    00109     idRobotPose,
    00110     idBallModel,
    00111     idLinesSelfLocatorParameters,
    00112     idGT2004BallLocatorData, /*!< settings for Kalman Ball Locator Filter */
    00113     idDDDSelfLocatorParameters,
    00114
    00115     //BEGIN ATH
    00116     idPerceptOracle = 120, /*!< the message is a percept oracle */
    00117     idDebugDrawing3, /*!< the message is a DebugDrawing */
    00118     idDebugRequest, /*!< contains a debug request */
    00119     idDebugResponse, /*!< contains a debug response */
    00120     idStreamSpecification, /*!<  contains the specification of streamable objects held by the StreamHandler */
    00121     idATH2005SLInfo, /*!< The message contains special date from the ATH2005 SelfLocator */
    00122     idBehaviorEvolutionPopulation, /*!< The message contains a population of behavior parameters */
    00123     idBehaviorEvolutionParameters, /*!< The message contains parameters for the evolution of behavior*/
    00124     idBehaviorEvolutionCurrentIndividual,
    00125     idMessageForRobotControl,
    00126     idModuleSolutionTable,
    00127     idDrawingManager, /*!<  contains the specification of streamable objects held by the StreamHandler */
    00128     idDebugDataResponse,
    00129     idDebugDataChangeRequest,
    00130     idProcessBegin,
    00131     idProcessFinished,
    00132     idJPEGImage2,
    00133
    00134     idGT2005BallLocator1 = 150,
    00135     idGT2005BallLocator2,
    00136     idGT2005TeamBallLocator,
    00137     idComboBallLocator,
    00138     //****for GT2005WalkingEngine****
    00139     idGT2005Request, // for GT2005 Walking Engine
    00140     idGT2005DebugData,
    00141
    00142     idGTCamKalmanBallFilter,   // Tuning parameters
    00143     idMSHBallLocatorEvolution,
    00144     idDebugGrayScaleImage,
    00145     idTestFun,
    00146     idDebugJPEGImage,
    00147     idDebugJPEGImage2,
    00148     idCameraMatrix,
    00149
    00150     numOfMessageIDs /*!< the number of message ids */
    00151 };
    00152
    00153 #ifdef USE_GETMESSAGEIDNAME
    00154 /** returns names for message ids */
    00155 static const char* getMessageIDName(MessageID id)
    00156 {
    00157   switch (id)
    00158   {
    00159   case undefined: return "undefined";
    00160   case idText: return "Text";
    00161
    00162   // images
    00163   case idImage: return "Image";
    00164   case idLowResImage: return "LowResImage";
    00165   case idDebugImage: return "DebugImage";
    00166   case idDebugColorClassImage: return "DebugColorClassImage";
    00167   case idDebugGrayScaleImage: return "DebugGrayScaleImage";
    00168   case idDebugJPEGImage: return "idDebugJPEGImage";
    00169   case idDebugJPEGImage2: return "idDebugJPEGImage2";
    00170   case idCameraMatrix: return "idCameraMatrix";
    00171
    00172   // percepts"; models
    00173   case idSensorData: return "SensorData";
    00174   case idPercepts: return "Percepts";
    00175   case idSpecialPercept: return "SpecialPercept";
    00176   case idWorldState: return "WorldState";
    00177   case idOracledWorldState: return "OracledWorldState";
    00178   case idRemoteCamWorldState: return "RemoteCamWorldState";
    00179   case idMotionRequest: return "MotionRequest";
    00180
    00181   // motion
    00182   case idOdometryData: return "OdometryData";
    00183   case idJointData: return "JointData";
    00184   case idJointDataSequence: return "JointDataSequence";
    00185   case idHeadMotionRequest: return "HeadMotionRequest";
    00186   case idHeadControlMode: return "HeadControlMode";
    00187   case idFourierCoefficients: return "FourierCoefficients";
    00188   case idLEDRequest: return "LEDRequest";
    00189   case idInvKinWalkingParameters: return "InvKinWalkingParameters";
    00190   case idMotionInfo: return "MotionInfo";
    00191   case idPIDData: return "PidData";
    00192   case idJoystickData: return "JoystickData";
    00193   case idSoundRequest: return "SoundRequest";
    00194   case idMotionRatingBehaviorMessage: return "idMotionRatingBehaviorMessage";
    00195
    00196   // debugging
    00197   case idGenericDebugData: return "GenericDebugData";
    00198   case idDebugKeyTable: return "DebugKeyTable";
    00199   case idSolutionRequest: return "SolutionRequest";
    00200   case idDebugDrawing: return "DebugDrawing";
    00201   case idDebugDrawing2: return "DebugDrawing2";
    00202   case idDebugDrawing3: return "DebugDrawing3";
    00203   case idDebugDrawingFinished: return "DebugDrawingFinished";
    00204   case idQueueFillRequest: return "QueueFillRequest";
    00205   case idStopwatch: return "Stopwatch";
    00206   case idHistogram: return "Histogram";
    00207   case idSyncTimestampRobot: return "SyncTimestampRobot";
    00208   case idSyncTimestampRemoteCam: return "SyncTimestampRemoteCam";
    00209   case idDebugRequest: return "DebugRequest";
    00210   case idDebugResponse: return "DebugResponse";
    00211   case idGTCamWorldState: return "GTCamWorldState";
    00212   case idStreamSpecification: return "StreamSpecification";
    00213   case idBallPercept: return "BallPercept";
    00214   case idCollisionPercept: return "CollisionPercept";
    00215 //****for GT2005WalkingEngine****
    00216   case idGT2005Request: return "idGT2005Request";
    00217   case idGT2005DebugData: return "idGT2005DebugData";
    00218
    00219   // configuration
    00220   case idCameraParameters: return "CameraParameters";
    00221   case idColorTable64: return "ColorTable64";
    00222   case idGameSpeed: return "GameSpeed";
    00223   case idMotionControlSlowMotion: return "MotionControlSlowMotion";
    00224   case idBodyOffsets: return "BodyOffsets";
    00225   case idImageProcessorParameters: return "ImageProcessorParameters";
    00226
    00227   //////////////////////////////////////////////////////////////////////
    00228   case idJPEGImage: return "JPEGImage";
    00229   case idJPEGImage2: return "JPEGImage2";
    00230   //////////////////////////////////////////////////////////////////////
    00231
    00232   case idGlobalGameControlData: return "GlobalGameControlData";
    00233   case idGameControlData: return "GameControlData";
    00234
    00235   case idXabsl2DebugRequest: return "Xabsl2DebugRequest";
    00236   case idXabsl2DebugMessage: return "Xabsl2DebugMessage";
    00237   case idXabsl2IntermediateCode: return "Xabsl2IntermediateCode";
    00238   case idKickRecord: return "KickRecord";
    00239
    00240   case idLinesSelfLocatorParameters: return "LinesSelfLocatorParameters";
    00241   case idColorTableCuboids: return "ColorTableCuboids";
    00242   case idColorTableReferenceColor: return "ColorTableReferenceColor";
    00243   case idColorTableTSL: return "ColorTableTSL";
    00244
    00245   case idGT2004Parameters: return "GT2004Parameters";
    00246   case idGT2004EvolutionRequest: return "UDEvolutionRequest";
    00247   case idMotionNet: return "MotionNet";
    00248
    00249   case idKickSelectionTable: return "KickSelectionTable";
    00250   case idGT2004BallLocatorData: return "KalmanData";
    00251   case idDDDSelfLocatorParameters: return "DDDSelfLocatorParameters";
    00252
    00253   case idGT2005BallLocator1: return "GT2005BallLocator1";
    00254   case idGT2005BallLocator2: return "GT2005BallLocator2";
    00255
    00256   case idGT2005TeamBallLocator: return "GT2005TeamBallLocator";
    00257
    00258   case idComboBallLocator: return "ComboBallLocator";
    00259
    00260   case idGTCamKalmanBallFilter: return "gtCamKalmanBallFilter";
    00261
    00262   case idATH2005SLInfo: return "idATH2005SLInfo";
    00263   case idBehaviorEvolutionPopulation: return "idBehaviorEvolutionPopulation";
    00264   case idBehaviorEvolutionParameters: return "idBehaviorEvolutionParameters";
    00265   case idBehaviorEvolutionCurrentIndividual: return "idBehaviorEvolutionCurrentIndividual";
    00266
    00267   case idMSHBallLocatorEvolution: return "idMSHBallLocatorEvolution";
    00268   case idMessageForRobotControl: return "idMessageForRobotControl";
    00269   case idModuleSolutionTable: return "idModuleSolutionTable";
    00270   case idDrawingManager: return "idDrawingManager";
    00271   case idBallModel: return "idBallModel";
    00272   case idRobotPose: return "idRobotPose";
    00273   case idDebugDataResponse: return "idDebugDataResponse";
    00274   case idDebugDataChangeRequest: return "idDebugDataChangeRequest";
    00275   case idProcessFinished: return "idProcessFinished";
    00276   case idProcessBegin: return "idProcessBegin";
    00277
    00278   default: return "unknown";
    00279   }
    00280 }
    00281 #endif
    00282
    00283 /** Composes the idImage message into a message queue */
    00284 #define SEND_IMAGE(i,cm) static_cast<Image&>(i) << static_cast<CameraMatrix&>(cm)
    00285 /** Receives the idImage message from a message queue */
    00286 #define RECEIVE_IMAGE(i,cm) static_cast<Image&>(i) >> static_cast<CameraMatrix&>(cm)
    00287
    00288 /** Composes the idPercepts message into a message queue */
    00289 #define SEND_PERCEPTS(rp,cm,ci,ballp,lmp,lnsp,ep,plp,op,psdp,cp) \
    00290   static_cast<RobotPose&>(rp) << static_cast<CameraMatrix&>(cm) << static_cast<CameraInfo&>(ci) << static_cast<BallPercept&>(ballp) \
    00291   << static_cast<LandmarksPercept&>(lmp) << static_cast<LinesPercept&>(lnsp) << static_cast<EdgesPercept&>(ep) << static_cast<PlayersPercept&>(plp) << static_cast<ObstaclesPercept&>(op) << static_cast<PSDPercept&>(psdp) << static_cast<CollisionPercept&>(cp)
    00292 /** Receives the idPercepts message from a message queue */
    00293 #define RECEIVE_PERCEPTS(rp,cm,ci,ballp,lmp,lnsp,ep,plp,op,psdp,cp) \
    00294   static_cast<RobotPose&>(rp) >> static_cast<CameraMatrix&>(cm) >> static_cast<CameraInfo&>(ci) >> static_cast<BallPercept&>(ballp) \
    00295   >> static_cast<LandmarksPercept&>(lmp) >> static_cast<LinesPercept&>(lnsp) >> static_cast<EdgesPercept&>(ep) >> static_cast<PlayersPercept&>(plp) >> static_cast<ObstaclesPercept&>(op) >> static_cast<PSDPercept&>(psdp) >> static_cast<CollisionPercept&>(cp)
    00296
    00297 /** Composes the idWorldState message into a message queue */
    00298 #define SEND_WORLD_STATE(rp,bp,ppc,om,rs,cm,ci) static_cast<RobotPose&>(rp) \
    00299   << static_cast<BallModel&>(bp) << static_cast<PlayerPoseCollection&>(ppc) << static_cast<ObstaclesModel&>(om) << static_cast<RobotState&>(rs) << static_cast<CameraMatrix&>(cm) << static_cast<CameraInfo&>(ci)
    00300 /** Receives the idWorldState message from a message queue */
    00301 #define RECEIVE_WORLDSTATE(rp,bp,ppc,om,rs,cm,ci) static_cast<RobotPose&>(rp) \
    00302   >> static_cast<BallModel&>(bp) >> static_cast<PlayerPoseCollection&>(ppc) >> static_cast<ObstaclesModel&>(om) >> static_cast<RobotState&>(rs) >> static_cast<CameraMatrix&>(cm) >> static_cast<CameraInfo&>(ci)
    00303
    00304 #endif //__MessageIDs_h_