# PrettyDebEx.cc

Go to the documentation of this file.

    00001 // ----------------------------------------------------------------------------
    00002 // CERTI - HLA RunTime Infrastructure
    00003 // Copyright (C) 2002, 2003  ONERA
    00004 //
    00005 // This file is part of CERTI-libCERTI
    00006 //
    00007 // CERTI-libCERTI is free software ; you can redistribute it and/or
    00008 // modify it under the terms of the GNU Lesser General Public License
    00009 // as published by the Free Software Foundation ; either version 2 of
    00010 // the License, or (at your option) any later version.
    00011 //
    00012 // CERTI-libCERTI is distributed in the hope that it will be useful, but
    00013 // WITHOUT ANY WARRANTY ; without even the implied warranty of
    00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    00015 // Lesser General Public License for more details.
    00016 //
    00017 // You should have received a copy of the GNU Lesser General Public
    00018 // License along with this program ; if not, write to the Free Software
    00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    00020 // USA
    00021 //
    00022 // $Id: PrettyDebEx.cc,v 4.6 2008/11/20 18:21:56 approx Exp $
    00023 // ----------------------------------------------------------------------------
    00024
    00025
    00026 #include "PrettyDebug.hh"
    00027 #include "Message.hh"
    00028 #include "NetworkMessage.hh"
    00029
    00030 #include <stdlib.h>
    00031 #include <stdarg.h>
    00032 #include <iostream>
    00033 #include <cstring>
    00034 #ifdef _WIN32
    00035     #include <time.h>
    00036 #else
    00037     #include <sys/types.h>
    00038     #include <sys/time.h>
    00039     #include <unistd.h>
    00040     #include <string>
    00041 #endif
    00042
    00043 using std::cout ;
    00044 using std::cerr ;
    00045 using std::endl ;
    00046
    00047 #ifndef NDEBUG
    00048
    00049 //***************************************************************************************
    00050 //type: 'M' Message
    00051 //type: 'N' NetWork Message
    00052 void PrettyDebug::Mes(pdDebugLevel Level, const char type, const short testMess, const char *context)
    00053 {
    00054 char theMessage[100];
    00055
    00056 DebugOStream* theOutputStreamPtr = Level_Map[Level];
    00057 if (theOutputStreamPtr == PrettyDebug::nullOutputStreamPtr) return; //----------------->>
    00058
    00059 strcpy(theMessage,context);
    00060
    00061 if (type == 'M')
    00062     {
    00063
    00064     switch (testMess)
    00065         {
    00066         case certi::Message::CLOSE_CONNEXION : strcat(theMessage,"CLOSE_CONNEXION"); break;
    00067         case certi::Message::CREATE_FEDERATION_EXECUTION :                          strcat(theMessage,"CREATE_FEDERATION_EXECUTION"); break;
    00068         case certi::Message::DESTROY_FEDERATION_EXECUTION :                     strcat(theMessage,"DESTROY_FEDERATION_EXECUTION"); break;
    00069         case certi::Message::JOIN_FEDERATION_EXECUTION :                            strcat(theMessage,"JOIN_FEDERATION_EXECUTION"); break;
    00070         case certi::Message::RESIGN_FEDERATION_EXECUTION :                          strcat(theMessage,"RESIGN_FEDERATION_EXECUTION"); break;
    00071         case certi::Message::REGISTER_FEDERATION_SYNCHRONIZATION_POINT :        strcat(theMessage,"REGISTER_FEDERATION_SYNCHRONIZATION_POINT"); break;
    00072         case certi::Message::SYNCHRONIZATION_POINT_REGISTRATION_FAILED :        strcat(theMessage,"SYNCHRONIZATION_POINT_REGISTRATION_FAILED"); break;
    00073         case certi::Message::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED : strcat(theMessage,"SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED"); break;
    00074         case certi::Message::ANNOUNCE_SYNCHRONIZATION_POINT :                       strcat(theMessage,"ANNOUNCE_SYNCHRONIZATION_POINT"); break;
    00075         case certi::Message::SYNCHRONIZATION_POINT_ACHIEVED :                       strcat(theMessage,"SYNCHRONIZATION_POINT_ACHIEVED"); break;
    00076         case certi::Message::FEDERATION_SYNCHRONIZED :                              strcat(theMessage,"FEDERATION_SYNCHRONIZED"); break;
    00077         case certi::Message::REQUEST_FEDERATION_SAVE :                              strcat(theMessage,"REQUEST_FEDERATION_SAVE"); break;
    00078         case certi::Message::INITIATE_FEDERATE_SAVE :                               strcat(theMessage,"INITIATE_FEDERATE_SAVE"); break;
    00079         case certi::Message::FEDERATE_SAVE_BEGUN :                                  strcat(theMessage,"FEDERATE_SAVE_BEGUN"); break;
    00080         case certi::Message::FEDERATE_SAVE_COMPLETE :                               strcat(theMessage,"FEDERATE_SAVE_COMPLETE"); break;
    00081         case certi::Message::FEDERATE_SAVE_NOT_COMPLETE :                           strcat(theMessage,"FEDERATE_SAVE_COMPLETE"); break;
    00082         case certi::Message::FEDERATION_SAVED :                                     strcat(theMessage,"FEDERATION_SAVED"); break;
    00083         case certi::Message::FEDERATION_NOT_SAVED :                                 strcat(theMessage,"FEDERATION_NOT_SAVED"); break;
    00084         case certi::Message::REQUEST_FEDERATION_RESTORE :                           strcat(theMessage,"REQUEST_FEDERATION_RESTORE"); break;
    00085         case certi::Message::REQUEST_FEDERATION_RESTORE_FAILED :                    strcat(theMessage,"REQUEST_FEDERATION_RESTORE_FAILED"); break;
    00086         case certi::Message::REQUEST_FEDERATION_RESTORE_SUCCEEDED :             strcat(theMessage,"REQUEST_FEDERATION_RESTORE_SUCCEEDED"); break;
    00087         case certi::Message::INITIATE_FEDERATE_RESTORE :                            strcat(theMessage,"INITIATE_FEDERATE_RESTORE"); break;
    00088         case certi::Message::FEDERATE_RESTORE_COMPLETE :                            strcat(theMessage,"FEDERATE_RESTORE_COMPLETE"); break;
    00089         case certi::Message::FEDERATE_RESTORE_NOT_COMPLETE :                        strcat(theMessage,"FEDERATE_RESTORE_NOT_COMPLETE"); break;
    00090         case certi::Message::FEDERATION_RESTORED :                                  strcat(theMessage,"FEDERATION_RESTORED"); break;
    00091         case certi::Message::FEDERATION_NOT_RESTORED :                              strcat(theMessage,"FEDERATION_NOT_RESTORED"); break;
    00092         case certi::Message::FEDERATION_RESTORE_BEGUN :                             strcat(theMessage,"FEDERATION_RESTORE_BEGUN"); break;
    00093
    00094         case certi::Message::PUBLISH_OBJECT_CLASS :                                 strcat(theMessage,"PUBLISH_OBJECT_CLASS"); break;
    00095         case certi::Message::UNPUBLISH_OBJECT_CLASS :                               strcat(theMessage,"UNPUBLISH_OBJECT_CLASS"); break;
    00096         case certi::Message::PUBLISH_INTERACTION_CLASS :                            strcat(theMessage,"PUBLISH_INTERACTION_CLASS"); break;
    00097         case certi::Message::UNPUBLISH_INTERACTION_CLASS :                          strcat(theMessage,"UNPUBLISH_INTERACTION_CLASS"); break;
    00098         case certi::Message::SUBSCRIBE_OBJECT_CLASS_ATTRIBUTES :                    strcat(theMessage,"SUBSCRIBE_OBJECT_CLASS_ATTRIBUTES"); break;
    00099         case certi::Message::UNSUBSCRIBE_OBJECT_CLASS :                             strcat(theMessage,"UNSUBSCRIBE_OBJECT_CLASS"); break;
    00100         case certi::Message::SUBSCRIBE_INTERACTION_CLASS :                          strcat(theMessage,"SUBSCRIBE_INTERACTION_CLASS"); break;
    00101         case certi::Message::UNSUBSCRIBE_INTERACTION_CLASS :                        strcat(theMessage,"UNSUBSCRIBE_INTERACTION_CLASS"); break;
    00102         case certi::Message::START_REGISTRATION_FOR_OBJECT_CLASS :              strcat(theMessage,"START_REGISTRATION_FOR_OBJECT_CLASS"); break;
    00103         case certi::Message::STOP_REGISTRATION_FOR_OBJECT_CLASS :               strcat(theMessage,"STOP_REGISTRATION_FOR_OBJECT_CLASS"); break;
    00104         case certi::Message::TURN_INTERACTIONS_ON :                                 strcat(theMessage,"TURN_INTERACTIONS_ON"); break;
    00105         case certi::Message::TURN_INTERACTIONS_OFF :                                    strcat(theMessage,"TURN_INTERACTIONS_OFF"); break;
    00106
    00107         case certi::Message::REGISTER_OBJECT_INSTANCE :                             strcat(theMessage,"REGISTER_OBJECT_INSTANCE"); break;
    00108         case certi::Message::UPDATE_ATTRIBUTE_VALUES :                              strcat(theMessage,"UPDATE_ATTRIBUTE_VALUES"); break;
    00109         case certi::Message::DISCOVER_OBJECT_INSTANCE :                             strcat(theMessage,"DISCOVER_OBJECT_INSTANCE"); break;
    00110         case certi::Message::REFLECT_ATTRIBUTE_VALUES :                             strcat(theMessage,"REFLECT_ATTRIBUTE_VALUES"); break;
    00111         case certi::Message::SEND_INTERACTION :                                     strcat(theMessage,"SEND_INTERACTION"); break;
    00112         case certi::Message::RECEIVE_INTERACTION :                                  strcat(theMessage,"RECEIVE_INTERACTION"); break;
    00113         case certi::Message::DELETE_OBJECT_INSTANCE :                               strcat(theMessage,"DELETE_OBJECT_INSTANCE"); break;
    00114         case certi::Message::LOCAL_DELETE_OBJECT_INSTANCE :                     strcat(theMessage,"LOCAL_DELETE_OBJECT_INSTANCE"); break;
    00115         case certi::Message::REMOVE_OBJECT_INSTANCE :                               strcat(theMessage,"REMOVE_OBJECT_INSTANCE"); break;
    00116         case certi::Message::CHANGE_ATTRIBUTE_TRANSPORTATION_TYPE :             strcat(theMessage,"CHANGE_ATTRIBUTE_TRANSPORTATION_TYPE"); break;
    00117         case certi::Message::CHANGE_INTERACTION_TRANSPORTATION_TYPE :           strcat(theMessage,"CHANGE_INTERACTION_TRANSPORTATION_TYPE"); break;
    00118         case certi::Message::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE :            strcat(theMessage,"REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE"); break;
    00119         case certi::Message::REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE :             strcat(theMessage,"REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE"); break;
    00120         case certi::Message::PROVIDE_ATTRIBUTE_VALUE_UPDATE :                       strcat(theMessage,"PROVIDE_ATTRIBUTE_VALUE_UPDATE"); break;
    00121         case certi::Message::ATTRIBUTES_IN_SCOPE :                                  strcat(theMessage,"ATTRIBUTES_IN_SCOPE"); break;
    00122         case certi::Message::ATTRIBUTES_OUT_OF_SCOPE :                              strcat(theMessage,"ATTRIBUTES_OUT_OF_SCOPE"); break;
    00123         case certi::Message::TURN_UPDATES_ON_FOR_OBJECT_INSTANCE :              strcat(theMessage,"TURN_UPDATES_ON_FOR_OBJECT_INSTANCE"); break;
    00124         case certi::Message::TURN_UPDATES_OFF_FOR_OBJECT_INSTANCE :             strcat(theMessage,"TURN_UPDATES_OFF_FOR_OBJECT_INSTANCE"); break;
    00125
    00126         case certi::Message::REQUEST_ATTRIBUTE_OWNERSHIP_DIVESTITURE :          strcat(theMessage,"REQUEST_ATTRIBUTE_OWNERSHIP_DIVESTITURE"); break;
    00127         case certi::Message::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION :           strcat(theMessage,"REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION"); break;
    00128         case certi::Message::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE :       strcat(theMessage,"NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE"); break;
    00129         case certi::Message::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION : strcat(theMessage,"ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION"); break;
    00130         case certi::Message::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION : strcat(theMessage,"ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION"); break;
    00131         case certi::Message::REQUEST_ATTRIBUTE_OWNERSHIP_ACQUISITION :          strcat(theMessage,"REQUEST_ATTRIBUTE_OWNERSHIP_ACQUISITION"); break;
    00132         case certi::Message::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE :              strcat(theMessage,"REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE"); break;
    00133         case certi::Message::QUERY_ATTRIBUTE_OWNERSHIP :                            strcat(theMessage,"QUERY_ATTRIBUTE_OWNERSHIP"); break;
    00134         case certi::Message::INFORM_ATTRIBUTE_OWNERSHIP :                           strcat(theMessage,"INFORM_ATTRIBUTE_OWNERSHIP"); break;
    00135         case certi::Message::IS_ATTRIBUTE_OWNED_BY_FEDERATE :                   strcat(theMessage,"IS_ATTRIBUTE_OWNED_BY_FEDERATE"); break;
    00136         case certi::Message::ATTRIBUTE_IS_NOT_OWNED :                               strcat(theMessage,"ATTRIBUTE_IS_NOT_OWNED"); break;
    00137         case certi::Message::ATTRIBUTE_OWNED_BY_RTI :                               strcat(theMessage,"ATTRIBUTE_OWNED_BY_RTI"); break;
    00138         case certi::Message::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE : strcat(theMessage,"ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE"); break;
    00139         case certi::Message::ATTRIBUTE_OWNERSHIP_UNAVAILABLE :                  strcat(theMessage,"ATTRIBUTE_OWNERSHIP_UNAVAILABLE"); break;
    00140         case certi::Message::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE :    strcat(theMessage,"UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE"); break;
    00141         case certi::Message::ATTRIBUTE_OWNERSHIP_ACQUISITION :                  strcat(theMessage,"ATTRIBUTE_OWNERSHIP_ACQUISITION"); break;
    00142         case certi::Message::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE : strcat(theMessage,"CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE"); break;
    00143         case certi::Message::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE :             strcat(theMessage,"ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE"); break;
    00144         case certi::Message::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION :           strcat(theMessage,"CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION"); break;
    00145         case certi::Message::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION : strcat(theMessage,"CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION"); break;
    00146
    00147         case certi::Message::CHANGE_ATTRIBUTE_ORDER_TYPE :                          strcat(theMessage,"CHANGE_ATTRIBUTE_ORDER_TYPE"); break;
    00148         case certi::Message::CHANGE_INTERACTION_ORDER_TYPE :                        strcat(theMessage,"CHANGE_INTERACTION_ORDER_TYPE"); break;
    00149         case certi::Message::ENABLE_TIME_REGULATION :                               strcat(theMessage,"ENABLE_TIME_REGULATION"); break;
    00150         case certi::Message::DISABLE_TIME_REGULATION :                              strcat(theMessage,"DISABLE_TIME_REGULATION"); break;
    00151         case certi::Message::ENABLE_TIME_CONSTRAINED :                              strcat(theMessage,"ENABLE_TIME_CONSTRAINED"); break;
    00152         case certi::Message::DISABLE_TIME_CONSTRAINED :                             strcat(theMessage,"DISABLE_TIME_CONSTRAINED"); break;
    00153         case certi::Message::QUERY_LBTS :                                               strcat(theMessage,"QUERY_LBTS"); break;
    00154         case certi::Message::QUERY_FEDERATE_TIME :                                  strcat(theMessage,"QUERY_FEDERATE_TIME"); break;
    00155         case certi::Message::QUERY_MIN_NEXT_EVENT_TIME :                            strcat(theMessage,"QUERY_MIN_NEXT_EVENT_TIME"); break;
    00156         case certi::Message::MODIFY_LOOKAHEAD :                                     strcat(theMessage,"MODIFY_LOOKAHEAD"); break;
    00157         case certi::Message::QUERY_LOOKAHEAD :                                          strcat(theMessage,"QUERY_LOOKAHEAD"); break;
    00158         case certi::Message::RETRACT :                                                  strcat(theMessage,"RETRACT"); break;
    00159         case certi::Message::REQUEST_RETRACTION :                                       strcat(theMessage,"REQUEST_RETRACTION"); break;
    00160         case certi::Message::TIME_ADVANCE_REQUEST :                                 strcat(theMessage,"TIME_ADVANCE_REQUEST"); break;
    00161         case certi::Message::TIME_ADVANCE_REQUEST_AVAILABLE :                       strcat(theMessage,"TIME_ADVANCE_REQUEST_AVAILABLE"); break;
    00162         case certi::Message::NEXT_EVENT_REQUEST :                                       strcat(theMessage,"NEXT_EVENT_REQUEST"); break;
    00163         case certi::Message::NEXT_EVENT_REQUEST_AVAILABLE :                     strcat(theMessage,"NEXT_EVENT_REQUEST_AVAILABLE"); break;
    00164         case certi::Message::FLUSH_QUEUE_REQUEST :                                  strcat(theMessage,"FLUSH_QUEUE_REQUEST"); break;
    00165         case certi::Message::TIME_ADVANCE_GRANT :                                       strcat(theMessage,"TIME_ADVANCE_GRANT"); break;
    00166         case certi::Message::ENABLE_ASYNCHRONOUS_DELIVERY :                     strcat(theMessage,"ENABLE_ASYNCHRONOUS_DELIVERY"); break;
    00167         case certi::Message::DISABLE_ASYNCHRONOUS_DELIVERY :                        strcat(theMessage,"DISABLE_ASYNCHRONOUS_DELIVERY"); break;
    00168         case certi::Message::TIME_REGULATION_ENABLED :                              strcat(theMessage,"TIME_REGULATION_ENABLED"); break;
    00169         case certi::Message::TIME_CONSTRAINED_ENABLED :                             strcat(theMessage,"TIME_CONSTRAINED_ENABLED"); break;
    00170
    00171         case certi::Message::DDM_CREATE_REGION :                                        strcat(theMessage,"DDM_CREATE_REGION"); break;
    00172         case certi::Message::DDM_MODIFY_REGION :                                        strcat(theMessage,"DDM_MODIFY_REGION"); break;
    00173         case certi::Message::DDM_DELETE_REGION :                                        strcat(theMessage,"DDM_DELETE_REGION"); break;
    00174         case certi::Message::DDM_REGISTER_OBJECT :                                  strcat(theMessage,"DDM_REGISTER_OBJECT"); break;
    00175         case certi::Message::DDM_ASSOCIATE_REGION :                                 strcat(theMessage,"DDM_ASSOCIATE_REGION"); break;
    00176         case certi::Message::DDM_UNASSOCIATE_REGION :                               strcat(theMessage,"DDM_UNASSOCIATE_REGION"); break;
    00177         case certi::Message::DDM_SUBSCRIBE_ATTRIBUTES :                             strcat(theMessage,"DDM_SUBSCRIBE_ATTRIBUTES"); break;
    00178         case certi::Message::DDM_UNSUBSCRIBE_ATTRIBUTES :                           strcat(theMessage,"DDM_UNSUBSCRIBE_ATTRIBUTES"); break;
    00179         case certi::Message::DDM_SUBSCRIBE_INTERACTION :                            strcat(theMessage,"DDM_SUBSCRIBE_INTERACTION"); break;
    00180         case certi::Message::DDM_UNSUBSCRIBE_INTERACTION :                          strcat(theMessage,"DDM_UNSUBSCRIBE_INTERACTION"); break;
    00181         case certi::Message::DDM_REQUEST_UPDATE :                                       strcat(theMessage,"DDM_REQUEST_UPDATE"); break;
    00182
    00183         case certi::Message::GET_OBJECT_CLASS_HANDLE :                              strcat(theMessage,"GET_OBJECT_CLASS_HANDLE"); break;
    00184         case certi::Message::GET_OBJECT_CLASS_NAME :                                    strcat(theMessage,"GET_OBJECT_CLASS_NAME"); break;
    00185         case certi::Message::GET_ATTRIBUTE_HANDLE :                                 strcat(theMessage,"GET_ATTRIBUTE_HANDLE"); break;
    00186         case certi::Message::GET_ATTRIBUTE_NAME :                                       strcat(theMessage,"GET_ATTRIBUTE_NAME"); break;
    00187         case certi::Message::GET_INTERACTION_CLASS_HANDLE :                     strcat(theMessage,"GET_INTERACTION_CLASS_HANDLE"); break;
    00188         case certi::Message::GET_INTERACTION_CLASS_NAME :                           strcat(theMessage,"GET_INTERACTION_CLASS_NAME"); break;
    00189         case certi::Message::GET_PARAMETER_HANDLE :                                 strcat(theMessage,"GET_PARAMETER_HANDLE"); break;
    00190         case certi::Message::GET_PARAMETER_NAME :                                       strcat(theMessage,"GET_PARAMETER_NAME"); break;
    00191         case certi::Message::GET_OBJECT_INSTANCE_HANDLE :                           strcat(theMessage,"GET_OBJECT_INSTANCE_HANDLE"); break;
    00192         case certi::Message::GET_OBJECT_INSTANCE_NAME :                             strcat(theMessage,"GET_OBJECT_INSTANCE_NAME"); break;
    00193         case certi::Message::GET_SPACE_HANDLE :                                     strcat(theMessage,"GET_SPACE_HANDLE"); break;
    00194         case certi::Message::GET_SPACE_NAME :                                           strcat(theMessage,"GET_SPACE_NAME"); break;
    00195         case certi::Message::GET_DIMENSION_HANDLE :                                 strcat(theMessage,"GET_DIMENSION_HANDLE"); break;
    00196         case certi::Message::GET_DIMENSION_NAME :                                       strcat(theMessage,"GET_DIMENSION_NAME"); break;
    00197         case certi::Message::GET_ATTRIBUTE_SPACE_HANDLE :                           strcat(theMessage,"GET_ATTRIBUTE_SPACE_HANDLE"); break;
    00198         case certi::Message::GET_OBJECT_CLASS :                                     strcat(theMessage,"GET_OBJECT_CLASS"); break;
    00199         case certi::Message::GET_INTERACTION_SPACE_HANDLE :                     strcat(theMessage,"GET_INTERACTION_SPACE_HANDLE"); break;
    00200         case certi::Message::GET_TRANSPORTATION_HANDLE :                            strcat(theMessage,"GET_INTERACTION_SPACE_HANDLE"); break;
    00201         case certi::Message::GET_TRANSPORTATION_NAME :                              strcat(theMessage,"GET_TRANSPORTATION_NAME"); break;
    00202         case certi::Message::GET_ORDERING_HANDLE :                                  strcat(theMessage,"GET_ORDERING_HANDLE"); break;
    00203         case certi::Message::GET_ORDERING_NAME :                                        strcat(theMessage,"GET_ORDERING_NAME"); break;
    00204         case certi::Message::ENABLE_CLASS_RELEVANCE_ADVISORY_SWITCH :
    00205             strcat(theMessage,"ENABLE_CLASS_RELEVANCE_ADVISORY_SWITCH"); break;
    00206         case certi::Message::DISABLE_CLASS_RELEVANCE_ADVISORY_SWITCH :
    00207             strcat(theMessage,"DISABLE_CLASS_RELEVANCE_ADVISORY_SWITCH"); break;
    00208         case certi::Message::ENABLE_ATTRIBUTE_RELEVANCE_ADVISORY_SWITCH :
    00209             strcat(theMessage,"ENABLE_ATTRIBUTE_RELEVANCE_ADVISORY_SWITCH"); break;
    00210         case certi::Message::DISABLE_ATTRIBUTE_RELEVANCE_ADVISORY_SWITCH :
    00211             strcat(theMessage,"DISABLE_ATTRIBUTE_RELEVANCE_ADVISORY_SWITCH"); break;
    00212         case certi::Message::ENABLE_ATTRIBUTE_SCOPE_ADVISORY_SWITCH :
    00213             strcat(theMessage,"ENABLE_ATTRIBUTE_SCOPE_ADVISORY_SWITCH"); break;
    00214         case certi::Message::DISABLE_ATTRIBUTE_SCOPE_ADVISORY_SWITCH :
    00215             strcat(theMessage,"DISABLE_ATTRIBUTE_SCOPE_ADVISORY_SWITCH"); break;
    00216         case certi::Message::ENABLE_INTERACTION_RELEVANCE_ADVISORY_SWITCH :
    00217             strcat(theMessage,"ENABLE_INTERACTION_RELEVANCE_ADVISORY_SWITCH"); break;
    00218         case certi::Message::DISABLE_INTERACTION_RELEVANCE_ADVISORY_SWITCH:
    00219             strcat(theMessage,"DISABLE_INTERACTION_RELEVANCE_ADVISORY_SWITCH"); break;
    00220         case certi::Message::TICK_REQUEST :                                             strcat(theMessage,"TICK_REQUEST"); break;
    00221         default:
    00222             sprintf(theMessage,"LOCAL UNKNOWED MESSAGE %hd",testMess);
    00223         }
    00224     }
    00225 else if (type == 'N')
    00226     {
    00227     switch (testMess)
    00228         {//NetworkMessage.h
    00229         case certi::NetworkMessage::CLOSE_CONNEXION :                                       strcat(theMessage,"CLOSE_CONNEXION"); break;
    00230         case certi::NetworkMessage::MESSAGE_NULL :                                          strcat(theMessage,"MESSAGE_NULL"); break;
    00231         case certi::NetworkMessage::CREATE_FEDERATION_EXECUTION :                       strcat(theMessage,"CREATE_FEDERATION_EXECUTION"); break;
    00232         case certi::NetworkMessage::DESTROY_FEDERATION_EXECUTION :                      strcat(theMessage,"DESTROY_FEDERATION_EXECUTION"); break;
    00233         case certi::NetworkMessage::JOIN_FEDERATION_EXECUTION :                             strcat(theMessage,"JOIN_FEDERATION_EXECUTION"); break;
    00234         case certi::NetworkMessage::RESIGN_FEDERATION_EXECUTION :                       strcat(theMessage,"RESIGN_FEDERATION_EXECUTION"); break;
    00235         case certi::NetworkMessage::SET_TIME_REGULATING :                                   strcat(theMessage,"SET_TIME_REGULATING"); break;
    00236         case certi::NetworkMessage::TIME_REGULATION_ENABLED :                                   strcat(theMessage,"TIME_REGULATION_ENABLED"); break;
    00237         case certi::NetworkMessage::SET_TIME_CONSTRAINED :                              strcat(theMessage,"SET_TIME_CONSTRAINED"); break;
    00238         case certi::NetworkMessage::TIME_CONSTRAINED_ENABLED :                                  strcat(theMessage,"TIME_CONSTRAINED_ENABLED"); break;
    00239         case certi::NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT :     strcat(theMessage,"REGISTER_FEDERATION_SYNCHRONIZATION_POINT"); break;
    00240         case certi::NetworkMessage::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED : strcat(theMessage,"SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED"); break;
    00241         case certi::NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT :                    strcat(theMessage,"ANNOUNCE_SYNCHRONIZATION_POINT"); break;
    00242         case certi::NetworkMessage::SYNCHRONIZATION_POINT_ACHIEVED :                    strcat(theMessage,"SYNCHRONIZATION_POINT_ACHIEVED"); break;
    00243         case certi::NetworkMessage::FEDERATION_SYNCHRONIZED :                           strcat(theMessage,"FEDERATION_SYNCHRONIZED"); break;
    00244         case certi::NetworkMessage::REQUEST_FEDERATION_SAVE :                           strcat(theMessage,"REQUEST_FEDERATION_SAVE"); break;
    00245         case certi::NetworkMessage::FEDERATE_SAVE_BEGUN :                                   strcat(theMessage,"FEDERATE_SAVE_BEGUN"); break;
    00246         case certi::NetworkMessage::FEDERATE_SAVE_COMPLETE :                                strcat(theMessage,"FEDERATE_SAVE_COMPLETE"); break;
    00247         case certi::NetworkMessage::FEDERATE_SAVE_NOT_COMPLETE :                        strcat(theMessage,"FEDERATE_SAVE_NOT_COMPLETE"); break;
    00248         case certi::NetworkMessage::INITIATE_FEDERATE_SAVE :                                strcat(theMessage,"INITIATE_FEDERATE_SAVE"); break;
    00249         case certi::NetworkMessage::FEDERATION_SAVED :                                      strcat(theMessage,"FEDERATION_SAVED"); break;
    00250         case certi::NetworkMessage::FEDERATION_NOT_SAVED :                              strcat(theMessage,"FEDERATION_NOT_SAVED"); break;
    00251         case certi::NetworkMessage::REQUEST_FEDERATION_RESTORE :                        strcat(theMessage,"REQUEST_FEDERATION_RESTORE"); break;
    00252         case certi::NetworkMessage::FEDERATE_RESTORE_COMPLETE :                             strcat(theMessage,"FEDERATE_RESTORE_COMPLETE"); break;
    00253         case certi::NetworkMessage::FEDERATE_RESTORE_NOT_COMPLETE :                     strcat(theMessage,"FEDERATE_RESTORE_NOT_COMPLETE"); break;
    00254         case certi::NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED :          strcat(theMessage,"REQUEST_FEDERATION_RESTORE_SUCCEEDED"); break;
    00255         case certi::NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED :                 strcat(theMessage,"REQUEST_FEDERATION_RESTORE_FAILED"); break;
    00256         case certi::NetworkMessage::FEDERATION_RESTORE_BEGUN :                          strcat(theMessage,"FEDERATION_RESTORE_BEGUN"); break;
    00257         case certi::NetworkMessage::INITIATE_FEDERATE_RESTORE :                             strcat(theMessage,"INITIATE_FEDERATE_RESTORE"); break;
    00258         case certi::NetworkMessage::FEDERATION_RESTORED :                                   strcat(theMessage,"FEDERATION_RESTORED"); break;
    00259         case certi::NetworkMessage::FEDERATION_NOT_RESTORED :                           strcat(theMessage,"FEDERATION_NOT_RESTORED"); break;
    00260         case certi::NetworkMessage::PUBLISH_OBJECT_CLASS :                              strcat(theMessage,"PUBLISH_OBJECT_CLASS"); break;
    00261         case certi::NetworkMessage::UNPUBLISH_OBJECT_CLASS :                                strcat(theMessage,"UNPUBLISH_OBJECT_CLASS"); break;
    00262         case certi::NetworkMessage::PUBLISH_INTERACTION_CLASS :                             strcat(theMessage,"PUBLISH_INTERACTION_CLASS"); break;
    00263         case certi::NetworkMessage::UNPUBLISH_INTERACTION_CLASS :                       strcat(theMessage,"UNPUBLISH_INTERACTION_CLASS"); break;
    00264         case certi::NetworkMessage::SUBSCRIBE_OBJECT_CLASS :                                strcat(theMessage,"SUBSCRIBE_OBJECT_CLASS"); break;
    00265         case certi::NetworkMessage::UNSUBSCRIBE_OBJECT_CLASS :                          strcat(theMessage,"UNSUBSCRIBE_OBJECT_CLASS"); break;
    00266         case certi::NetworkMessage::SUBSCRIBE_INTERACTION_CLASS :                       strcat(theMessage,"SUBSCRIBE_INTERACTION_CLASS"); break;
    00267         case certi::NetworkMessage::UNSUBSCRIBE_INTERACTION_CLASS :                     strcat(theMessage,"UNSUBSCRIBE_INTERACTION_CLASS"); break;
    00268         case certi::NetworkMessage::TURN_INTERACTIONS_ON :                              strcat(theMessage,"TURN_INTERACTIONS_ON"); break;
    00269         case certi::NetworkMessage::TURN_INTERACTIONS_OFF :                                 strcat(theMessage,"TURN_INTERACTIONS_OFF"); break;
    00270         case certi::NetworkMessage::REGISTER_OBJECT :                                       strcat(theMessage,"REGISTER_OBJECT"); break;
    00271         case certi::NetworkMessage::DISCOVER_OBJECT :                                       strcat(theMessage,"DISCOVER_OBJECT"); break;
    00272         case certi::NetworkMessage::UPDATE_ATTRIBUTE_VALUES :                           strcat(theMessage,"UPDATE_ATTRIBUTE_VALUES"); break;
    00273         case certi::NetworkMessage::REFLECT_ATTRIBUTE_VALUES :                          strcat(theMessage,"REFLECT_ATTRIBUTE_VALUES"); break;
    00274         case certi::NetworkMessage::SEND_INTERACTION :                                      strcat(theMessage,"SEND_INTERACTION"); break;
    00275         case certi::NetworkMessage::RECEIVE_INTERACTION :                                   strcat(theMessage,"RECEIVE_INTERACTION"); break;
    00276         case certi::NetworkMessage::DELETE_OBJECT :                                             strcat(theMessage,"DELETE_OBJECT"); break;
    00277         case certi::NetworkMessage::REMOVE_OBJECT :                                             strcat(theMessage,"REMOVE_OBJECT"); break;
    00278         case certi::NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE :                   strcat(theMessage,"CHANGE_ATTRIBUTE_TRANSPORT_TYPE"); break;
    00279         case certi::NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE :                       strcat(theMessage,"CHANGE_ATTRIBUTE_ORDER_TYPE"); break;
    00280         case certi::NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE :                 strcat(theMessage,"CHANGE_INTERACTION_TRANSPORT_TYPE"); break;
    00281         case certi::NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE :                     strcat(theMessage,"CHANGE_INTERACTION_ORDER_TYPE"); break;
    00282         case certi::NetworkMessage::REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE :          strcat(theMessage,"REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE"); break;
    00283         case certi::NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE :             strcat(theMessage,"REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE"); break;
    00284         case certi::NetworkMessage::IS_ATTRIBUTE_OWNED_BY_FEDERATE :                    strcat(theMessage,"IS_ATTRIBUTE_OWNED_BY_FEDERATE"); break;
    00285         case certi::NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP :                             strcat(theMessage,"QUERY_ATTRIBUTE_OWNERSHIP"); break;
    00286         case certi::NetworkMessage::ATTRIBUTE_IS_NOT_OWNED :                                strcat(theMessage,"ATTRIBUTE_IS_NOT_OWNED"); break;
    00287         case certi::NetworkMessage::INFORM_ATTRIBUTE_OWNERSHIP :                        strcat(theMessage,"INFORM_ATTRIBUTE_OWNERSHIP"); break;
    00288         case certi::NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE :    strcat(theMessage,"NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE"); break;
    00289         case certi::NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION : strcat(theMessage,"ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION"); break;
    00290         case certi::NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION : strcat(theMessage,"ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION"); break;
    00291         case certi::NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION :        strcat(theMessage,"REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION"); break;
    00292         case certi::NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE :                   strcat(theMessage,"ATTRIBUTE_OWNERSHIP_UNAVAILABLE"); break;
    00293         case certi::NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE : strcat(theMessage,"ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE"); break;
    00294         case certi::NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE :strcat(theMessage,"UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE"); break;
    00295         case certi::NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION :                   strcat(theMessage,"ATTRIBUTE_OWNERSHIP_ACQUISITION"); break;
    00296         case certi::NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE :           strcat(theMessage,"REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE"); break;
    00297         case certi::NetworkMessage::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE :strcat(theMessage,"CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE"); break;
    00298         case certi::NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE :          strcat(theMessage,"ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE"); break;
    00299         case certi::NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION :        strcat(theMessage,"CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION"); break;
    00300         case certi::NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION :  strcat(theMessage,"CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION"); break;
    00301         case certi::NetworkMessage::DDM_CREATE_REGION :                                     strcat(theMessage,"DDM_CREATE_REGION"); break;
    00302         case certi::NetworkMessage::DDM_MODIFY_REGION :                                     strcat(theMessage,"DDM_MODIFY_REGION"); break;
    00303         case certi::NetworkMessage::DDM_DELETE_REGION :                                     strcat(theMessage,"DDM_DELETE_REGION"); break;
    00304         case certi::NetworkMessage::DDM_ASSOCIATE_REGION :                              strcat(theMessage,"DDM_ASSOCIATE_REGION"); break;
    00305         case certi::NetworkMessage::DDM_REGISTER_OBJECT :                                   strcat(theMessage,"DDM_REGISTER_OBJECT"); break;
    00306         case certi::NetworkMessage::DDM_UNASSOCIATE_REGION :                                strcat(theMessage,"DDM_UNASSOCIATE_REGION"); break;
    00307         case certi::NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES :                          strcat(theMessage,"DDM_SUBSCRIBE_ATTRIBUTES"); break;
    00308         case certi::NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES :                        strcat(theMessage,"DDM_UNSUBSCRIBE_ATTRIBUTES"); break;
    00309         case certi::NetworkMessage::DDM_SUBSCRIBE_INTERACTION :                             strcat(theMessage,"DDM_SUBSCRIBE_INTERACTION"); break;
    00310         case certi::NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION :                       strcat(theMessage,"DDM_UNSUBSCRIBE_INTERACTION"); break;
    00311         case certi::NetworkMessage::GET_FED_FILE :                                          strcat(theMessage,"GET_FED_FILE"); break;
    00312         default:                                                                                            sprintf(theMessage,"NETWORK UNKNOWED MESSAGE %hd",testMess);
    00313         }
    00314     }
    00315 strcat(theMessage, "\n"); // Add trailing \n
    00316 PrettyDebug::Print(*theOutputStreamPtr, HeaderMessage, theMessage);
    00317 }
    00318 #endif // NDEBUG
    00319
    00320 // $Id: PrettyDebEx.cc,v 4.6 2008/11/20 18:21:56 approx Exp $