certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi CMakeLists.txt TODO libCERTI/NetworkMessa...


From: certi-cvs
Subject: [certi-cvs] certi CMakeLists.txt TODO libCERTI/NetworkMessa...
Date: Sat, 26 Apr 2008 14:59:43 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/04/26 14:59:43

Modified files:
        .              : CMakeLists.txt TODO 
        libCERTI       : NetworkMessage.hh InteractionBroadcastList.cc 
                         ObjectSet.cc ObjectClass.cc XmlParser.cc 
                         ObjectClassAttribute.cc MessageBuffer.cc 
                         ObjectClass.hh Interaction.cc 
                         InteractionBroadcastList.hh BasicMessage.cc 
                         MessageBuffer.hh BasicMessage.hh 
                         ObjectClassBroadcastList.cc 
                         NetworkMessage_RW.cc CMakeLists.txt 
                         ObjectClassSet.cc NetworkMessage.cc 
        RTIA           : main.cc OwnershipManagement.cc Files.cc RTIA.cc 
                         TimeManagement.cc Communications.cc 
                         DeclarationManagement.cc Communications.hh 
                         FederationManagement.cc ObjectManagement.cc 
                         RTIA_network.cc DataDistribution.cc 
                         RTIA_federate.cc 
        scripts        : GenMessageClass.py FindLexYacc.cmake 
        test/Billard   : dtest_billard.py 
        RTIG           : RTIG_processing.cc Federation.cc RTIG.cc 
                         RTIG.hh 
        test/utility   : CertiUtilTests.cc 
Added files:
        libCERTI       : NM_Classes.hh NM_Classes.cc 
        scripts        : NW_MessageType.ods 

Log message:
        Merge from br_DEV_HETEROGENEOUS
        Should be OK!!
        dtest_billard.py : PASSED
        dtest_HLA_Tutorial.py : PASSED

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/CMakeLists.txt?cvsroot=certi&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/certi/TODO?cvsroot=certi&r1=3.1&r2=3.2
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NetworkMessage.hh?cvsroot=certi&r1=3.30&r2=3.31
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionBroadcastList.cc?cvsroot=certi&r1=3.11&r2=3.12
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectSet.cc?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.cc?cvsroot=certi&r1=3.41&r2=3.42
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/XmlParser.cc?cvsroot=certi&r1=3.25&r2=3.26
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassAttribute.cc?cvsroot=certi&r1=3.27&r2=3.28
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/MessageBuffer.cc?cvsroot=certi&r1=3.8&r2=3.9
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.hh?cvsroot=certi&r1=3.31&r2=3.32
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.cc?cvsroot=certi&r1=3.35&r2=3.36
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionBroadcastList.hh?cvsroot=certi&r1=3.7&r2=3.8
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/BasicMessage.cc?cvsroot=certi&r1=3.9&r2=3.10
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/MessageBuffer.hh?cvsroot=certi&r1=3.6&r2=3.7
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/BasicMessage.hh?cvsroot=certi&r1=3.7&r2=3.8
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassBroadcastList.cc?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NetworkMessage_RW.cc?cvsroot=certi&r1=3.46&r2=3.47
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/CMakeLists.txt?cvsroot=certi&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.cc?cvsroot=certi&r1=3.31&r2=3.32
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NetworkMessage.cc?cvsroot=certi&r1=3.28&r2=3.29
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.hh?cvsroot=certi&rev=3.1
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.cc?cvsroot=certi&rev=3.1
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/main.cc?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/OwnershipManagement.cc?cvsroot=certi&r1=3.12&r2=3.13
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/Files.cc?cvsroot=certi&r1=3.8&r2=3.9
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA.cc?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/TimeManagement.cc?cvsroot=certi&r1=3.32&r2=3.33
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/Communications.cc?cvsroot=certi&r1=3.24&r2=3.25
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/DeclarationManagement.cc?cvsroot=certi&r1=3.17&r2=3.18
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/Communications.hh?cvsroot=certi&r1=3.11&r2=3.12
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.53&r2=3.54
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.cc?cvsroot=certi&r1=3.36&r2=3.37
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_network.cc?cvsroot=certi&r1=3.22&r2=3.23
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/DataDistribution.cc?cvsroot=certi&r1=3.23&r2=3.24
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.73&r2=3.74
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/GenMessageClass.py?cvsroot=certi&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/FindLexYacc.cmake?cvsroot=certi&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/NW_MessageType.ods?cvsroot=certi&rev=1.2
http://cvs.savannah.gnu.org/viewcvs/certi/test/Billard/dtest_billard.py?cvsroot=certi&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.61&r2=3.62
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.81&r2=3.82
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.39&r2=3.40
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.hh?cvsroot=certi&r1=3.24&r2=3.25
http://cvs.savannah.gnu.org/viewcvs/certi/test/utility/CertiUtilTests.cc?cvsroot=certi&r1=1.8&r2=1.9

Patches:
Index: CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/CMakeLists.txt,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- CMakeLists.txt      25 Apr 2008 14:55:33 -0000      1.41
+++ CMakeLists.txt      26 Apr 2008 14:59:39 -0000      1.42
@@ -14,6 +14,9 @@
 
 INCLUDE(TestBigEndian)
 TEST_BIG_ENDIAN(BIG_ENDIAN)
+IF(BIG_ENDIAN) 
+   ADD_DEFINITIONS(-DHOST_IS_BIG_ENDIAN)
+ENDIF(BIG_ENDIAN)
 
 # default behaviour is to build library as shared on all platform
 OPTION(BUILD_SHARED

Index: TODO
===================================================================
RCS file: /sources/certi/certi/TODO,v
retrieving revision 3.1
retrieving revision 3.2
diff -u -b -r3.1 -r3.2
--- TODO        4 Jul 2003 13:54:13 -0000       3.1
+++ TODO        26 Apr 2008 14:59:39 -0000      3.2
@@ -1,3 +1,26 @@
+Erk1) Replace serialize()/deserialize()
+      with serialize(MessageBuffer& msgBuf) ...
+      in order to minimize copy when possible
+      (for example on virtual constructor) --> This part is DONE
+
+      We may even setup a msgBuf pool in order to 
+      minimize realloc when creating NetworkMessage sub-classes instance
+
+Erk2) Use visitor pattern for RTIG processing
+
+Erk3) Use proper constructor and getter/setter for NetworkMessage
+      and avoid public shared field between different kind of message
+
+Erk5) Remove all kind of:
+      AnswerAssumption->exception = e_NO_EXCEPTION 
+
+ERk6) Should be possible to avoid code duplication
+      for timed/not timed message using NetworkMessage::setDate properly
+
+Erk7) Clean-up PrettyDebug mess
+
+Erk8) Suppress copy in ValueArray = req->getAttribValueArray();
+
 Warning: this is an old file, many file/class names have changed, some
 problems are probably solved or handled differently.
 -------------------------------------------------------------------------------

Index: libCERTI/NetworkMessage.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/NetworkMessage.hh,v
retrieving revision 3.30
retrieving revision 3.31
diff -u -b -r3.30 -r3.31
--- libCERTI/NetworkMessage.hh  5 Mar 2008 15:33:50 -0000       3.30
+++ libCERTI/NetworkMessage.hh  26 Apr 2008 14:59:40 -0000      3.31
@@ -17,7 +17,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: NetworkMessage.hh,v 3.30 2008/03/05 15:33:50 rousse Exp $
+// $Id: NetworkMessage.hh,v 3.31 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef CERTI_NETWORK_MESSAGE_HH
@@ -26,11 +26,11 @@
 #include "fedtime.hh"
 #include "Exception.hh"
 #include "Socket.hh"
-#include "MessageBody.hh"
 #include "RTIRegion.hh"
 #include "BasicMessage.hh"
 
 #include <vector>
+#include <string>
 
 #ifdef FEDERATION_USES_MULTICAST
 #define MC_PORT 60123
@@ -42,49 +42,18 @@
 
 namespace certi {
 
+/**
+ * NetworkMessage is the base class used
+ * for modelling message exchanged between RTIG and RTIA.
+ * NetworkMessage is the base class of a class hierarchy.
+ * Each specific message is a (direct of indirect)
+ * daughter class of NetworkMessage.    
+ */ 
 class CERTI_EXPORT NetworkMessage : public BasicMessage
 {
 public:
-    struct TimeStruct {
-        FederationTime date ; // Date, Logical Time
-        bool R_or_C ; // IsRegulator or IsConstrained
-    };
 
-    struct T_O_Struct {
-        ObjectClassHandle handle ;
-        UShort handleArraySize ;
-        TransportType transport ;
-        OrderType order ;
-    };
-
-    struct JoinStruct {
-        int NbReg ;
-        unsigned long AdrMC ;
-        unsigned long Addr ;
-        unsigned int peer ;
-    };
-
-    struct O_I_Struct {
-        ObjectClassHandle handle ;
-        UShort size ;
-        FederationTime date ;
-    };
-
-    struct DDM_Struct {
-        SpaceHandle space ;
-        DimensionHandle dimension ;
-        RegionHandle region ;
-    };
-
-    union HeaderUnion {
-        TimeStruct time ;
-        T_O_Struct T_O ;
-        JoinStruct Join ;
-        O_I_Struct O_I ;
-        DDM_Struct ddm ;
-    };
-
-    enum Type {
+       typedef enum Type {
         NOT_USED = 0, // Not used.
         CLOSE_CONNEXION,
         MESSAGE_NULL,
@@ -168,25 +137,36 @@
        DDM_UNSUBSCRIBE_INTERACTION,
         PROVIDE_ATTRIBUTE_VALUE_UPDATE,
         GET_FED_FILE,
-
        LAST
-    };
+       } Message_T;    
 
-    struct HeaderStruct {
-        Type type ;
-        TypeException exception ;
-        Handle federation ;
-        FederateHandle federate ;
-        UShort bodySize ;
-        HeaderUnion VP ; // Variable Part
-    };
-
-public :
     NetworkMessage();
+       virtual ~NetworkMessage();
 
-    // Display method
-    void display(const char *);
-        void trace(const char* context);
+       const NetworkMessage::Message_T getType() const {return type;};
+       const TypeException getException() const {return exception;};
+
+       /**
+        * Serialize the message into a buffer
+        */
+       virtual void serialize(MessageBuffer& msgBuffer);
+       /**
+        * DeSerialize the message from a buffer
+        */
+       virtual void deserialize(MessageBuffer& msgBuffer);
+
+       /**
+        * Deserialize a message using the message buffer
+        * from another message.
+        * This is used to avoid copy in a virtual constructor
+        * for network Message.
+        */ 
+       void deserialize(NetworkMessage& anotherMsg) 
+               {anotherMsg.msgBuf.assumeSizeFromReservedBytes();
+                deserialize(anotherMsg.msgBuf);};
+       
+       void send(Socket* socket) throw (NetworkError, NetworkSignal);
+       void receive(Socket* socket) throw (NetworkError, NetworkSignal);
 
     // Parameter and Attribute Management
     // Remove the Parameter of rank 'Rank' in the ParamArray and its value in
@@ -202,13 +182,6 @@
     // See RemoveParameter for explanations.
     void removeAttribute(UShort Rank);
 
-    // Read and Write NetworkMessage Objects to and from Socket objects.
-    void write(Socket *Socket)
-        throw (NetworkError, NetworkSignal);
-
-    void read(Socket *Socket)
-        throw (NetworkError, NetworkSignal);
-
     // Value Array Management
 
     // setValue : Value and its length are stored into ValueArray[Rank]
@@ -231,101 +204,150 @@
 
     void setAHS(const AttributeHandle *, int);
 
+
     void setBoolean(bool);
     bool getBoolean() const { return boolean ; };
 
-    Type type ;
-    TypeException exception ;
-    char exceptionReason[MAX_EXCEPTION_REASON_LENGTH + 1] ;
 
     UShort number ;
 
-    Handle federation ;
-    FederateHandle federate ;
-    //char federationName[MAX_FEDERATION_NAME_LENGTH + 1] ;
-    char *federationName ;
-    char federateName[MAX_FEDERATE_NAME_LENGTH + 1] ;
-    char *FEDid ;
+       std::string federationName ;
+       std::string federateName;
+       std::string FEDid ;
 
     int bestEffortPeer ;
     unsigned long bestEffortAddress ;
 
-    bool regulator ;
-    bool constrained ;
+       int numberOfRegulators ;
 
+       /* NM_DDM_Base class fields */
+       SpaceHandle            space;
+       int32_t                nbExtents;
+       int32_t                region;
+       ObjectHandle           object;
+       ObjectClassHandle      objectClass;
+       InteractionClassHandle interactionClass;
     bool boolean ;
     
-    FederationTime date ;
+       /**
+        * Indicate if the message is dated or not
+        */
+       bool isDated;
+       /** 
+        * If ones set Date then this is a Dated message
+        * Message builder which setDate will generate a Dated message 
+        */
+       void setDate(FederationTime date) {isDated=true; this->date = date;};
+       const FederationTime getDate() const {return this->date;};
 
-    int numberOfRegulators ;
     unsigned long multicastAddress ;
 
-    char label[MAX_USER_TAG_LENGTH + 1] ;
-    char tag[MAX_USER_TAG_LENGTH + 1] ;
+       /**
+        * Indicate if the message is Labelled or not
+        */
+       bool isLabelled;        
+
+       void setLabel(const std::string label) {isLabelled = true; this->label 
= label;};
+       void setLabel(const char *new_label) {isLabelled = true; label = 
std::string(new_label); }
+       const std::string getLabel() const {return this->label;};
+
+       /**
+        * Indicate if the message is Tagged or not
+        */
+       bool isTagged;
+       void setTag(const std::string tag) {isTagged = true; this->tag = tag;};
+       void setTag(const char *new_tag) {isTagged = true; tag = 
std::string(new_tag); }
+       const std::string getTag() const {return this->tag;};
 
     ObjectHandlecount idCount ;
     ObjectHandle firstId ;
     ObjectHandle lastId ;
 
-    ObjectHandle object ;
-    ObjectClassHandle objectClass ;
-    InteractionClassHandle interactionClass ;
-
     EventRetractionHandle eventRetraction ;
 
+       /* NM_WithHandleArray class specific fields */
     UShort handleArraySize ;
+       /* FIXME will make this a vector<AttributeHandle> */
     AttributeHandle handleArray[MAX_ATTRIBUTES_PER_CLASS] ;
 
     TransportType transport ;
     OrderType order ;
 
-    SpaceHandle space ;
-    long nbExtents ;
-    long region ;
-
-    void setLabel(const char *new_label) { strcpy(label, new_label); }
-    void setTag(const char *new_tag) { strcpy(tag, new_tag); }
-    void setFEDid(const char *NewFEDid);
+       /** The name corresponding to message type */
+       const std::string getName() const {return name;}
 
-private:
-    // Read a Message Body from a Socket. Should be called after ReadHeader.
-    void readBody(Socket *Socket);
+       /** 
+        * The exception type 
+        * if the message is carrying an exception
+        */
+       TypeException exception ;
+       /**
+        * The federation handle 
+        * the message is part of this federation activity
+        */
+       Handle federation ;
+       /** 
+        * The federate handle
+        * the message is for this particular federate
+        */
+       FederateHandle federate ;
 
-    // Read a Header from a socket, and process it to read its content.
-    // Return RTI_TRUE if the ReadBody Method has to be called.
-    bool readHeader(Socket *Socket);
-
-    // The message is written onto the socket by WriteHeader if no body
-    // is required, or by WriteBody is a body has been required by WriteHeader.
-
-    // Prepare and write a Body to a socket. Should be called after
-    // WriteHeader.
-    void writeBody(Socket *Socket);
-
-    // Prepare and Write a Header to a Socket, and return RTI_TRUE
-    // if the WriteBody method has to be called.
-    bool writeHeader(Socket *Socket);
-
-    // -- Others Private Write Methods --
-    void writeFEDid(MessageBody &body);
-    void writeFederationName(MessageBody &body);
-
-    // -- Others Private Read Methods --
-    void readLabel(MessageBody &);
-    void readTag(MessageBody &);
-    void readFederationName(MessageBody &);
-    void readFederateName(MessageBody &);
-    void readFEDid(MessageBody &body);
+       /**
+        * The exception reason (if the message carry one)
+        */
+       std::string exceptionReason;    
+
+       /* used by some sub-classes */
+       int32_t attribute;
+
+protected:
+       /** 
+        * The message name.
+        * should be initialized by the specialized
+        * network message constructor
+        */
+       std::string name;       
+
+       /** 
+        * The network message type
+        * type field cannot be accessed directly 
+        *   - only NM constructor may set it.
+        *   - getter should be used to get it. 
+        */
+       Message_T type;
+
+       /** 
+        * The date of message if it is dated.
+        * date field cannot be accessed directly but only using
+        * getter/setter.
+        */
+       FederationTime date ;
+
+       /** 
+        * The label of message if it is labelled.
+        * date field cannot be accessed directly but only using
+        * getter/setter.
+        */
+       std::string label;
+       /** 
+        * The tag of message if it is tagged.
+        * date field cannot be accessed directly but only using
+        * getter/setter.
+        */
+       std::string tag;
 
-    HeaderStruct Header ;
     // ValueArray is now a ValueLengthPair
     ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS] ;
+
+private:
 };
 
+// BUG: FIXME this is used by SocketMC and should
+//      be thrown away as soon as possible.
 #define TAILLE_MSG_RESEAU sizeof(NetworkMessage)
 
 } // namespace certi
 
 #endif // CERTI_NETWORK_MESSAGE_HH
 
-// $Id: NetworkMessage.hh,v 3.30 2008/03/05 15:33:50 rousse Exp $
+// $Id: NetworkMessage.hh,v 3.31 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/InteractionBroadcastList.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionBroadcastList.cc,v
retrieving revision 3.11
retrieving revision 3.12
diff -u -b -r3.11 -r3.12
--- libCERTI/InteractionBroadcastList.cc        9 Aug 2007 09:22:45 -0000       
3.11
+++ libCERTI/InteractionBroadcastList.cc        26 Apr 2008 14:59:40 -0000      
3.12
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: InteractionBroadcastList.cc,v 3.11 2007/08/09 09:22:45 rousse Exp $
+// $Id: InteractionBroadcastList.cc,v 3.12 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -97,7 +97,7 @@
 InteractionBroadcastList::clear()
 {
     delete message ;
-    message = 0 ;
+    message = NULL ;
 
     while (!lines.empty()) {
         delete lines.front();
@@ -153,7 +153,7 @@
 
                 G.Out(pdGendoc,"sendPendingMessage===>write");
 
-                message->write(socket);
+                message->send(socket);
             }
             catch (RTIinternalError &e) {
                 D.Out(pdExcept,
@@ -177,4 +177,4 @@
 
 } // namespace certi
 
-// $Id: InteractionBroadcastList.cc,v 3.11 2007/08/09 09:22:45 rousse Exp $
+// $Id: InteractionBroadcastList.cc,v 3.12 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/ObjectSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectSet.cc,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- libCERTI/ObjectSet.cc       5 Mar 2008 15:33:51 -0000       3.18
+++ libCERTI/ObjectSet.cc       26 Apr 2008 14:59:40 -0000      3.19
@@ -28,6 +28,7 @@
 #include "ObjectAttribute.hh"
 #include "ObjectSet.hh"
 #include "PrettyDebug.hh"
+#include "NM_Classes.hh"
 
 // Standard
 #include <iostream>
@@ -239,15 +240,18 @@
         ObjectAttribute * oa ;
         oa = object->getAttribute(the_attribute);
 
-        NetworkMessage *answer = new NetworkMessage ;
+        NetworkMessage *answer;
+        if (oa->getOwner()) {
+               answer = 
NM_Factory::create(NetworkMessage::INFORM_ATTRIBUTE_OWNERSHIP);
+        } else {
+               answer = 
NM_Factory::create(NetworkMessage::ATTRIBUTE_IS_NOT_OWNED);
+        }
+        
         answer->federation = server->federation();
         answer->exception = e_NO_EXCEPTION ;
         answer->object = the_object ;
         answer->handleArray[0] = the_attribute ;
         answer->federate = oa->getOwner();
-        answer->type = answer->federate
-            ? NetworkMessage::INFORM_ATTRIBUTE_OWNERSHIP
-            : NetworkMessage::ATTRIBUTE_IS_NOT_OWNED ;
 
         sendToFederate(answer, the_federate);
     }
@@ -421,7 +425,7 @@
 #else
         socket = server->getSocketLink(the_federate);
 #endif
-        msg->write(socket);
+        msg->send(socket);
     }
     catch (RTIinternalError &e) {
         D.Out(pdExcept,
@@ -454,4 +458,4 @@
 }
 } // namespace certi
 
-// $Id: ObjectSet.cc,v 3.18 2008/03/05 15:33:51 rousse Exp $
+// $Id: ObjectSet.cc,v 3.19 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/ObjectClass.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.cc,v
retrieving revision 3.41
retrieving revision 3.42
diff -u -b -r3.41 -r3.42
--- libCERTI/ObjectClass.cc     5 Dec 2007 12:29:40 -0000       3.41
+++ libCERTI/ObjectClass.cc     26 Apr 2008 14:59:40 -0000      3.42
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClass.cc,v 3.41 2007/12/05 12:29:40 approx Exp $
+// $Id: ObjectClass.cc,v 3.42 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include  "Object.hh"
@@ -28,6 +28,7 @@
 #include  "ObjectClassAttribute.hh"
 #include  "ObjectClassSet.hh"
 #include  "ObjectClassBroadcastList.hh"
+#include  "NM_Classes.hh"
 
 #include "SocketTCP.hh"
 #include "PrettyDebug.hh"
@@ -122,8 +123,8 @@
     G.Out(pdGendoc,"      ObjectClass::broadcastClassMessage 
handle=%d",handle);
 
     // 2. Update message attribute list by removing child's attributes.
-    if ((ocbList->message->type == NetworkMessage::REFLECT_ATTRIBUTE_VALUES) ||
-        (ocbList->message->type == 
NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION)) {
+    if ((ocbList->message->getType() == 
NetworkMessage::REFLECT_ATTRIBUTE_VALUES) ||
+        (ocbList->message->getType() == 
NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION)) {
         int attr = 0 ;
         while (attr < ocbList->message->handleArraySize) {
             // If the attribute is not in that class, remove it from
@@ -139,7 +140,7 @@
     }
 
     // 3. Add class/attributes subscribers to the list.
-    switch(ocbList->message->type) {
+    switch(ocbList->message->getType()) {
       case NetworkMessage::DISCOVER_OBJECT:
       case NetworkMessage::REMOVE_OBJECT: {
           // For each federate, add it to list if at least one attribute has
@@ -205,7 +206,7 @@
 #else
         socket = server->getSocketLink(theFederate);
 #endif
-        msg->write(socket);
+        msg->send(socket);
     }
     catch (RTIinternalError &e) {
         D.Out(pdExcept,
@@ -232,13 +233,11 @@
     for (int i = 0 ; i < nbAttributes ; i++) {
         toFederate = diffusionList->DiffArray[i].federate ;
         if (toFederate != 0) {
-            NetworkMessage answer;
-            answer.type = type ;
-            answer.federation = server->federation();
-            answer.federate = theFederate ;
-            answer.exception = e_NO_EXCEPTION ;
-            answer.object = theObjectHandle ;
-            strcpy(answer.label, theTag);
+            std::auto_ptr<NetworkMessage> answer(NM_Factory::create(type));    
     
+            answer->federation = server->federation();
+            answer->federate = theFederate ;            
+            answer->object = theObjectHandle ;
+            answer->setLabel(theTag);
 
             int index = 0 ;
             for (int j = i ; j < nbAttributes ; j++) {
@@ -246,14 +245,14 @@
                     D.Out(pdDebug, "handle : %u",
                           diffusionList->DiffArray[j].attribute);
                     diffusionList->DiffArray[j].federate = 0 ;
-                    answer.handleArray[index] = diffusionList
+                    answer->handleArray[index] = diffusionList
                         ->DiffArray[j].attribute ;
                     index++ ;
                 }
             }
-            answer.handleArraySize = index ;
+            answer->handleArraySize = index ;
             D.Out(pdDebug, "Envoi message type %u ", type);
-            sendToFederate(&answer, toFederate);
+            sendToFederate(answer.get(), toFederate);
         }
     }
 }
@@ -356,8 +355,7 @@
               "Object %u deleted in class %u, now broadcasting...",
               the_object, handle);
 
-        NetworkMessage *answer = new NetworkMessage ;
-        answer->type = NetworkMessage::REMOVE_OBJECT ;
+        NetworkMessage *answer = 
NM_Factory::create(NetworkMessage::REMOVE_OBJECT);        
         answer->federation = server->federation();
         answer->federate = the_federate ;
         answer->exception = e_NO_EXCEPTION ;
@@ -365,10 +363,8 @@
         answer->object = the_object ;
         
        // with time
-        answer->date = theTime ;
-        answer->boolean = true ;
-        
-       strcpy(answer->label, the_tag);
+        answer->setDate(theTime);              
+           answer->setLabel(the_tag);
 
         ocbList = new ObjectClassBroadcastList(answer, 0);
         broadcastClassMessage(ocbList);
@@ -426,19 +422,15 @@
               "Object %u deleted in class %u, now broadcasting...",
               the_object, handle);
 
-        NetworkMessage *answer = new NetworkMessage ;
-        answer->type = NetworkMessage::REMOVE_OBJECT ;
+        NetworkMessage *answer = 
NM_Factory::create(NetworkMessage::REMOVE_OBJECT);        
         answer->federation = server->federation();
         answer->federate = the_federate ;
-        answer->exception = e_NO_EXCEPTION ;
         answer->objectClass = handle ; // Class Handle
         answer->object = the_object ;
         
        // without time
-        answer->date = 0 ;
-        answer->boolean = false ;
         
-       strcpy(answer->label, the_tag);
+           answer->setLabel(the_tag);
 
         ocbList = new ObjectClassBroadcastList(answer, 0);
         broadcastClassMessage(ocbList);
@@ -750,14 +742,15 @@
               "Object %u registered in class %u, now broadcasting...",
               the_object->getHandle(), handle);
 
-        NetworkMessage *answer = new NetworkMessage ;
-        answer->type = NetworkMessage::DISCOVER_OBJECT ;
+        NM_Discover_Object *answer = new NM_Discover_Object();       
         answer->federation = server->federation();
         answer->federate = the_federate ;
         answer->exception = e_NO_EXCEPTION ;
         answer->objectClass = handle ; // Class Handle
         answer->object = the_object->getHandle();
         answer->setLabel(the_object->getName().c_str());
+       // BUG FIXME strange!!
+       //answer->setDate(0.0);
 
         ocbList = new ObjectClassBroadcastList(answer, 0);
         broadcastClassMessage(ocbList);
@@ -793,25 +786,26 @@
 
     // Else, send message for each object
     list<Object *>::const_iterator o ;
-    for (o = objectSet.begin(); o != objectSet.end(); o++) {
+    for (o = objectSet.begin(); o != objectSet.end(); ++o) {
        if ((*o)->getOwner() != federate) {
-           NetworkMessage message ;
+           NM_Discover_Object message;
            D.Out(pdInit,
                  "Sending DiscoverObj to Federate %d for Object %u in class %u 
",
-                 federate, (*o)->getHandle(), handle, message.label);
+                 federate, (*o)->getHandle(), handle, 
message.getLabel().c_str());
            
-           message.type = NetworkMessage::DISCOVER_OBJECT ;
            message.federation = server->federation();
            message.federate = federate ;
            message.exception = e_NO_EXCEPTION ;
            message.objectClass = super_handle ;
            message.object = (*o)->getHandle();
            message.setLabel((*o)->getName().c_str());
+           //BUG FIXME strange!!
+           //message.setDate(0.0);
            
            Socket *socket = NULL ;
            try {
                socket = server->getSocketLink(federate);
-               message.write(socket);
+               message.send(socket);
            }
            catch (RTIinternalError &e) {
                D.Out(pdExcept,
@@ -905,17 +899,14 @@
     // Prepare and Broadcast message for this class
     ObjectClassBroadcastList *ocbList = NULL ;
     if (server != NULL) {
-        NetworkMessage *answer = new NetworkMessage ;
-        answer->type = NetworkMessage::REFLECT_ATTRIBUTE_VALUES ;
+        NetworkMessage *answer = 
NM_Factory::create(NetworkMessage::REFLECT_ATTRIBUTE_VALUES);        
         answer->federation = server->federation();
         answer->federate = the_federate ;
         answer->exception = e_NO_EXCEPTION ;
         answer->object = object->getHandle();
         // with time
-        answer->date = the_time ;
-        answer->boolean = true ;
-
-        strcpy(answer->label, the_tag);
+        answer->setDate(the_time);        
+        answer->setLabel(the_tag);
 
         answer->handleArraySize = the_size ;
 
@@ -970,17 +961,14 @@
     // Prepare and Broadcast message for this class
     ObjectClassBroadcastList *ocbList = NULL ;
     if (server != NULL) {
-        NetworkMessage *answer = new NetworkMessage ;
-        answer->type = NetworkMessage::REFLECT_ATTRIBUTE_VALUES ;
+        NetworkMessage *answer = 
NM_Factory::create(NetworkMessage::REFLECT_ATTRIBUTE_VALUES) ;      
         answer->federation = server->federation();
         answer->federate = the_federate ;
         answer->exception = e_NO_EXCEPTION ;
         answer->object = object->getHandle();
         // without time
-        answer->date = 0 ;
-        answer->boolean = false ;
 
-        strcpy(answer->label, the_tag);
+        answer->setLabel(the_tag);
 
         answer->handleArraySize = the_size ;
 
@@ -1057,8 +1045,8 @@
     FederateHandle NewOwner ;
 
     if (server != NULL) {
-        NetworkMessage *AnswerAssumption = new NetworkMessage ;
-        NetworkMessage AnswerDivestiture;
+        NetworkMessage *AnswerAssumption = 
NM_Factory::create(NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION) ;
+        NM_Attribute_Ownership_Divestiture_Notification AnswerDivestiture;
 
         AnswerAssumption->handleArraySize = theListSize ;
 
@@ -1114,25 +1102,21 @@
         }
 
         if (compteur_divestiture !=0) {
-            AnswerDivestiture.type =
-                NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION ;
             AnswerDivestiture.federation = server->federation();
             AnswerDivestiture.federate = theFederateHandle ;
-            AnswerDivestiture.exception = e_NO_EXCEPTION ;
             AnswerDivestiture.object = theObjectHandle ;
-            strcpy(AnswerDivestiture.label, "\0");
+            AnswerDivestiture.setLabel(std::string(""));
             AnswerDivestiture.handleArraySize = compteur_divestiture ;
 
             sendToFederate(&AnswerDivestiture, theFederateHandle);
         }
 
         if (compteur_assumption !=0) {
-            AnswerAssumption->type = 
NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION ;
             AnswerAssumption->federation = server->federation();
             AnswerAssumption->federate = theFederateHandle ;
             AnswerAssumption->exception = e_NO_EXCEPTION ;
             AnswerAssumption->object = theObjectHandle ;
-            strcpy(AnswerAssumption->label, theTag);
+            AnswerAssumption->setLabel(theTag);
             AnswerAssumption->handleArraySize = compteur_assumption ;
 
             List = new ObjectClassBroadcastList(AnswerAssumption,
@@ -1209,16 +1193,13 @@
                 throw AttributeAlreadyBeingAcquired("");
         }
 
-        NetworkMessage *Answer_notification = new NetworkMessage ;
-        Answer_notification->type =
-            NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION ;
+        NetworkMessage *Answer_notification = 
NM_Factory::create(NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION);
        
         Answer_notification->federation = server->federation();
         Answer_notification->federate = the_federate ;
         Answer_notification->exception = e_NO_EXCEPTION ;
         Answer_notification->object = the_object ;
 
-        NetworkMessage *Answer_unavailable = new NetworkMessage ;
-        Answer_unavailable->type = 
NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE ;
+        NetworkMessage *Answer_unavailable = 
NM_Factory::create(NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE) ;        
         Answer_unavailable->federation = server->federation();
         Answer_unavailable->federate = the_federate ;
         Answer_unavailable->exception = e_NO_EXCEPTION ;
@@ -1335,11 +1316,11 @@
 
     int compteur_assumption = 0 ;
     int compteur_acquisition = 0 ;
-    NetworkMessage *AnswerAssumption = NULL ;
+    NM_Request_Attribute_Ownership_Assumption *AnswerAssumption = NULL ;
     ObjectClassBroadcastList *List = NULL ;
     FederateHandle NewOwner ;
     if (server != NULL) {
-        AnswerAssumption = new NetworkMessage ;
+        AnswerAssumption = new NM_Request_Attribute_Ownership_Assumption();
         AnswerAssumption->handleArraySize = theListSize ;
         CDiffusion *diffusionAcquisition = new CDiffusion();
 
@@ -1384,12 +1365,11 @@
         }
 
         if (compteur_assumption != 0) {
-            AnswerAssumption->type = 
NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION ;
             AnswerAssumption->federation = server->federation();
             AnswerAssumption->federate = theFederateHandle ;
             AnswerAssumption->exception = e_NO_EXCEPTION ;
             AnswerAssumption->object = theObjectHandle ;
-            strcpy(AnswerAssumption->label, "\0");
+            AnswerAssumption->setLabel(std::string(""));
             AnswerAssumption->handleArraySize = compteur_assumption ;
 
             List = new ObjectClassBroadcastList(AnswerAssumption,
@@ -1474,9 +1454,8 @@
             throw ObjectClassNotPublished("");
         }
 
-        NetworkMessage *AnswerNotification = new NetworkMessage ;
-        AnswerNotification->type =
-            NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION ;
+        NetworkMessage *AnswerNotification = 
NM_Factory::create(NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION);
+
         AnswerNotification->federation = server->federation();
         AnswerNotification->federate = theFederateHandle ;
         AnswerNotification->exception = e_NO_EXCEPTION ;
@@ -1698,9 +1677,7 @@
                 throw AttributeAcquisitionWasNotRequested("");
         }
 
-        NetworkMessage *answer_confirmation = new NetworkMessage ;
-        answer_confirmation->type =
-            
NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION ;
+        NetworkMessage *answer_confirmation = 
NM_Factory::create(NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION);
                 
         answer_confirmation->federation = server->federation();
         answer_confirmation->federate = federate_handle ;
         answer_confirmation->exception = e_NO_EXCEPTION ;
@@ -1829,4 +1806,4 @@
 
 } // namespace certi
 
-// $Id: ObjectClass.cc,v 3.41 2007/12/05 12:29:40 approx Exp $
+// $Id: ObjectClass.cc,v 3.42 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/XmlParser.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/XmlParser.cc,v
retrieving revision 3.25
retrieving revision 3.26
diff -u -b -r3.25 -r3.26
--- libCERTI/XmlParser.cc       4 Dec 2007 11:00:59 -0000       3.25
+++ libCERTI/XmlParser.cc       26 Apr 2008 14:59:40 -0000      3.26
@@ -158,7 +158,6 @@
 void
 XmlParser::parseClass(ObjectClass* parent)
 {
-       xmlChar* tmpXmlChar = NULL;
     D[pdTrace] << "New Object Class" << endl ;    
 
     xmlNodePtr prev = cur ;

Index: libCERTI/ObjectClassAttribute.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassAttribute.cc,v
retrieving revision 3.27
retrieving revision 3.28
diff -u -b -r3.27 -r3.28
--- libCERTI/ObjectClassAttribute.cc    31 Oct 2007 10:30:19 -0000      3.27
+++ libCERTI/ObjectClassAttribute.cc    26 Apr 2008 14:59:40 -0000      3.28
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClassAttribute.cc,v 3.27 2007/10/31 10:30:19 erk Exp $
+// $Id: ObjectClassAttribute.cc,v 3.28 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "ObjectClassAttribute.hh"
@@ -191,7 +191,7 @@
 ObjectClassAttribute::updateBroadcastList(ObjectClassBroadcastList *ocblist,
                                          const RTIRegion *region)
 {
-    switch(ocblist->message->type) {
+    switch(ocblist->message->getType()) {
 
       case NetworkMessage::REFLECT_ATTRIBUTE_VALUES: {
          addFederatesIfOverlap(*ocblist, region, handle);
@@ -209,4 +209,4 @@
 
 } // namespace
 
-// $Id: ObjectClassAttribute.cc,v 3.27 2007/10/31 10:30:19 erk Exp $
+// $Id: ObjectClassAttribute.cc,v 3.28 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/MessageBuffer.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/MessageBuffer.cc,v
retrieving revision 3.8
retrieving revision 3.9
diff -u -b -r3.8 -r3.9
--- libCERTI/MessageBuffer.cc   18 Mar 2008 15:53:42 -0000      3.8
+++ libCERTI/MessageBuffer.cc   26 Apr 2008 14:59:40 -0000      3.9
@@ -143,7 +143,7 @@
 
 uint32_t MessageBuffer::resize(uint32_t newSize) {
        reallocate(newSize);
-       return newSize;
+       return bufferMaxSize;
 }
 
 void MessageBuffer::assumeSize(uint32_t size) {        
@@ -204,7 +204,7 @@
 int32_t MessageBuffer::read_uint8s(uint8_t* data, uint32_t n) {        
        if (n + readOffset > writeOffset) {
                std::stringstream smsg;
-               smsg << __func__ << "::invalid read of siwritePtrze <" << n
+               smsg << __func__ << "::invalid read of size <" << n
                                << "> inside a buffer of readable size <"
                                << (int32_t)writeOffset-readOffset << "> 
(writeOffset="
                                <<writeOffset << ",readOffset="<<readOffset 
<<").";

Index: libCERTI/ObjectClass.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.hh,v
retrieving revision 3.31
retrieving revision 3.32
diff -u -b -r3.31 -r3.32
--- libCERTI/ObjectClass.hh     5 Dec 2007 12:29:40 -0000       3.31
+++ libCERTI/ObjectClass.hh     26 Apr 2008 14:59:40 -0000      3.32
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClass.hh,v 3.31 2007/12/05 12:29:40 approx Exp $
+// $Id: ObjectClass.hh,v 3.32 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_OBJECT_CLASS_HH
@@ -197,7 +197,7 @@
                RTIinternalError);
 
     void broadcastClassMessage(ObjectClassBroadcastList *ocb_list,
-                              const Object * = 0);
+                              const Object * = NULL);
 
     ObjectClassBroadcastList *
     updateAttributeValues(FederateHandle, Object *, AttributeHandle *,
@@ -260,4 +260,4 @@
 
 #endif // _CERTI_OBJECT_CLASS_HH
 
-// $Id: ObjectClass.hh,v 3.31 2007/12/05 12:29:40 approx Exp $
+// $Id: ObjectClass.hh,v 3.32 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/Interaction.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.cc,v
retrieving revision 3.35
retrieving revision 3.36
diff -u -b -r3.35 -r3.36
--- libCERTI/Interaction.cc     11 Dec 2007 19:46:53 -0000      3.35
+++ libCERTI/Interaction.cc     26 Apr 2008 14:59:40 -0000      3.36
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Interaction.cc,v 3.35 2007/12/11 19:46:53 erk Exp $
+// $Id: Interaction.cc,v 3.36 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -27,6 +27,7 @@
 #include "Interaction.hh"
 #include "InteractionBroadcastList.hh"
 #include "PrettyDebug.hh"
+#include "NM_Classes.hh"
 
 #include <iostream>
 #include <sstream>
@@ -407,16 +408,14 @@
     // Prepare and Broadcast message for this class
     InteractionBroadcastList *ibList = NULL ;
     if (server != NULL) {
-        NetworkMessage *answer = new NetworkMessage ;
-        answer->type = NetworkMessage::RECEIVE_INTERACTION ;
+        NetworkMessage *answer = 
NM_Factory::create(NetworkMessage::RECEIVE_INTERACTION) ;       
         answer->exception = e_NO_EXCEPTION ;
         answer->federation = server->federation();
         answer->federate = federate_handle ;
         answer->interactionClass = handle ; // Interaction Class Handle
-        answer->setBoolean(true) ; // with time
-       answer->date = time ;
+           answer->setDate(time);
 
-        strcpy(answer->label, the_tag);
+        answer->setLabel(the_tag);
 
         answer->handleArraySize = list_size ;
         for (int i = 0 ; i < list_size ; i++) {
@@ -467,15 +466,14 @@
     // Prepare and Broadcast message for this class
     InteractionBroadcastList *ibList = NULL ;
     if (server != NULL) {
-        NetworkMessage *answer = new NetworkMessage ;
-        answer->type = NetworkMessage::RECEIVE_INTERACTION ;
+        NetworkMessage *answer = 
NM_Factory::create(NetworkMessage::RECEIVE_INTERACTION) ;        
         answer->exception = e_NO_EXCEPTION ;
         answer->federation = server->federation();
         answer->federate = federate_handle ;
         answer->interactionClass = handle ; // Interaction Class Handle
        answer->setBoolean(false) ; // without time
 
-        strcpy(answer->label, the_tag);
+        answer->setLabel(the_tag);
 
         answer->handleArraySize = list_size ;
         for (int i = 0 ; i < list_size ; i++) {
@@ -553,4 +551,4 @@
 
 } // namespace certi
 
-// $Id: Interaction.cc,v 3.35 2007/12/11 19:46:53 erk Exp $
+// $Id: Interaction.cc,v 3.36 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/InteractionBroadcastList.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionBroadcastList.hh,v
retrieving revision 3.7
retrieving revision 3.8
diff -u -b -r3.7 -r3.8
--- libCERTI/InteractionBroadcastList.hh        4 Apr 2005 14:51:24 -0000       
3.7
+++ libCERTI/InteractionBroadcastList.hh        26 Apr 2008 14:59:40 -0000      
3.8
@@ -17,7 +17,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: InteractionBroadcastList.hh,v 3.7 2005/04/04 14:51:24 breholee Exp $
+// $Id: InteractionBroadcastList.hh,v 3.8 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef CERTI_INTERACTION_BROADCAST_LIST_HH
@@ -55,8 +55,9 @@
     void addFederate(FederateHandle theFederate);
     void sendPendingMessage(SecurityServer *Server);
 
-    /*! The Message to be broadcast. This message must be allocated before
-      calling the constructor of the class, be is deleted by the destructor.
+    /** 
+     * The Message to be broadcasted. This message must be allocated before
+     * calling the constructor of the class, be is deleted by the destructor.
     */
     NetworkMessage *message ;
 
@@ -70,4 +71,4 @@
 
 #endif // CERTI_INTERACTION_BROADCAST_LIST_HH
 
-// $Id: InteractionBroadcastList.hh,v 3.7 2005/04/04 14:51:24 breholee Exp $
+// $Id: InteractionBroadcastList.hh,v 3.8 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/BasicMessage.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/BasicMessage.cc,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -b -r3.9 -r3.10
--- libCERTI/BasicMessage.cc    6 Jul 2007 09:25:17 -0000       3.9
+++ libCERTI/BasicMessage.cc    26 Apr 2008 14:59:40 -0000      3.10
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: BasicMessage.cc,v 3.9 2007/07/06 09:25:17 erk Exp $
+// $Id: BasicMessage.cc,v 3.10 2008/04/26 14:59:40 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -54,6 +54,70 @@
     return extents ;
 }
 
+void 
+BasicMessage::serialize(MessageBuffer& msgBuffer) {
+       /* Write Extent */
+       D[pdDebug] << "Serialize " << extents.size() << " extent(s)" << endl;
+       msgBuffer.write_int32(static_cast<int32_t>(extents.size()));
+       if (extents.size() > 0) {
+               int n = extents[0].size();
+               msgBuffer.write_int32(static_cast<int32_t>(n));
+               D[pdDebug] << "Extent with " << n << " range(s)" << endl;
+               for (unsigned int i = 0; i < extents.size(); ++i) {
+                       const Extent &e = extents[i];
+
+                       for (int h = 1; h <= n; ++h) {
+                               
msgBuffer.write_int32(static_cast<int32_t>(e.getRangeLowerBound(h)));
+                               
msgBuffer.write_int32(static_cast<int32_t>(e.getRangeUpperBound(h)));
+                       }
+               }
+       }
+       /* Write Region */
+       int32_t n = regions.size();
+       msgBuffer.write_int32(n);
+       for (int i = 0; i < n; ++i) {
+               msgBuffer.write_int32(regions[i]);
+       }
+} /* end of serialize */
+
+void 
+BasicMessage::deserialize(MessageBuffer& msgBuffer) {
+       /* Deserialize Extents */
+       int32_t nb_extents;
+       int32_t temp;
+       msgBuffer.read_int32(&nb_extents);
+       D[pdDebug] << "Deserialize " << nb_extents << " extent(s)" << endl;
+
+       extents.clear();
+       if (nb_extents > 0) {
+               extents.reserve(nb_extents);
+               int32_t nb_dimensions;
+               msgBuffer.read_int32(&nb_dimensions);
+               D[pdDebug] << "Extent with " << nb_dimensions << " range(s)" << 
endl;
+               for (long i = 0; i < nb_extents; ++i) {
+                       Extent e(nb_dimensions);
+
+                       for (long h = 1; h <= nb_dimensions; ++h) {
+                               msgBuffer.read_int32(&temp);
+                               e.setRangeLowerBound(h, temp);
+                               msgBuffer.read_int32(&temp);
+                               e.setRangeUpperBound(h, temp);
+                       }
+                       extents.push_back(e);
+               }
+       }
+       /* Deserialize Regions */
+       int32_t n;
+       msgBuffer.read_int32(&n);
+       regions.clear();
+       regions.reserve(n);
+       for (int i = 0; i < n; ++i) {
+               msgBuffer.read_int32(&temp);
+               regions.push_back(temp);
+       }
+
+} /* end of serialize */
+
 // ----------------------------------------------------------------------------
 /** Write the 'extent' Message attribute into the body. Format : number of
     extents. If not zero, number of dimensions. The list of extents. Extent
@@ -157,4 +221,4 @@
 
 } // namespace certi
 
-// $Id: BasicMessage.cc,v 3.9 2007/07/06 09:25:17 erk Exp $
+// $Id: BasicMessage.cc,v 3.10 2008/04/26 14:59:40 erk Exp $

Index: libCERTI/MessageBuffer.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/MessageBuffer.hh,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -b -r3.6 -r3.7
--- libCERTI/MessageBuffer.hh   3 Mar 2008 15:15:09 -0000       3.6
+++ libCERTI/MessageBuffer.hh   26 Apr 2008 14:59:40 -0000      3.7
@@ -249,6 +249,20 @@
        std::string
        read_string();
 
+       int32_t
+       write_bool(const bool toggle) {
+               if(toggle) {
+                       return write_uint8(1);
+               } else {
+                       return write_uint8(0);
+               }
+       };
+       
+       bool
+       read_bool() {   
+               return (1==read_uint8());
+       };
+
        MessageBuffer& operator<<(const uint8_t data) {
                this->write_uint8(data);
                return *this;

Index: libCERTI/BasicMessage.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/BasicMessage.hh,v
retrieving revision 3.7
retrieving revision 3.8
diff -u -b -r3.7 -r3.8
--- libCERTI/BasicMessage.hh    22 Jun 2007 08:51:36 -0000      3.7
+++ libCERTI/BasicMessage.hh    26 Apr 2008 14:59:41 -0000      3.8
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: BasicMessage.hh,v 3.7 2007/06/22 08:51:36 erk Exp $
+// $Id: BasicMessage.hh,v 3.8 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef LIBCERTI_BASIC_MESSAGE
@@ -27,6 +27,7 @@
 
 #include "Extent.hh"
 #include "MessageBody.hh"
+#include "MessageBuffer.hh"
 #include "BaseRegion.hh"
 #include <vector>
 
@@ -48,9 +49,10 @@
     void setRegions(const std::vector<RegionHandle> &);
     const std::vector<RegionHandle> &getRegions() const ;
 
-        virtual void trace(const char* context)=0;
-        
 protected:
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       
     void readExtents(const MessageBody &);
     void writeExtents(MessageBody &) const ;
 
@@ -59,10 +61,17 @@
 
     std::vector<Extent> extents ;
     std::vector<RegionHandle> regions ;
+    /**
+     * The buffer used to easilly serialize/deserialize a message
+     * in order to easilly send/receive message content using socket
+     * like API.
+     */
+    MessageBuffer msgBuf;
+
 };
 
 } // namespace certi
 
 #endif // LIBCERTI_BASIC_MESSAGE
 
-// $Id: BasicMessage.hh,v 3.7 2007/06/22 08:51:36 erk Exp $
+// $Id: BasicMessage.hh,v 3.8 2008/04/26 14:59:41 erk Exp $

Index: libCERTI/ObjectClassBroadcastList.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassBroadcastList.cc,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- libCERTI/ObjectClassBroadcastList.cc        29 Nov 2007 20:36:08 -0000      
3.18
+++ libCERTI/ObjectClassBroadcastList.cc        26 Apr 2008 14:59:41 -0000      
3.19
@@ -19,13 +19,14 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClassBroadcastList.cc,v 3.18 2007/11/29 20:36:08 rousse Exp $
+// $Id: ObjectClassBroadcastList.cc,v 3.19 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 
 
 #include "ObjectClassBroadcastList.hh"
 #include "PrettyDebug.hh"
+#include "NM_Classes.hh"
 
 using std::list ;
 
@@ -58,22 +59,21 @@
     G.Out(pdGendoc,"enter ObjectClassBroadcastList::adaptMessage");
     G.Out(pdGendoc,"      message->objectClass=%d",message->objectClass);
 
-    if ((message->type != NetworkMessage::REFLECT_ATTRIBUTE_VALUES) &&
-        (message->type != 
NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION))
+    if ((message->getType() != NetworkMessage::REFLECT_ATTRIBUTE_VALUES) &&
+        (message->getType() != 
NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION))
         throw RTIinternalError("Bad Message type in Broadcast's AdaptMsg.");
 
     // Copy static informations.
-    NetworkMessage *reducedMessage = new NetworkMessage ;
-    reducedMessage->type = message->type ;
+    NetworkMessage *reducedMessage = NM_Factory::create(message->getType());   
 
     reducedMessage->exception = message->exception ;
     reducedMessage->federation = message->federation ;
     reducedMessage->federate = message->federate ;
     reducedMessage->object = message->object ;
-    reducedMessage->date = message->date ;
-    reducedMessage->boolean = message->boolean ; // Useful ?
+    reducedMessage->setDate(message->getDate());
+    reducedMessage->boolean = message->boolean ; // FIXME Useful ?
     reducedMessage->objectClass = message->objectClass ;
 
-    strcpy(reducedMessage->label, message->label);
+    reducedMessage->setLabel(message->getLabel());
 
     // Copy attributes that are in the bsWaiting state in Line.
     UShort currentSize ;
@@ -96,7 +96,7 @@
             // Copy Attribute Handle.
             reducedMessage->handleArray[currentSize] = currentAttrib ;
 
-            if (message->type == NetworkMessage::REFLECT_ATTRIBUTE_VALUES) {
+            if (message->getType() == 
NetworkMessage::REFLECT_ATTRIBUTE_VALUES) {
                 // Copy Attribute Value.
                 message->getValue(i, &length, buffer);
                 reducedMessage->setValue(currentSize, buffer, length);
@@ -241,7 +241,7 @@
 
     // Pour chaque ligne de la liste
     list<ObjectBroadcastLine *>::iterator i ;
-    for (i = lines.begin(); i != lines.end(); i++) {
+    for (i = lines.begin(); i != lines.end(); ++i) {
         // Si le federe attend un message(attribute 0 en attente)
         if ((*i)->state[0] == ObjectBroadcastLine::waiting) {
 
@@ -250,7 +250,7 @@
                   "Broadcasting message to Federate %d.", (*i)->Federate);
             try {
                 socket = server->getSocketLink((*i)->Federate);
-                message->write(socket);
+                message->send(socket);
             }
             catch (RTIinternalError &e) {
                 D.Out(pdExcept,
@@ -285,7 +285,7 @@
 void ObjectClassBroadcastList::sendPendingMessage(SecurityServer *server)
 {
     G.Out(pdGendoc,"enter ObjectClassBroadcastList::sendPendingMessage");
-    switch (message->type) {
+    switch (message->getType()) {
 
       case NetworkMessage::REFLECT_ATTRIBUTE_VALUES:
       case NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION:
@@ -356,7 +356,7 @@
                 socket = server->getSocketLink((*i)->Federate);
 #endif
                 G.Out(pdGendoc,"                                 
sendPendingRAVMessage=====> write");
-                currentMessage->write(socket);
+                currentMessage->send(socket);
             }
             catch (RTIinternalError &e) {
                 D.Out(pdExcept,
@@ -391,4 +391,4 @@
 
 } // namespace certi
 
-// $Id: ObjectClassBroadcastList.cc,v 3.18 2007/11/29 20:36:08 rousse Exp $
+// $Id: ObjectClassBroadcastList.cc,v 3.19 2008/04/26 14:59:41 erk Exp $

Index: libCERTI/NetworkMessage_RW.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/NetworkMessage_RW.cc,v
retrieving revision 3.46
retrieving revision 3.47
diff -u -b -r3.46 -r3.47
--- libCERTI/NetworkMessage_RW.cc       3 Apr 2008 15:21:51 -0000       3.46
+++ libCERTI/NetworkMessage_RW.cc       26 Apr 2008 14:59:41 -0000      3.47
@@ -16,1049 +16,132 @@
 // License along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: NetworkMessage_RW.cc,v 3.46 2008/04/03 15:21:51 rousse Exp $
+// $Id: NetworkMessage_RW.cc,v 3.47 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
-
-
-
 #include "NetworkMessage.hh"
 #include "PrettyDebug.hh"
 
-using std::vector ;
+using std::vector;
 using std::endl;
 using std::cout;
 
 namespace certi {
 
-static pdCDebug D("RTIG_MSG","(NetWorkMS) - ");
-static PrettyDebug G("GENDOC",__FILE__);
-
-// ----------------------------------------------------------------------------
-void NetworkMessage::trace(const char* context)
-{
-#ifndef NDEBUG
-D.Mes(pdMessage,'N',this->type,context);
-#endif
-}
-
-// ----------------------------------------------------------------------------
-// readBody
-void
-NetworkMessage::readBody(Socket *socket)
-{
-    MessageBody body ;
-    unsigned short i ;
-    // G.Out(pdGendoc,"enter NetworkMessage::readBody");
-    if (Header.bodySize == 0)
-        throw RTIinternalError("ReadBody should not have been called.");
-
-    // 1. Read Body from socket.
-    socket->receive((void *) body.getBuffer(), Header.bodySize);
-    // FIXME EN: we must update the write pointer of the 
-        //           MessageBody because we have just written 
-        //           on it using direct pointer access !! (nasty usage)
-        body.addToWritePointer(Header.bodySize);
-        
-    // 3. Read informations from Message Body according to message type.
-       //D.Mes(pdMessage, 'N',Header.type);
-       this->trace("NetworkMessage::readBody ");
-
-    if (Header.exception != e_NO_EXCEPTION) {
-        body.readString(exceptionReason, MAX_EXCEPTION_REASON_LENGTH);
-    }
-    else {
-    switch(Header.type) {
-      // line number, FEDid, Value Array size and Value array (line contents)
-      case GET_FED_FILE:
-        number = body.readShortInt();
-        readFEDid(body);
-        if ( number >= 1 )  // open (0) and close (0) no more information
-            {
-            ValueArray[0].length = body.readLongInt();
-            body.readBlock(ValueArray[0].value, ValueArray[0].length) ;
-           }
-       break ;
-            
-      case UPDATE_ATTRIBUTE_VALUES:
-       object = body.readLongInt();
-       readLabel(body);
-       boolean = body.readLongInt();   // true means with time
-       body.readBlock((char *) handleArray, handleArraySize * 
sizeof(AttributeHandle));
-       for (i = 0 ; i < handleArraySize ; i ++) {
-            ValueArray[i].length = body.readLongInt();
-            body.readBlock(ValueArray[i].value, ValueArray[i].length) ;
-       }
-       break ;
-
-      case REFLECT_ATTRIBUTE_VALUES:
-       object = body.readLongInt();
-       readLabel(body);
-       boolean = body.readLongInt();    // true means with time
-       body.readBlock((char *) handleArray, handleArraySize * 
sizeof(AttributeHandle));
-       for (i = 0 ; i < handleArraySize ; i ++) {
-            ValueArray[i].length = body.readLongInt();
-            body.readBlock(ValueArray[i].value, ValueArray[i].length) ;
-       }
-       break ;
-
-      case PROVIDE_ATTRIBUTE_VALUE_UPDATE:
-       object = body.readLongInt();
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       break ;
-
-       
-       // -- O_I Variable Part With Date(Body Not Empty) --
-      case SEND_INTERACTION:
-      case RECEIVE_INTERACTION:
-       readLabel(body);
-       boolean = body.readLongInt();   // true means with time
-       body.readBlock((char *) handleArray,
-                      handleArraySize * sizeof(AttributeHandle));
-       for (i = 0 ; i < handleArraySize ; i ++) {
-            ValueArray[i].length = body.readLongInt() ;
-            body.readBlock(ValueArray[i].value, ValueArray[i].length) ;
-       }
-       region = body.readLongInt();
-       break ;
-
-
-      case REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE:
-       object = body.readLongInt();
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       break ;
-               
-      case CREATE_FEDERATION_EXECUTION:
-       readFederationName(body);
-       readFEDid(body);
-       break ;
-
-      case DESTROY_FEDERATION_EXECUTION:
-       readFederationName(body);
-       break ;
-       
-      case REGISTER_FEDERATION_SYNCHRONIZATION_POINT:
-       readLabel(body);
-       readTag(body);
-       boolean = body.readLongInt();
-        // boolean true means there is an handleArray
-        if ( boolean)
-            {
-            handleArraySize = body.readShortInt();
-           for (i = 0 ; i < handleArraySize ; i ++)
-               handleArray[i] = body.readShortInt();
-            }
-       break ;
-
-      case ANNOUNCE_SYNCHRONIZATION_POINT:
-       readLabel(body);
-       readTag(body);
-       break ;
-       
-      case SYNCHRONIZATION_POINT_ACHIEVED:
-      case SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED:
-      case FEDERATION_SYNCHRONIZED:
-      case REQUEST_FEDERATION_RESTORE:
-       readLabel(body);
-       break ;
-
-      case REQUEST_FEDERATION_RESTORE_SUCCEEDED:
-       readLabel(body);
-       break ;
-
-      case INITIATE_FEDERATE_RESTORE:
-       readLabel(body);
-       break ;
-
-      case INITIATE_FEDERATE_SAVE:
-       readLabel(body);
-        // boolean true means with time (in the header)
-       boolean = body.readLongInt();
-       break ;
-
-      case REQUEST_FEDERATION_SAVE:
-       readLabel(body);
-        // boolean true means with time (in the header)
-        boolean = body.readLongInt();
-       break ;
-       
-      case REQUEST_FEDERATION_RESTORE_FAILED:
-       readLabel(body);
-       readTag(body);
-       break ;
-
-      case DELETE_OBJECT:
-      case REMOVE_OBJECT:
-       object = body.readLongInt();
-       boolean = body.readLongInt();   // true means with time
-       readLabel(body);
-       break ;
-
-       // -- No Variable Part --
-
-      case IS_ATTRIBUTE_OWNED_BY_FEDERATE:
-      case INFORM_ATTRIBUTE_OWNERSHIP:
-      case ATTRIBUTE_IS_NOT_OWNED:
-      case QUERY_ATTRIBUTE_OWNERSHIP:
-       object = body.readLongInt();
-       handleArray[0] = body.readShortInt();
-       readLabel(body);
-       break ;
-
-      case NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE:
-       object = body.readLongInt();
-       handleArraySize = body.readShortInt();
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       readLabel(body);
-       break ;
-
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION:
-      case ATTRIBUTE_OWNERSHIP_UNAVAILABLE:
-      case UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION:
-      case CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE:
-      case CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION:
-       object = body.readLongInt();
-       handleArraySize = body.readShortInt();
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       break ;
-
-      case DDM_CREATE_REGION:
-       space = body.readLongInt();
-       nbExtents = body.readLongInt();
-       region = body.readLongInt();
-       break ;
-
-       // -- Join Variable Part --
-
-      case JOIN_FEDERATION_EXECUTION:
-       readFederationName(body);
-       readFederateName(body);
-       break ;
-
-       // -- O_I Variable Part(Body not empty) --
-
-      case PUBLISH_OBJECT_CLASS:
-      case SUBSCRIBE_OBJECT_CLASS:
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       break ;
-
-      case REGISTER_OBJECT:
-      case DISCOVER_OBJECT:
-       object = body.readLongInt();
-       readLabel(body);
-       break ;
-
-      case DDM_MODIFY_REGION:
-       readExtents(body);
-       break ;
-
-      case DDM_ASSOCIATE_REGION:
-       object = body.readLongInt();
-       region = body.readLongInt();
-       boolean = body.readLongInt();
-       handleArraySize = body.readShortInt();
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       break ;
-
-      case DDM_SUBSCRIBE_ATTRIBUTES:
-       objectClass = body.readLongInt();
-       region = body.readLongInt();
-       boolean = body.readLongInt();
-       handleArraySize = body.readShortInt();
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       break ;
-
-      case DDM_UNASSOCIATE_REGION:
-       object = body.readLongInt();
-       region = body.readLongInt();
-       break ;
-
-      case DDM_UNSUBSCRIBE_ATTRIBUTES:     
-       objectClass = body.readLongInt();
-       region = body.readLongInt();
-       break ;
-
-      case DDM_SUBSCRIBE_INTERACTION:
-      case DDM_UNSUBSCRIBE_INTERACTION:
-       interactionClass = body.readLongInt();
-       region = body.readLongInt();
-       boolean = body.readLongInt();
-       break ;
-
-      case DDM_REGISTER_OBJECT:
-       objectClass = body.readLongInt();
-       object = body.readLongInt();
-       region = body.readLongInt();
-       readTag(body);
-       handleArraySize = body.readShortInt();
-       for (i = 0 ; i < handleArraySize ; i ++)
-           handleArray[i] = body.readShortInt();
-       break ;
-           
-      default:
-       D.Out(pdExcept, "Unknown type %d in ReadBody.", Header.type);
-       throw RTIinternalError("Unknown/Unimplemented type for body.");
-    }
-    }
-    // G.Out(pdGendoc,"exit NetworkMessage::readBody");
-}
+static PrettyDebug D("RTIG_MSG", "NetworkMessage:");
+static PrettyDebug G("GENDOC",__FILE__ );
 
 // ----------------------------------------------------------------------------
-bool
-NetworkMessage::readHeader(Socket *socket)
-{
-    // G.Out(pdGendoc,"enter NetworkMessage::readHeader");
-    // 1- Read Header from Socket
-    socket->receive((void *) &Header, sizeof(HeaderStruct));
-    // 2- Parse Header(Static Part)
-    type = Header.type ;
-    exception = Header.exception ;
-    federate = Header.federate ;
-    federation = Header.federation ;
-    // If the message carry an exception, the Body will only contain the
-    // exception reason.
-
-    if (exception != e_NO_EXCEPTION)
-        {
-        // G.Out(pdGendoc,"exit  Message::readHeader carrying an exception");
-        return true ;
+void NetworkMessage::serialize(MessageBuffer& msgBuffer) {
+       G.Out(pdGendoc,"enter NetworkMessage::serialize");
+       /* We serialize the common Network messages part 
+        * ALL Network Message will contain the following
+        */     
+       if ((type==NOT_USED) || (type==LAST)) {
+               throw RTIinternalError("Invalid network type (not a valid 
type);");
+       }
+       D.Out(pdDebug, "Serialize <%s>", getName().c_str());
+       /* type of message */
+       msgBuffer.write_int32(type);
+       msgBuffer.write_int32(exception);
+       msgBuffer.write_int32(federate);
+       msgBuffer.write_int32(federation);
+       /*
+        * "builtin" Optional part
+        * The subclass may chose in the constructor the variable part.
+        * isDated may be chosen on Message instance basis
+        * (same message may Dated or Not Dated) 
+        */
+       msgBuffer.write_bool(isDated);
+       if (isDated) {
+               msgBuffer.write_double(date);
+       }       
+       msgBuffer.write_bool(isLabelled);
+       if (isLabelled) {
+               msgBuffer.write_string(label);
+       }
+       msgBuffer.write_bool(isTagged);
+       if (isTagged) {
+               msgBuffer.write_string(tag);
+       }
+       G.Out(pdGendoc,"exit NetworkMessage::serialize");
+} /* end of serialize */
+
+void NetworkMessage::deserialize(MessageBuffer& msgBuffer) {
+       G.Out(pdGendoc,"enter NetworkMessage::deserialize");
+       /* We serialize the common Network message part 
+        * ALL Network Messages will contain the following
+        */     
+       D[pdDebug] << "Deserialize <" << getName().c_str()<<">"<<endl;  
+       /* deserialize common part */
+       type        = 
static_cast<certi::NetworkMessage::Type>(msgBuffer.read_int32());
+       exception   = static_cast<certi::TypeException>(msgBuffer.read_int32());
+       federate    = msgBuffer.read_int32();
+       federation  = msgBuffer.read_int32();
+       /*
+        * "builtin" Optional part
+        * The subclass may chose in the constructor the variable part.
+        * isDated may be chosen on Message instance basis
+        * (same message may Dated or Not Dated) 
+        */
+       isDated = msgBuffer.read_bool();
+       if (isDated) {
+               date = msgBuffer.read_double();
+       }
+       isLabelled = msgBuffer.read_bool();
+       if (isLabelled) {
+               label = msgBuffer.read_string();
+       }
+       isTagged = msgBuffer.read_bool();
+       if (isTagged) {
+               tag = msgBuffer.read_string();
         }
+       G.Out(pdGendoc,"exit NetworkMessage::deserialize");
+} /* end of deserialize */
 
-    // 2- Parse Header according to its type(Variable Part)
-    switch (Header.type) {
-      case MESSAGE_NULL:
-       date = Header.VP.time.date ;
-       break ;
-
-      case REQUEST_FEDERATION_SAVE:
-       date = Header.VP.O_I.date ;
-       break ;
-
-      case UPDATE_ATTRIBUTE_VALUES:
-       objectClass = Header.VP.O_I.handle ;
-       handleArraySize = Header.VP.O_I.size ;
-       date = Header.VP.O_I.date ;
-       break ;
-
-      case REFLECT_ATTRIBUTE_VALUES:
-       objectClass = Header.VP.O_I.handle ;
-       handleArraySize = Header.VP.O_I.size ;
-       date = Header.VP.O_I.date ;
-       break ;
-
-      case PROVIDE_ATTRIBUTE_VALUE_UPDATE:
-       objectClass = Header.VP.O_I.handle ;
-       handleArraySize = Header.VP.O_I.size ;
-       date = Header.VP.O_I.date ;
-       break ;
-
-      case SEND_INTERACTION:
-      case RECEIVE_INTERACTION:
-       interactionClass = Header.VP.O_I.handle ;
-       handleArraySize = Header.VP.O_I.size ;
-       date = Header.VP.O_I.date ;
-       break ;
-
-      case INITIATE_FEDERATE_SAVE:
-       date = Header.VP.O_I.date ;
-       break ;
-
-      case REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE:
-       handleArraySize = Header.VP.O_I.size ;
-        break;
-       
-      case REQUEST_FEDERATION_RESTORE:
-      case INITIATE_FEDERATE_RESTORE:
-      case REQUEST_FEDERATION_RESTORE_SUCCEEDED:
-      case REQUEST_FEDERATION_RESTORE_FAILED:
-      case CREATE_FEDERATION_EXECUTION:
-      case DESTROY_FEDERATION_EXECUTION:
-      case REGISTER_FEDERATION_SYNCHRONIZATION_POINT:
-      case SYNCHRONIZATION_POINT_ACHIEVED:
-      case SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED:
-      case FEDERATION_SYNCHRONIZED:
-      case ANNOUNCE_SYNCHRONIZATION_POINT:
-      case DELETE_OBJECT:
-      case REMOVE_OBJECT:
-        date = Header.VP.O_I.date;
-       break;
-      case CLOSE_CONNEXION:
-      case RESIGN_FEDERATION_EXECUTION:
-      case IS_ATTRIBUTE_OWNED_BY_FEDERATE:
-      case INFORM_ATTRIBUTE_OWNERSHIP:
-      case ATTRIBUTE_IS_NOT_OWNED:
-      case QUERY_ATTRIBUTE_OWNERSHIP:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION:
-      case ATTRIBUTE_OWNERSHIP_UNAVAILABLE:
-      case NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION:
-      case UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE:
-      case ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION:
-      case CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE:
-      case CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION:
-      case DDM_CREATE_REGION:
-      case FEDERATE_SAVE_BEGUN:
-      case FEDERATE_SAVE_COMPLETE:
-      case FEDERATE_SAVE_NOT_COMPLETE:
-      case FEDERATION_SAVED:
-      case FEDERATION_NOT_SAVED:
-      case FEDERATE_RESTORE_COMPLETE:
-      case FEDERATE_RESTORE_NOT_COMPLETE:
-      case FEDERATION_RESTORE_BEGUN:
-      case FEDERATION_RESTORED:
-      case FEDERATION_NOT_RESTORED:
-      case DDM_ASSOCIATE_REGION:
-      case DDM_UNASSOCIATE_REGION:
-      case DDM_SUBSCRIBE_ATTRIBUTES:
-      case DDM_UNSUBSCRIBE_ATTRIBUTES:
-      case DDM_SUBSCRIBE_INTERACTION:
-      case DDM_UNSUBSCRIBE_INTERACTION:
-      case DDM_REGISTER_OBJECT:
-      case GET_FED_FILE:
-       break ;
-
-      case SET_TIME_REGULATING:
-       date = Header.VP.time.date ;
-       regulator = Header.VP.time.R_or_C ;
-       break ;
-
-      case SET_TIME_CONSTRAINED:
-       date = Header.VP.time.date ;
-       constrained = Header.VP.time.R_or_C ;
-       break ;
-
-      case CHANGE_ATTRIBUTE_TRANSPORT_TYPE:
-      case CHANGE_ATTRIBUTE_ORDER_TYPE:
-      case CHANGE_INTERACTION_TRANSPORT_TYPE:
-      case CHANGE_INTERACTION_ORDER_TYPE:
-       throw RTIinternalError("Read Message not implemented for T/O.");
-       break ;
-
-       // -- Join Variable Part(No body) --
-
-      case JOIN_FEDERATION_EXECUTION:
-       numberOfRegulators = Header.VP.Join.NbReg ;
-       multicastAddress = Header.VP.Join.AdrMC ;
-       bestEffortAddress = Header.VP.Join.Addr ;
-       bestEffortPeer = Header.VP.Join.peer ;
-       break ;
-
-       // -- O_I Variable Part(No body) --
-
-      case UNPUBLISH_OBJECT_CLASS:
-      case UNSUBSCRIBE_OBJECT_CLASS:
-       objectClass = Header.VP.O_I.handle ;
-       break ;
-
-      case PUBLISH_INTERACTION_CLASS:
-      case UNPUBLISH_INTERACTION_CLASS:
-      case SUBSCRIBE_INTERACTION_CLASS:
-      case UNSUBSCRIBE_INTERACTION_CLASS:
-      case TURN_INTERACTIONS_ON:
-      case TURN_INTERACTIONS_OFF:
-       interactionClass = Header.VP.O_I.handle ;
-       break ;
-
-       // DDM variable part
-      case DDM_DELETE_REGION:
-       region = Header.VP.ddm.region ;
-       break ;
-
-       // -- O_I Variable Part(body not empty) --
-
-      case PUBLISH_OBJECT_CLASS:
-      case SUBSCRIBE_OBJECT_CLASS:
-       objectClass = Header.VP.O_I.handle ;
-       handleArraySize = Header.VP.O_I.size ;
-       break ;
-
-      case REGISTER_OBJECT:
-      case DISCOVER_OBJECT:
-       objectClass = Header.VP.O_I.handle ;
-       break ;
-
-      case DDM_MODIFY_REGION:
-       region = Header.VP.ddm.region ;
-       break ;
-
-       // -- Default Handler --
-
-      default:
-       D.Out(pdExcept, "Unknown type %d in ReadHeader.", Header.type);
-        // G.Out(pdGendoc,"exit  NetworkMessage::readHeader with unknown 
type=%d",Header.type);
-       throw RTIinternalError("Received unknown Header type.");
-    }
-
-    // 4- If Header.bodySize is not 0, return RTI_TRUE, else RTI_FALSE
-    // G.Out(pdGendoc,"exit  NetworkMessage::readHeader");
-    return Header.bodySize ;
-}
-
-// ----------------------------------------------------------------------------
 void
-NetworkMessage::writeBody(Socket *socket)
-{
-    MessageBody body ;
-    unsigned short i ;
-
-    // G.Out(pdGendoc,"enter NetworkMessage::writeBody");
-
-    // 0- Copy the Header at the beginning of the body, in order to
-    // make a single Socket->Emettre call while sending both.
-    // WARNING: As the body size is not known yet, we will have to
-    // change it in the copy also!
-    body.writeBlock(reinterpret_cast<char *>(&Header), sizeof(HeaderStruct));
-    
-    D.Out(pdTrace, "HeaderStruct size is : <%d> out of <%d> bytes MAX in 
body\n",
-         sizeof(HeaderStruct),BUFFER_SIZE_DEFAULT);
-
-   // If the message carry an exception, the Body will only contain the
-   // exception reason.
-
-   if (Header.exception != e_NO_EXCEPTION) {
-        body.writeString(exceptionReason);
-   }
-   else
-    {
-    // 1- Prepare body Structure according to Message type
-    switch(Header.type) {
-      case GET_FED_FILE:
-        body.writeShortInt(number);
-        writeFEDid(body);
-        if ( number >= 1 )  // open (0) and close (0) no more information
-            {
-            body.writeLongInt(ValueArray[0].length);
-            body.writeBlock(ValueArray[0].value, ValueArray[0].length);
-            }
-      break;
+NetworkMessage::send(Socket *socket) throw (NetworkError, NetworkSignal) {
+       G.Out(pdGendoc,"enter NetworkMessage::send");
+       /* 0- reset send buffer */
+       msgBuf.reset();
+       /* 1- serialize the message
+        * This is a polymorphic call 
+        * which may specialized in a daughter class  
+        */
+       serialize(msgBuf);
+       /* 2- update message buffer 'reserved bytes' header */
+       msgBuf.updateReservedBytes();
+       D.Out(pdDebug,"Sending <%s> whose buffer has <%u> 
bytes",getName().c_str(),msgBuf.size());
+       //msgBuf.show(msgBuf(0),5);
+       /* 3- effectively send the raw message to socket */
+       socket->send(static_cast<unsigned char*>(msgBuf(0)), msgBuf.size());
+       G.Out(pdGendoc,"exit  NetworkMessage::send");
+} /* end of send */
 
-      case UPDATE_ATTRIBUTE_VALUES:
-       body.writeLongInt(object);
-       body.writeString(label);
-       body.writeLongInt(boolean);    // true means with time (stored in 
header)
-       body.writeBlock((char *) handleArray, handleArraySize * 
sizeof(AttributeHandle));
-       
-       for (i = 0 ; i < handleArraySize ; i ++) {
-            body.writeLongInt(ValueArray[i].length) ;
-            body.writeBlock(ValueArray[i].value, ValueArray[i].length);
-       }
-       break ;
-
-      case REFLECT_ATTRIBUTE_VALUES:
-       body.writeLongInt(object);
-       body.writeString(label);
-        body.writeLongInt(boolean);
-       body.writeBlock((char *) handleArray, handleArraySize * 
sizeof(AttributeHandle));       
-       for (i = 0 ; i < handleArraySize ; i ++) {
-            body.writeLongInt(ValueArray[i].length) ;
-            body.writeBlock(ValueArray[i].value, ValueArray[i].length);
-       }
-       break ;
-
-      case PROVIDE_ATTRIBUTE_VALUE_UPDATE:
-       body.writeLongInt(object);
-       for (i = 0 ; i < handleArraySize ; i ++)
-            {
-           body.writeShortInt(handleArray[i]);
-           } 
-       break ;
-       
-       // -- O_I Variable Part With date(body Not Empty) --
-           
-      case SEND_INTERACTION:
-      case RECEIVE_INTERACTION:
-       body.writeString(label);
-       body.writeLongInt(boolean);    // true means with time (stored in 
header)
-       body.writeBlock((char *) handleArray,
-                       handleArraySize * sizeof(AttributeHandle));
-       for (i = 0 ; i < handleArraySize ; i ++) {
-            body.writeLongInt(ValueArray[i].length);
-            body.writeBlock(ValueArray[i].value, ValueArray[i].length);
-       }
-        body.writeLongInt(region);
-       break ;
-
-      case REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE:
-       body.writeLongInt(object);      
-       for (i = 0 ; i < handleArraySize ; i ++)
-            {
-           body.writeShortInt(handleArray[i]);
-           } 
-        break;
-       
-       // -- No Variable Part --
-
-      case CREATE_FEDERATION_EXECUTION:
-       writeFederationName(body);
-        writeFEDid(body);
-       break ;
-
-      case DESTROY_FEDERATION_EXECUTION:
-       writeFederationName(body);
-       break ;
-
-      case REGISTER_FEDERATION_SYNCHRONIZATION_POINT:
-       body.writeString(label);
-       body.writeString(tag);
-       body.writeLongInt(boolean);
-        // boolean true means we have an handleArray
-        if ( boolean )
-            {
-           body.writeShortInt(handleArraySize);
-           for (i = 0 ; i < handleArraySize ; i ++)
-               body.writeShortInt(handleArray[i]);
-            }        
-       break ;
-
-      case ANNOUNCE_SYNCHRONIZATION_POINT:
-       body.writeString(label);
-       body.writeString(tag);       
-       break ;
-
-      case SYNCHRONIZATION_POINT_ACHIEVED:
-      case SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED:
-      case FEDERATION_SYNCHRONIZED:
-      case REQUEST_FEDERATION_RESTORE:
-       body.writeString(label);
-       break ;
-
-      case REQUEST_FEDERATION_RESTORE_SUCCEEDED:
-       body.writeString(label);
-       break ;
-
-
-      case INITIATE_FEDERATE_RESTORE:
-       body.writeString(label);
-       break ;
-
-      case INITIATE_FEDERATE_SAVE:
-       body.writeString(label);
-        // boolean true means with time (in the header)
-        body.writeLongInt(boolean);
-       break ;
-
-      case REQUEST_FEDERATION_SAVE:
-        body.writeString(label);
-        // boolean true means with time (in the header)
-        body.writeLongInt(boolean);
-       break ;
-
-      case REQUEST_FEDERATION_RESTORE_FAILED:
-       body.writeString(label);
-       body.writeString(tag);
-       break ;
-
-      case DELETE_OBJECT:
-      case REMOVE_OBJECT:
-       body.writeLongInt(object);
-       body.writeLongInt(boolean);    // true means with time (stored in 
header)
-       body.writeString(label);
-       break ;
-
-      case IS_ATTRIBUTE_OWNED_BY_FEDERATE:
-      case INFORM_ATTRIBUTE_OWNERSHIP:
-      case ATTRIBUTE_IS_NOT_OWNED:
-      case QUERY_ATTRIBUTE_OWNERSHIP:
-       body.writeLongInt(object);
-       body.writeShortInt(handleArray[0]);
-       body.writeString(label);
-       break ;
-
-      case NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE:
-       body.writeLongInt(object);
-       body.writeShortInt(handleArraySize);
-       for (i = 0 ; i < handleArraySize ; i ++)
-           body.writeShortInt(handleArray[i]);
-       body.writeString(label);
-       break ;
-
-
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION:
-      case ATTRIBUTE_OWNERSHIP_UNAVAILABLE:
-      case UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION:
-      case CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE:
-      case CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION:
-       body.writeLongInt(object);
-       body.writeShortInt(handleArraySize);
-       for (i = 0 ; i < handleArraySize ; i ++)
-           body.writeShortInt(handleArray[i]);
-       break ;
-
-      case DDM_CREATE_REGION:
-       body.writeLongInt(space);
-       body.writeLongInt(nbExtents);
-       body.writeLongInt(region);
-       break ;
-
-       // -- Join Variable Part --
-
-      case JOIN_FEDERATION_EXECUTION:
-       writeFederationName(body);
-       body.writeString(federateName);
-       break ;
-
-       // -- O_I Variable Part(body not empty) --
-
-      case PUBLISH_OBJECT_CLASS:
-      case SUBSCRIBE_OBJECT_CLASS:
-       for (i = 0 ; i < handleArraySize ; i ++)
-           body.writeShortInt(handleArray[i]);
-       break ;
-
-      case REGISTER_OBJECT:
-      case DISCOVER_OBJECT:
-       body.writeLongInt(object);
-       body.writeString(label);
-       break ;
-
-      case DDM_MODIFY_REGION:
-       writeExtents(body);
-       break ;
-
-      case DDM_ASSOCIATE_REGION:
-       body.writeLongInt(object);
-       body.writeLongInt(region);
-       body.writeLongInt(boolean);
-       body.writeShortInt(handleArraySize);
-       for (i = 0 ; i < handleArraySize ; i ++)
-           body.writeShortInt(handleArray[i]);
-       break ;
-
-      case DDM_SUBSCRIBE_ATTRIBUTES:
-       body.writeLongInt(objectClass);
-       body.writeLongInt(region);
-       body.writeLongInt(boolean);
-       body.writeShortInt(handleArraySize);
-       for (i = 0 ; i < handleArraySize ; i ++)
-           body.writeShortInt(handleArray[i]);
-       break ;
-
-      case DDM_UNASSOCIATE_REGION:
-       body.writeLongInt(object);
-       body.writeLongInt(region);
-       break ;
-
-      case DDM_UNSUBSCRIBE_ATTRIBUTES:
-       body.writeLongInt(objectClass);
-       body.writeLongInt(region);
-       break ;
-           
-      case DDM_SUBSCRIBE_INTERACTION:
-      case DDM_UNSUBSCRIBE_INTERACTION:
-       body.writeLongInt(interactionClass);
-       body.writeLongInt(region);
-       body.writeLongInt(boolean);
-       break ;
-
-      case DDM_REGISTER_OBJECT:
-       body.writeLongInt(objectClass);
-       body.writeLongInt(object);
-       body.writeLongInt(region);
-       body.writeString(tag);
-       body.writeShortInt(handleArraySize);
-       for (i = 0 ; i < handleArraySize ; i ++)
-           body.writeShortInt(handleArray[i]);
-       break ;
-           
-       // -- Default Handler --
-      default:
-       D.Out(pdExcept, "Unknown type %d in Writebody.", Header.type);
-       throw RTIinternalError("Unknown/Unimplemented type for Header.");
-    }
- }
-
-    // body Size does not include the copy of the Header!
-    Header.bodySize = body.size() - sizeof(HeaderStruct);
-
-    // Put the real body Size in the copy of the Header.
-    // FIXME do we really need the body size in the header??
-    (reinterpret_cast<HeaderStruct *>(body.getBufferModeRW()))->bodySize = 
Header.bodySize ;
-    D.Out(pdTrace,"Sending MessageBody of size <%d>",body.size());
-    socket->send(body.getBuffer(), body.size());
-
-    // G.Out(pdGendoc,"exit  NetworkMessage::writeBody");
-}
-
-// ----------------------------------------------------------------------------
-bool
-NetworkMessage::writeHeader(Socket *socket)
-{
-    // G.Out(pdGendoc,"enter NetworkMessage::writeHeader");
-    // 2- Fill Header(Static Part)
-    Header.type = type ;
-    Header.exception = exception ;
-    Header.federate = federate ;
-    Header.federation = federation ;
-    // If the message carry an exception, the Body will only contain the
-    // exception reason.
-
-    if (exception != e_NO_EXCEPTION) {
-        Header.bodySize = 1 ;
-        // G.Out(pdGendoc,"exit  NetworkMessage::writeHeader carrying an 
exception");
-        return true ;
-    }
-
-    // 3- Fill Header(Variable Part)[Sorted by Variable part type]
-    // Note: Header.bodySize is not set to the actual body size, but
-    // to zero to indicate there is no body, or 1 if a body is needed.
-    switch(type) {
-      case MESSAGE_NULL:
-       Header.bodySize = 0 ;
-        Header.VP.time.date = date ;
-       break ;
-       
-      case UPDATE_ATTRIBUTE_VALUES:
-       Header.bodySize = 1 ;
-        Header.VP.O_I.handle = objectClass ;
-        Header.VP.O_I.size = handleArraySize ;
-        Header.VP.O_I.date = date ;
-       break ;
-
-      case REFLECT_ATTRIBUTE_VALUES:
-       Header.bodySize = 1 ;
-        Header.VP.O_I.handle = objectClass ;
-        Header.VP.O_I.size = handleArraySize ;
-        Header.VP.O_I.date = date ;
-       break ;
-
-      case PROVIDE_ATTRIBUTE_VALUE_UPDATE:
-       Header.bodySize = 1 ;
-        Header.VP.O_I.handle = objectClass ;
-        Header.VP.O_I.size = handleArraySize ;
-       break ;
-       
-      case SEND_INTERACTION:
-      case RECEIVE_INTERACTION:
-       // body contains handleArray, ValueArray, label.
-       Header.bodySize = 1 ;
-       Header.VP.O_I.handle = interactionClass ;
-       Header.VP.O_I.size = handleArraySize ;
-       Header.VP.O_I.date = date ;
-       break ;
-
-      case REQUEST_FEDERATION_SAVE:
-       Header.bodySize = 1 ;
-        // boolean true means with time
-        if ( boolean)
-           Header.VP.O_I.date = date ;
-       break ;
-
-      case INITIATE_FEDERATE_SAVE:
-        // boolean true means with time
-        if ( boolean)
-           Header.VP.O_I.date = date ;
-       Header.bodySize = 1 ;
-       break ;
-
-      case REQUEST_FEDERATION_RESTORE:
-      case REQUEST_FEDERATION_RESTORE_SUCCEEDED:
-      case REQUEST_FEDERATION_RESTORE_FAILED:
-       Header.bodySize = 1 ;
-       break ;
-
-      // Body contains Object handle,handleArray
-      case REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE:
-        Header.bodySize = 1 ;
-       Header.VP.O_I.size = handleArraySize ;
-        break;
-
-       // -- No Variable Part, No body --
-
-      case CLOSE_CONNEXION:
-      case RESIGN_FEDERATION_EXECUTION:
-      case FEDERATE_SAVE_BEGUN:
-      case FEDERATE_SAVE_COMPLETE:
-      case FEDERATE_SAVE_NOT_COMPLETE:
-      case FEDERATION_SAVED:
-      case FEDERATION_NOT_SAVED:
-      case FEDERATE_RESTORE_COMPLETE:
-      case FEDERATE_RESTORE_NOT_COMPLETE:
-      case FEDERATION_RESTORE_BEGUN:
-      case FEDERATION_RESTORED:
-      case FEDERATION_NOT_RESTORED:
-       Header.bodySize = 0 ;
-       break ;
-
-       // -- No Variable Part, body not empty --
-
-      case CREATE_FEDERATION_EXECUTION:
-      case DESTROY_FEDERATION_EXECUTION:
-       // body Contains federationName.
-      case INFORM_ATTRIBUTE_OWNERSHIP:
-      case ATTRIBUTE_IS_NOT_OWNED:
-      case IS_ATTRIBUTE_OWNED_BY_FEDERATE:
-      case QUERY_ATTRIBUTE_OWNERSHIP:
-       // body Contains ObjectHandle and label
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION:
-      case ATTRIBUTE_OWNERSHIP_UNAVAILABLE:
-       // body Contains ObjectHandle and handleArray
-      case NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION:
-      case UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE:
-      case ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION:
-      case CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
-      case ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE:
-      case CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION:
-      case CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION:
-      case DDM_CREATE_REGION:
-      case INITIATE_FEDERATE_RESTORE:
-      case DDM_ASSOCIATE_REGION:
-      case DDM_UNASSOCIATE_REGION:
-      case DDM_SUBSCRIBE_ATTRIBUTES:
-      case DDM_UNSUBSCRIBE_ATTRIBUTES:
-      case DDM_SUBSCRIBE_INTERACTION:
-      case DDM_UNSUBSCRIBE_INTERACTION:        
-      case DDM_REGISTER_OBJECT:
-      case GET_FED_FILE:
-       Header.bodySize = 1 ;
-       break ;
-
-      case REGISTER_FEDERATION_SYNCHRONIZATION_POINT:
-      case SYNCHRONIZATION_POINT_ACHIEVED:
-      case SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED:
-      case FEDERATION_SYNCHRONIZED:
-      case ANNOUNCE_SYNCHRONIZATION_POINT:
-       // body Contains Label(should be non-empty)
-       // BUG: S'il fait moins de 16 octet, il passe dans le header.
-       Header.bodySize = 1 ;
-       break ;
-
-      case DELETE_OBJECT:
-        Header.bodySize = 1;
-       Header.VP.O_I.date = date;
-       break;
-      case REMOVE_OBJECT:
-       // body Contains ObjectHandle, and label
-       Header.bodySize = 1 ;
-        if ( boolean)
-           Header.VP.O_I.date = date ;
-       break ;
-
-       // -- time Variable Part(No body)[Continued] --
-
-      case SET_TIME_REGULATING:
-       Header.bodySize = 0 ;
-       Header.VP.time.date = date ;
-       Header.VP.time.R_or_C = regulator ;
-       break ;
-
-      case SET_TIME_CONSTRAINED:
-       Header.bodySize = 0 ;
-       Header.VP.time.date = date ;
-       Header.VP.time.R_or_C = constrained ;
-       break ;
-
-       // -- T_O Variable Part --
-
-      case CHANGE_ATTRIBUTE_TRANSPORT_TYPE:
-      case CHANGE_ATTRIBUTE_ORDER_TYPE:
-      case CHANGE_INTERACTION_TRANSPORT_TYPE:
-      case CHANGE_INTERACTION_ORDER_TYPE:
-       throw RTIinternalError("Write Message not implemented for T/O.");
-       break ;
-
-       // -- Join Variable Part --
-
-      case JOIN_FEDERATION_EXECUTION:
-       // body contains federationName and federateName
-       Header.bodySize = 1 ;
-       Header.VP.Join.NbReg = numberOfRegulators ;
-       Header.VP.Join.AdrMC = multicastAddress ;
-       Header.VP.Join.Addr = bestEffortAddress ;
-       Header.VP.Join.peer = bestEffortPeer ;
-       break ;
-
-       // -- O_I Variable Part(No body) --
-
-      case UNPUBLISH_OBJECT_CLASS:
-      case UNSUBSCRIBE_OBJECT_CLASS:
-       Header.bodySize = 0 ;
-       Header.VP.O_I.handle = objectClass ;
-       break ;
-
-      case PUBLISH_INTERACTION_CLASS:
-      case UNPUBLISH_INTERACTION_CLASS:
-      case SUBSCRIBE_INTERACTION_CLASS:
-      case UNSUBSCRIBE_INTERACTION_CLASS:
-      case TURN_INTERACTIONS_ON:
-      case TURN_INTERACTIONS_OFF:
-       Header.bodySize = 0 ;
-       Header.VP.O_I.handle = interactionClass ;
-       break ;
-
-       // DDM variable part, no body
-      case DDM_DELETE_REGION:
-       Header.bodySize = 0 ;
-       Header.VP.ddm.region = region ;
-       break ;
-
-       // -- O_I Variable Part(body not empty) --
-
-      case PUBLISH_OBJECT_CLASS:
-      case SUBSCRIBE_OBJECT_CLASS:
-       // body contains handleArray[handleArraySize](if not empty)
-
-       if (handleArraySize > 0)
-           Header.bodySize = 1 ;
-       else
-           Header.bodySize = 0 ;
-
-       Header.VP.O_I.handle = objectClass ;
-       Header.VP.O_I.size = handleArraySize ;
-       break ;
-
-      case REGISTER_OBJECT:
-      case DISCOVER_OBJECT:
-       // body Contains ObjectHandle and label
-       Header.bodySize = 1 ;
-       Header.VP.O_I.handle = objectClass ;
-       break ;
-
-      case DDM_MODIFY_REGION:
-       Header.bodySize = 1 ;
-       Header.VP.ddm.region = region ;
-       break ;
-
-      default:
-       D.Out(pdExcept, "Unknown type %d in WriteHeader.", Header.type);
-       throw RTIinternalError("Unknown/Unimplemented type for Header.");
-    }
-
-    if (Header.bodySize == 0)
-        socket->send(reinterpret_cast<unsigned char *>(&Header), 
sizeof(HeaderStruct));
-
-    // G.Out(pdGendoc,"exit  NetworkMessage::writeHeader");
-    return Header.bodySize != 0 ;
-}
+void
+NetworkMessage::receive(Socket* socket) throw (NetworkError, NetworkSignal) {
+       G.Out(pdGendoc,"enter NetworkMessage::receive");
+       /* 0- Reset receive buffer */
+       /* FIXME this reset may not be necessary since we do 
+        * raw-receive + assume-size
+        */
+       msgBuf.reset();
+       /* 1- Read 'reserved bytes' header from socket */
+       //D.Out(pdDebug,"Reading %d 'reserved' bytes",msgBuf.reservedBytes);
+       socket->receive(msgBuf(0), msgBuf.reservedBytes);       
+       //msgBuf.show(msgBuf(0),5);fflush(stdout);
+       /* 2- update (assume) complete message size from reserved bytes */
+       msgBuf.assumeSizeFromReservedBytes();
+       D.Out(pdDebug,"Got a MsgBuf of size %d bytes (including %d 
reserved)",msgBuf.size(),msgBuf.reservedBytes);
+       /* 3- receive the rest of the message */
+       
socket->receive(msgBuf(msgBuf.reservedBytes),msgBuf.size()-msgBuf.reservedBytes);
+       /* 4- deserialize the message 
+        * This is a polymorphic call 
+        * which may specialized in a daughter class  
+        */ 
+       deserialize(msgBuf);
+       G.Out(pdGendoc,"exit  NetworkMessage::receive");        
+} /* end of receive */
 
 } // namespace certi
 
-// $Id: NetworkMessage_RW.cc,v 3.46 2008/04/03 15:21:51 rousse Exp $
+// $Id: NetworkMessage_RW.cc,v 3.47 2008/04/26 14:59:41 erk Exp $

Index: libCERTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libCERTI/CMakeLists.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- libCERTI/CMakeLists.txt     14 Feb 2008 15:29:58 -0000      1.11
+++ libCERTI/CMakeLists.txt     26 Apr 2008 14:59:41 -0000      1.12
@@ -73,6 +73,7 @@
 MessageBuffer.cc MessageBuffer.hh
 Message.cc Message_R.cc Message_W.cc Message.hh
 NetworkMessage.cc NetworkMessage_RW.cc NetworkMessage.hh
+NM_Classes.hh NM_Classes.cc
 Exception.cc Exception.hh
 XmlParser.cc XmlParser.hh
 PrettyDebug.cc PrettyDebEx.cc PrettyDebug.hh

Index: libCERTI/ObjectClassSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.cc,v
retrieving revision 3.31
retrieving revision 3.32
diff -u -b -r3.31 -r3.32
--- libCERTI/ObjectClassSet.cc  5 Dec 2007 12:29:40 -0000       3.31
+++ libCERTI/ObjectClassSet.cc  26 Apr 2008 14:59:41 -0000      3.32
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClassSet.cc,v 3.31 2007/12/05 12:29:40 approx Exp $
+// $Id: ObjectClassSet.cc,v 3.32 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 // Project
@@ -825,4 +825,4 @@
 
 } // namespace certi
 
-// $Id: ObjectClassSet.cc,v 3.31 2007/12/05 12:29:40 approx Exp $
+// $Id: ObjectClassSet.cc,v 3.32 2008/04/26 14:59:41 erk Exp $

Index: libCERTI/NetworkMessage.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/NetworkMessage.cc,v
retrieving revision 3.28
retrieving revision 3.29
diff -u -b -r3.28 -r3.29
--- libCERTI/NetworkMessage.cc  15 Feb 2008 14:16:20 -0000      3.28
+++ libCERTI/NetworkMessage.cc  26 Apr 2008 14:59:41 -0000      3.29
@@ -16,7 +16,7 @@
 // License along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: NetworkMessage.cc,v 3.28 2008/02/15 14:16:20 rousse Exp $
+// $Id: NetworkMessage.cc,v 3.29 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -32,75 +32,45 @@
 
 namespace certi {
 static PrettyDebug G("GENDOC",__FILE__);
-// ----------------------------------------------------------------------------
-void
-NetworkMessage::display(const char *s)
-{
-    printf(" -- NETWORK MESSAGE - %s -", s);
-    if ( type == CREATE_FEDERATION_EXECUTION )
-        printf("CREATE_FEDERATION_EXECUTION : federationName %s : filename %s 
:"
-               " federateHandle %d : federationHandle 
%d\n",federationName,FEDid,federate,federation);
-    if ( type == DESTROY_FEDERATION_EXECUTION )
-      printf("DESTROY_FEDERATION_EXECUTION : federationName %s : federate %d : 
federationHandle %d\n",
-             
((federationName==NULL)?"empty":federationName),federate,federation) ;
-    else if (type == JOIN_FEDERATION_EXECUTION )
-        printf("JOIN_FEDERATION_EXECUTION : federation %s : federate %s 
\n",federationName,federateName);
-    else if (type == FEDERATE_RESTORE_COMPLETE )
-        printf("FEDERATE_RESTORE_COMPLETE : federationHandle %d : 
federatehandle %d \n",federation,federate);
-    else if (type == FEDERATE_SAVE_COMPLETE )
-        printf("FEDERATE_SAVE_COMPLETE : federationHandle %d : federatehandle 
%d \n",federation,federate);
-    else if (type == GET_FED_FILE ) 
-        printf("GET_FED_FILE : number %ld\n",number) ;
-    else
-        printf(" type = %d\n", type);
-        
-    printf(" number = %ld-%d", federate, number);
-    printf(" date = %f ", date);
-    if (exception == 0 )
-        printf("NO_EXCEPTION ");
-    else
-        printf(" exception=%d: ",exception);
-    printf(" ObjectHandle = %ld\n", objectClass);
-    printf(" interactionClass= %ld\n", interactionClass);
-    printf(" object = %ld\n", object);
-    printf(" handleArraySize = %d\n", handleArraySize);
-}
 
 // ----------------------------------------------------------------------------
 NetworkMessage::NetworkMessage()
-    : type(NOT_USED), exception(e_NO_EXCEPTION)
+    : type(NOT_USED), 
+      exception(e_NO_EXCEPTION), 
+      isDated(false), 
+      isLabelled(false), 
+      isTagged(false)
 {
-    exceptionReason[0] = '\0' ;
-
+    name               = std::string("NetworkMessage (generic)");
+    exceptionReason    = std::string("") ;
     number = 0 ;
 
     federation = 0 ;
     federate = 0 ;
 
-    federationName = NULL ;
-    federateName[0] = '\0' ;
-    label[0] = '\0' ;
-    FEDid = NULL ;
+    federationName = std::string("") ;
+    federateName   = std::string("") ;
+        
+    label          = std::string("") ;
+    FEDid          = std::string("") ;
 
     bestEffortPeer = -1 ;
     bestEffortAddress = 0 ;
 
-    // Clear Header
-    memset((void *) &Header, '\0', sizeof(Header));
-
-    date = 0.0 ;
+    date             = 0.0;
 
     object = 0 ;
     objectClass = 0 ;
     interactionClass = 0 ;
 
     handleArraySize = 0 ;
-
-    for ( int i=0 ; i<MAX_ATTRIBUTES_PER_CLASS ; i++ )
-        {
+    for (int i=0 ; i<MAX_ATTRIBUTES_PER_CLASS ; ++i) {
         ValueArray[i].length = 0 ;
         ValueArray[i].value[0]  = '\0' ;
         }
+} /* end of NetworkMessage() */
+
+NetworkMessage::~NetworkMessage() {
 
 }
 
@@ -236,34 +206,6 @@
 }
 
 // ----------------------------------------------------------------------------
-/** read a NetworkMessage
-    First read Header and upon readHeader result read or not the Body with 
readBody
-    @param socket 
-*/
-void
-NetworkMessage::read(Socket *socket)
-    throw (NetworkError, NetworkSignal)
-{
-    // G.Out(pdGendoc,"enter NetworkMessage::read");
-    bool has_body = readHeader(socket);
-
-    if (has_body)
-        readBody(socket);
-    // G.Out(pdGendoc,"exit  NetworkMessage::read");
-}
-
-// ----------------------------------------------------------------------------
-void
-NetworkMessage::write(Socket *socket)
-    throw (NetworkError, NetworkSignal)
-{
-    bool needs_body = writeHeader(socket);
-
-    if (needs_body)
-        writeBody(socket);
-}
-
-// ----------------------------------------------------------------------------
 void
 NetworkMessage::setAHS(const AttributeHandle *attr, int size)
 {
@@ -284,85 +226,7 @@
     boolean = the_bool ;
 }
 
-// ----------------------------------------------------------------------------
-void
-NetworkMessage::readLabel(MessageBody &body)
-{
-    body.readString(label, MAX_USER_TAG_LENGTH);
-}
-
-// ----------------------------------------------------------------------------
-//! Read the tag contained into the message.
-void NetworkMessage::readTag(MessageBody &body)
-{
-    body.readString(tag, MAX_USER_TAG_LENGTH);
-}
-
-// ----------------------------------------------------------------------------
-//! Read the federation name.
-void
-NetworkMessage::readFederationName(MessageBody &body)
-{
-    short federationNameSize ;
-
-    federationNameSize = body.readShortInt() ;
-    federationName = new char[federationNameSize+1] ;
-    if ( federationNameSize == 0 )
-        {
-        federationName[0] = '\0' ;
-        }
-    else
-        body.readString(federationName,federationNameSize);    
-}
-
-// ----------------------------------------------------------------------------
-void
-NetworkMessage::readFederateName(MessageBody &body)
-{
-    body.readString(federateName, MAX_FEDERATE_NAME_LENGTH);
-}
-
-// ----------------------------------------------------------------------------
-// setFEDid
-//
-void
-NetworkMessage::setFEDid(const char *NewFEDid)
-{
-    assert ( NewFEDid != NULL) ;
-    FEDid = new char[strlen(NewFEDid)+1] ;
-    strcpy(FEDid, NewFEDid);
-}
-
-// ----------------------------------------------------------------------------
-void
-NetworkMessage::readFEDid(MessageBody &body)
-{
-    short FEDidSize ;
-    FEDidSize = body.readShortInt() ;
-    FEDid = new char[FEDidSize+1] ;
-    if ( FEDidSize == 0 )
-        FEDid[0] = '\0' ;
-    else
-        body.readString(FEDid,FEDidSize);
-}
-
-// ---------------------------------------------------------------
-void
-NetworkMessage::writeFEDid(MessageBody &body)
-{
-    body.writeShortInt(strlen(FEDid));
-    body.writeString(FEDid);
-}
-
-// ---------------------------------------------------------------
-void
-NetworkMessage::writeFederationName(MessageBody &body)
-{ 
-    assert(federationName != NULL) ;  
-    body.writeShortInt(strlen(federationName));
-    body.writeString(federationName);
-}
 
 } // namespace certi
 
-// $Id: NetworkMessage.cc,v 3.28 2008/02/15 14:16:20 rousse Exp $
+// $Id: NetworkMessage.cc,v 3.29 2008/04/26 14:59:41 erk Exp $

Index: RTIA/main.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/main.cc,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- RTIA/main.cc        12 Mar 2008 15:00:46 -0000      3.18
+++ RTIA/main.cc        26 Apr 2008 14:59:41 -0000      3.19
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: main.cc,v 3.18 2008/03/12 15:00:46 rousse Exp $
+// $Id: main.cc,v 3.19 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -58,8 +58,10 @@
                }
                catch (Exception &e) {
                        cerr << "RTIA:: RTIA has thrown " << e._name << " 
exception." << endl;
+                       cerr.flush();
                        if (e._reason) {
                                cerr << "RTIA:: Reason: " << e._reason << endl;
+                               cerr.flush();
                         rtia.displayStatistics();
                        }
 
@@ -90,4 +92,4 @@
        throw MemoryExhausted("RTIA has exhausted memory error");
 }
 
-// EOF $Id: main.cc,v 3.18 2008/03/12 15:00:46 rousse Exp $
+// EOF $Id: main.cc,v 3.19 2008/04/26 14:59:41 erk Exp $

Index: RTIA/OwnershipManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/OwnershipManagement.cc,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -b -r3.12 -r3.13
--- RTIA/OwnershipManagement.cc 22 Feb 2008 11:34:31 -0000      3.12
+++ RTIA/OwnershipManagement.cc 26 Apr 2008 14:59:41 -0000      3.13
@@ -18,13 +18,14 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: OwnershipManagement.cc,v 3.12 2008/02/22 11:34:31 siron Exp $
+// $Id: OwnershipManagement.cc,v 3.13 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
 #include "OwnershipManagement.hh"
 
 #include "PrettyDebug.hh"
+#include "NM_Classes.hh"
 
 #ifdef _WIN32
 #include <windows.h>
@@ -63,13 +64,12 @@
                                               AttributeHandle theAttribute,
                                               TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Is_Attribute_Owned_By_Federate req ;
 
     D.Out(pdDebug,
           "IS_ATTRIBUTE_OWNED_BY_FEDERATE, attribute %u of object %u",
           theAttribute, theObject);
 
-    req.type = NetworkMessage::IS_ATTRIBUTE_OWNED_BY_FEDERATE ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -81,14 +81,14 @@
     comm->sendMessage(&req);
 
     // waitMessage is only used to verify transmission was OK.
-    comm->waitMessage(&rep,
+    std::auto_ptr<NetworkMessage> rep(comm->waitMessage(
                       NetworkMessage::IS_ATTRIBUTE_OWNED_BY_FEDERATE,
-                      req.federate);
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION)
-        return(rep.label);
+        return(rep->getLabel().c_str());
     else
         return("\0");
 }
@@ -100,13 +100,12 @@
                                              AttributeHandle theAttribute,
                                              TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Query_Attribute_Ownership req;
 
     D.Out(pdDebug,
           "QUERY_ATTRIBUTE_OWNERSHIP, attribute %u from object %u",
           theAttribute, theObject);
 
-    req.type = NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -118,9 +117,9 @@
     comm->sendMessage(&req);
 
     //AttendreMsg ne sert que pour verifier que la transmission a ete OK
-    comm->waitMessage(&rep, NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP, 
req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP, req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 }
 
 // ----------------------------------------------------------------------------
@@ -134,9 +133,8 @@
                                         TypeException &e)
 
 {
-    NetworkMessage req, rep ;
+    NM_Negotiated_Attribute_Ownership_Divestiture req;
 
-    req.type = NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -145,16 +143,16 @@
     for (int i = 0 ; i < attribArraySize ; i++)
         req.handleArray[i] = attribArray[i] ;
 
-    strcpy(req.label, theTag);
+    req.setLabel(theTag);
 
     D.Out(pdDebug, "NEGOTIATED_DIVESTITURE Federate %u ", fm->federate);
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, 
NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE,
-                      req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE,
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 }
 
 // ----------------------------------------------------------------------------
@@ -166,9 +164,8 @@
                                               UShort attribArraySize,
                                               TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Cancel_Negotiated_Attribute_Ownership_Divestiture req;
 
-    req.type = 
NetworkMessage::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -182,11 +179,11 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep,
+    std::auto_ptr<NetworkMessage> rep(comm->waitMessage(
                       
NetworkMessage::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE,
-                      req.federate);
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 }
 
 // ----------------------------------------------------------------------------
@@ -198,9 +195,8 @@
                                          UShort attribArraySize,
                                          TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Attribute_Ownership_Acquisition_If_Available req;
 
-    req.type = NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -213,10 +209,10 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, 
NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE,
-                      req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE,
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 }
 
 // ----------------------------------------------------------------------------
@@ -228,9 +224,8 @@
                                            UShort attribArraySize,
                                            TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Unconditional_Attribute_Ownership_Divestiture req;
 
-    req.type = NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -244,10 +239,10 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, 
NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE,
-                      req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE,
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 }
 
 // ----------------------------------------------------------------------------
@@ -260,9 +255,8 @@
                               const char *theTag,
                               TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Attribute_Ownership_Acquisition req;
 
-    req.type = NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -271,16 +265,16 @@
     for (int i = 0 ; i < attribArraySize ; i++)
         req.handleArray[i] = attribArray[i] ;
 
-    strcpy(req.label, theTag);
+    req.setLabel(theTag);
 
     D.Out(pdDebug, "OWNERSHIP_ACQUISITION Federate %u ", fm->federate);
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION,
-                      req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION,
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 }
 
 // ----------------------------------------------------------------------------
@@ -292,9 +286,8 @@
                                    UShort attribArraySize,
                                    TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Attribute_Ownership_Release_Response req;
 
-    req.type = NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -310,17 +303,17 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, 
NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE,
-                      req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE,
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
         AttributeHandleSet *AttributeSet ;
-        AttributeSet = 
RTI::AttributeHandleSetFactory::create(rep.handleArraySize);
+        AttributeSet = 
RTI::AttributeHandleSetFactory::create(rep->handleArraySize);
 
-        for (int i = 0 ; i < rep.handleArraySize ; i++) {
-            AttributeSet->add(rep.handleArray[i]);
+        for (int i = 0 ; i < rep->handleArraySize ; i++) {
+            AttributeSet->add(rep->handleArray[i]);
         }
 
         return(AttributeSet);
@@ -338,9 +331,8 @@
                                     UShort attribArraySize,
                                     TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Cancel_Attribute_Ownership_Acquisition req;
 
-    req.type = NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObject ;
@@ -353,10 +345,10 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, 
NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION,
-                      req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION,
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 }
 
 // ----------------------------------------------------------------------------
@@ -512,4 +504,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: OwnershipManagement.cc,v 3.12 2008/02/22 11:34:31 siron Exp $
+// $Id: OwnershipManagement.cc,v 3.13 2008/04/26 14:59:41 erk Exp $

Index: RTIA/Files.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/Files.cc,v
retrieving revision 3.8
retrieving revision 3.9
diff -u -b -r3.8 -r3.9
--- RTIA/Files.cc       30 Apr 2005 16:38:39 -0000      3.8
+++ RTIA/Files.cc       26 Apr 2008 14:59:41 -0000      3.9
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: Files.cc,v 3.8 2005/04/30 16:38:39 breholee Exp $
+// $Id: Files.cc,v 3.9 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -43,7 +43,7 @@
     else {
         msg_buffer = tsos.front();
         found = true ;
-        time = msg_buffer->date ;
+        time = msg_buffer->getDate();
     }
 }
 
@@ -113,7 +113,7 @@
 
     if (!tsos.empty()) {
         buffer_msg = tsos.front();
-        if (buffer_msg->date <= heure_logique) {
+        if (buffer_msg->getDate() <= heure_logique) {
             // remove from list but keep pointer to execute
             // ExecuterServiceFedere.
             tsos.pop_front();
@@ -124,7 +124,7 @@
                 NetworkMessage *buffer_msg2 ;
                 buffer_msg2 = tsos.front();
 
-                if (buffer_msg2->date <= heure_logique)
+                if (buffer_msg2->getDate() <= heure_logique)
                     msg_restant = true ;
             }
             return buffer_msg ;
@@ -175,7 +175,7 @@
             // stricly greater because we want to place new message behind
             // older ones with same logical time and thus keep receive order
             // in list.
-            if ((*i)->date > msg->date) {
+            if ((*i)->getDate() > msg->getDate()) {
                 tsos.insert(i, msg);
                 return ;
             }
@@ -186,4 +186,4 @@
 
 }} // namespaces
 
-// $Id: Files.cc,v 3.8 2005/04/30 16:38:39 breholee Exp $
+// $Id: Files.cc,v 3.9 2008/04/26 14:59:41 erk Exp $

Index: RTIA/RTIA.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA.cc,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- RTIA/RTIA.cc        23 Apr 2008 12:55:05 -0000      3.18
+++ RTIA/RTIA.cc        26 Apr 2008 14:59:41 -0000      3.19
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIA.cc,v 3.18 2008/04/23 12:55:05 erk Exp $
+// $Id: RTIA.cc,v 3.19 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -110,17 +110,22 @@
 void
 RTIA::execute()
 {
-    Message *msg_un ;
-    NetworkMessage *msg_tcp_udp ;
+    Message        *msg_un;
+    NetworkMessage *msg_tcp_udp;
     int n ;
 
     while (!fm->_fin_execution) {
 
-        msg_tcp_udp = new NetworkMessage ;
-        msg_un = new Message ;
-
+        /* 
+         * readMessage call will allocate EITHER a Network Message or a 
Message 
+         *   Network Message will come from a virtual constructor call
+         *   Message will come from a "simple" constructor call
+         */
+       msg_un      = NULL;
+       msg_tcp_udp = NULL;
         try {
-            comm->readMessage(n, msg_tcp_udp, msg_un, NULL);
+            comm->readMessage(n, &msg_tcp_udp, &msg_un, NULL);
+            assert((msg_un!=NULL) || (msg_tcp_udp!=NULL));
         }
         catch (NetworkSignal) {
             fm->_fin_execution = true ;
@@ -131,20 +136,14 @@
 
         switch (n) {
           case 0:
-            delete msg_un ;
-            delete msg_tcp_udp ;
             break ;
           case 1:
             processNetworkMessage(msg_tcp_udp);
-            delete msg_un ;
             break ;
           case 2:
             processFederateRequest(msg_un);
-            delete msg_tcp_udp ;
             break ;
           case 3: // timeout
-            delete msg_un ;
-            delete msg_tcp_udp ;
             break ;
           default:
             assert(false);
@@ -154,8 +153,11 @@
         while (!fm->_fin_execution && tm->_blocking_tick) {
            // read a message from the rtig
             // same code is reused, but only the case 1 should match
-            msg_tcp_udp = new NetworkMessage ;
-            msg_un = new Message ;
+               /* NetworkMessage will be allocated by the readMessage call
+                * We may not get a Message in this call see previous comment
+                */
+            msg_un      = NULL;
+            msg_tcp_udp = NULL;
 
             try {
                 if (tm->_tick_timeout != 
std::numeric_limits<double>::infinity() &&
@@ -165,36 +167,31 @@
                     timev.tv_sec = int(tm->_tick_timeout);
                     timev.tv_usec = 
int((tm->_tick_timeout-timev.tv_sec)*1000000.0);
 
-                    comm->readMessage(n, msg_tcp_udp, msg_un, &timev);
+                    comm->readMessage(n, &msg_tcp_udp, &msg_un, &timev);
+                }
+                else {
+                    comm->readMessage(n, &msg_tcp_udp, &msg_un, NULL);
                 }
-                else
-                    comm->readMessage(n, msg_tcp_udp, msg_un, NULL);
 
                 /* timev is undefined after select() */
             }
             catch (NetworkSignal) {
                 fm->_fin_execution = true ;
                 n = 0 ;
-                delete msg_un ;
                 delete msg_tcp_udp ;
             }
 
             switch (n) {
               case 0:
-                delete msg_un;
-                delete msg_tcp_udp;
                 break ;
               case 1:
-                processNetworkMessage(msg_tcp_udp) ;  // could authorize a 
callbak
-                delete msg_un ;
+                processNetworkMessage(msg_tcp_udp) ;  // could authorize a 
callback
                 // may have reset tm->_blocking_tick
                 processOngoingTick();
                 break ;
               case 2:
                 assert(false);
               case 3: // timeout
-                delete msg_un;
-                delete msg_tcp_udp;
                 // stop the ongoing tick() operation
                 tm->_blocking_tick = false;
                 processOngoingTick();
@@ -208,4 +205,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: RTIA.cc,v 3.18 2008/04/23 12:55:05 erk Exp $
+// $Id: RTIA.cc,v 3.19 2008/04/26 14:59:41 erk Exp $

Index: RTIA/TimeManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/TimeManagement.cc,v
retrieving revision 3.32
retrieving revision 3.33
diff -u -b -r3.32 -r3.33
--- RTIA/TimeManagement.cc      23 Apr 2008 07:36:01 -0000      3.32
+++ RTIA/TimeManagement.cc      26 Apr 2008 14:59:41 -0000      3.33
@@ -18,11 +18,12 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: TimeManagement.cc,v 3.32 2008/04/23 07:36:01 siron Exp $
+// $Id: TimeManagement.cc,v 3.33 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
 #include "TimeManagement.hh"
+#include "NM_Classes.hh"
 #include <float.h>
 
 namespace certi {
@@ -95,15 +96,15 @@
 //! Send a null message to RTIG containing Local Time + Lookahead.
 void TimeManagement::sendNullMessage(FederationTime heure_logique)
 {
-    NetworkMessage msg ;
+    NM_Message_Null msg ;
 
+    msg.setDate(heure_logique);
     heure_logique += _lookahead_courant ;
 
     if (heure_logique > lastNullMessageDate) {
-        msg.type = NetworkMessage::MESSAGE_NULL ;
         msg.federation = fm->_numero_federation ;
         msg.federate = fm->federate ;
-        msg.date = heure_logique ;
+        msg.setDate(heure_logique) ; // ? See 6 lines upper !
 
         comm->sendMessage(&msg);
         lastNullMessageDate = heure_logique ;
@@ -120,18 +121,16 @@
 bool
 TimeManagement::executeFederateService(NetworkMessage &msg)
 {
-  G.Out(pdGendoc,"enter TimeManagement::executeFederateService for type 
%d",msg.type);
-  D.Out(pdRequest, "Execute federate service: Type %d.", msg.type);
-
-  msg.trace("TimeManagement::executeFederateService ");
+  G.Out(pdGendoc,"enter TimeManagement::executeFederateService for type 
%d",msg.getType());
+  D.Out(pdRequest, "Execute federate service: Type %d.", msg.getType());
 
     _blocking_tick = false;  // indicate a callback was processed
 
-    switch (msg.type) {
+    switch (msg.getType()) {
 
       case NetworkMessage::FEDERATION_SYNCHRONIZED:
         try {
-            fm->federationSynchronized(msg.label);
+            fm->federationSynchronized(msg.getLabel().c_str());
         }
         catch (RTIinternalError &e) {
             cout << "RTIA:RTIinternalError in federationSynchronized." << endl 
;
@@ -141,7 +140,7 @@
 
       case NetworkMessage::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED:
         try {
-            fm->synchronizationPointRegistrationSucceeded(msg.label);
+            
fm->synchronizationPointRegistrationSucceeded(msg.getLabel().c_str());
         }
         catch (RTIinternalError &e) {
             cout << "RTIA:RTIinternalError in synchronizationPointRegistration"
@@ -152,7 +151,7 @@
 
       case NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT:
         try {
-            fm->announceSynchronizationPoint(msg.label, msg.tag);
+            fm->announceSynchronizationPoint(msg.getLabel().c_str(), 
msg.getTag().c_str());
         }
         catch (RTIinternalError &e) {
             cout << "RTIA:RTIinternalError in announceSynchronizationPoint." 
<< endl ;
@@ -164,8 +163,8 @@
         try {
             om->discoverObject(msg.object,
                                msg.objectClass,
-                               msg.label,
-                               msg.date,
+                               msg.getLabel().c_str(),
+                               msg.getDate(),
                                msg.eventRetraction,
                                msg.exception);
 
@@ -180,13 +179,13 @@
       {
           ValueLengthPair *ValueArray = msg.getAttribValueArray();
 
-          if (msg.getBoolean())
+          if (msg.isDated)
              om->reflectAttributeValues(msg.object,
                                         msg.handleArray,
                                         ValueArray,
                                         msg.handleArraySize,
-                                        msg.date,
-                                        msg.label,
+                                        msg.getDate(),
+                                        msg.getLabel().c_str(),
                                         msg.eventRetraction,
                                         msg.exception);
           else
@@ -194,7 +193,7 @@
                                         msg.handleArray,
                                         ValueArray,
                                         msg.handleArraySize,
-                                        msg.label,
+                                        msg.getLabel().c_str(),
                                         msg.exception);
           free(ValueArray);
           break ;
@@ -214,13 +213,13 @@
       {
           ParameterLengthPair *ValueArray = msg.getParamValueArray();
 
-          if (msg.getBoolean())
+          if (msg.isDated)
               om->receiveInteraction(msg.interactionClass,
                                      msg.handleArray,
                                      ValueArray,
                                      msg.handleArraySize,
-                                     msg.date,
-                                     msg.label,
+                                     msg.getDate(),
+                                     msg.getLabel().c_str(),
                                      msg.eventRetraction,
                                      msg.exception);
           else
@@ -228,7 +227,7 @@
                                      msg.handleArray,
                                      ValueArray,
                                      msg.handleArraySize,
-                                     msg.label,
+                                     msg.getLabel().c_str(),
                                      msg.exception);
           free(ValueArray);
 
@@ -236,18 +235,18 @@
       }
 
       case NetworkMessage::REMOVE_OBJECT:
-          if (msg.getBoolean()) {
+          if (msg.isDated) {
                om->removeObject(msg.object,
                                 msg.federate,
-                                msg.date,
-                                msg.label,
+                                msg.getDate(),
+                                msg.getLabel().c_str(),
                                 msg.eventRetraction,
                                 msg.exception);
          }
          else {
                om->removeObject(msg.object,
                                 msg.federate,
-                                msg.label,
+                                msg.getLabel().c_str(),
                                 msg.exception);
          }
         break ;
@@ -274,7 +273,7 @@
                                                  msg.handleArray,
                                                  msg.handleArraySize,
                                                  msg.federate,
-                                                 msg.label,
+                                                 
const_cast<char*>(msg.getLabel().c_str()),
                                                  msg.exception);
         break ;
 
@@ -305,7 +304,7 @@
         owm->requestAttributeOwnershipRelease(msg.object,
                                               msg.handleArray,
                                               msg.handleArraySize,
-                                              msg.label,
+                                              
const_cast<char*>(msg.getLabel().c_str()),
                                               msg.exception);
         break ;
 
@@ -317,21 +316,21 @@
         break ;
 
       case NetworkMessage::INITIATE_FEDERATE_SAVE:
-        fm->initiateFederateSave(msg.label);
+        fm->initiateFederateSave(msg.getLabel().c_str());
         break ;
 
       case NetworkMessage::FEDERATION_SAVED:
       case NetworkMessage::FEDERATION_NOT_SAVED: {
-          bool status = (msg.type == NetworkMessage::FEDERATION_SAVED) ? true 
: false ;
+          bool status = (msg.getType() == NetworkMessage::FEDERATION_SAVED) ? 
true : false ;
           fm->federationSavedStatus(status);
       }
         break ;
 
       case NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED:
       case NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED: {
-          bool status = (msg.type == 
NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED)
+          bool status = (msg.getType() == 
NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED)
               ? true : false ;
-          fm->requestFederationRestoreStatus(status, msg.label, msg.tag);
+          fm->requestFederationRestoreStatus(status, msg.getLabel().c_str(), 
msg.getTag().c_str());
       }
         break ;
 
@@ -340,20 +339,21 @@
         break ;
 
       case NetworkMessage::INITIATE_FEDERATE_RESTORE:
-        fm->initiateFederateRestore(msg.label, msg.federate);
+        fm->initiateFederateRestore(msg.getLabel().c_str(), msg.federate);
         break ;
 
       case NetworkMessage::FEDERATION_RESTORED:
       case NetworkMessage::FEDERATION_NOT_RESTORED: {
-          bool status = (msg.type == NetworkMessage::FEDERATION_RESTORED) ? 
true : false ;
+          bool status = (msg.getType() == NetworkMessage::FEDERATION_RESTORED) 
? true : false ;
           fm->federationRestoredStatus(status);
       }
         break ;
 
       default:
+       std::stringstream errorMsg;
         D.Out(pdExcept, "Unknown message type in executeFederateService.");
-        msg.display("ERROR");
-        throw RTIinternalError("Unknown message in executeFederateService.");
+       errorMsg << "Unknown message <" <<  msg.getName() << " in 
executeFederateService.";
+        throw RTIinternalError(errorMsg.str().c_str());
     }
     G.Out(pdGendoc,"exit  TimeManagement::executeFederateService");
     return true ;
@@ -585,7 +585,7 @@
 void
 TimeManagement::setTimeConstrained(bool etat, TypeException &e)
 {
-    NetworkMessage msg ;
+    NM_Set_Time_Constrained msg ;
 
     e = e_NO_EXCEPTION ;
 
@@ -600,10 +600,13 @@
     if (e == e_NO_EXCEPTION) {
         _est_contraint = etat ;
 
-        msg.type = NetworkMessage::SET_TIME_CONSTRAINED ;
         msg.federation = fm->_numero_federation ;
         msg.federate = fm->federate ;
-        msg.constrained = etat ;
+        if (etat) {
+               msg.constrainedOn();
+        } else {
+               msg.constrainedOff();
+        }        
 
         comm->sendMessage(&msg);
 
@@ -619,7 +622,7 @@
 void
 TimeManagement::setTimeRegulating(bool etat, TypeException &e)
 {
-    NetworkMessage msg ;
+    NM_Set_Time_Regulating msg ;
 
     e = e_NO_EXCEPTION ;
 
@@ -640,11 +643,14 @@
     if (e == e_NO_EXCEPTION) {
         _est_regulateur = etat ;
 
-        msg.type = NetworkMessage::SET_TIME_REGULATING ;
         msg.federation = fm->_numero_federation ;
         msg.federate = fm->federate ;
-        msg.regulator = etat ;
-        msg.date = _heure_courante + _lookahead_courant ;
+        if (etat) {
+               msg.regulatorOn();
+        } else {
+               msg.regulatorOff();
+        }        
+        msg.setDate(_heure_courante + _lookahead_courant);
 
         comm->sendMessage(&msg);
 
@@ -912,4 +918,4 @@
 
 }} // namespaces
 
-// $Id: TimeManagement.cc,v 3.32 2008/04/23 07:36:01 siron Exp $
+// $Id: TimeManagement.cc,v 3.33 2008/04/26 14:59:41 erk Exp $

Index: RTIA/Communications.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/Communications.cc,v
retrieving revision 3.24
retrieving revision 3.25
diff -u -b -r3.24 -r3.25
--- RTIA/Communications.cc      23 Apr 2008 07:36:00 -0000      3.24
+++ RTIA/Communications.cc      26 Apr 2008 14:59:41 -0000      3.25
@@ -18,13 +18,14 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: Communications.cc,v 3.24 2008/04/23 07:36:00 siron Exp $
+// $Id: Communications.cc,v 3.25 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
 #include "Communications.hh"
 #include <assert.h>
 #include "PrettyDebug.hh"
+#include "NM_Classes.hh"
 
 #ifdef _WIN32
     #include <windows.h>
@@ -54,48 +55,37 @@
 static PrettyDebug G("GENDOC",__FILE__);
 
 // ----------------------------------------------------------------------------
-/*! Wait a message coming from RTIG. Parameters are :
-  1- Returned message,
-  2- Message type expected,
-  3- Federate which sent the message, 0 if indifferent.
-*/
-void Communications::waitMessage(NetworkMessage *msg,
+
+NetworkMessage* Communications::waitMessage(
                                  NetworkMessage::Type type_msg,
                                  FederateHandle numeroFedere)
 {
-    NetworkMessage *tampon ;
-
-    assert(type_msg > 0 && type_msg < 100);
+    assert(type_msg > 0 && type_msg < NetworkMessage::LAST);
+    NetworkMessage *msg = NULL;
 
     D.Out(pdProtocol, "Waiting for Message of Type %d.", type_msg);
 
-    // Does a new message has arrived ?
-    if (searchMessage(type_msg, numeroFedere, msg))
-        return ;
+    // Does a new message of the expected type has arrived ?
+    if (searchMessage(type_msg, numeroFedere, &msg))
+        return msg;
 
     // Otherwise, wait for a message with same type than expected and with
     // same federate number.
-    tampon = new NetworkMessage ;
-    tampon->read((SecureTCPSocket *)this);
+    msg = NM_Factory::receive((SecureTCPSocket *) this);    
 
     D.Out(pdProtocol, "TCP Message of Type %d has arrived.", type_msg);
 
-    while ((tampon->type != type_msg) ||
-           ((numeroFedere != 0) && (tampon->federate != numeroFedere))) {
-        waitingList.push_back(tampon);
-        tampon = new NetworkMessage ;
-        tampon->read((SecureTCPSocket *) this);
-
+    while ((msg->getType() != type_msg) ||
+           ((numeroFedere != 0) && (msg->federate != numeroFedere))) {
+        waitingList.push_back(msg);
+        msg = NM_Factory::receive((SecureTCPSocket *) this);        
         D.Out(pdProtocol, "Message of Type %d has arrived.", type_msg);
     }
 
-    // BUG: Should use copy operator.
-    memcpy((void *) msg, (void *) tampon, sizeof(NetworkMessage));
-    delete tampon ;
-
     assert(msg != NULL);
-    assert(msg->type == type_msg);
-}
+    assert(msg->getType() == type_msg);
+    return msg;
+} /* end of waitMessage */
 
 // ----------------------------------------------------------------------------
 //! Communications.
@@ -141,10 +131,8 @@
     // Advertise RTIG that TCP link is being closed.
     G.Out(pdGendoc,"enter Communications::~Communications");
 
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::CLOSE_CONNEXION ;
-    msg.write((SecureTCPSocket *) this);
-
+    NM_Close_Connexion closeMsg ;    
+    closeMsg.send((SecureTCPSocket *) this);
     SecureTCPSocket::close();
 
     G.Out(pdGendoc,"exit  Communications::~Communications");
@@ -183,7 +171,7 @@
   Returns the actual source in the 1st parameter (RTIG=>1 federate=>2)
 */
 void
-Communications::readMessage(int &n, NetworkMessage *msg_reseau, Message *msg,
+Communications::readMessage(int &n, NetworkMessage **msg_reseau, Message **msg,
                             struct timeval *timeout)
 {
     const int tcp_fd(SecureTCPSocket::returnSocket());
@@ -217,29 +205,27 @@
 
     if (!waitingList.empty()) {
         // One message is in waiting buffer.
-        NetworkMessage *msg2 ;
-        msg2 = waitingList.front();
+        *msg_reseau = waitingList.front();
         waitingList.pop_front();
-        memcpy(msg_reseau, msg2, TAILLE_MSG_RESEAU);
-        delete msg2 ;
         n = 1 ;
     }
     else if (SecureTCPSocket::isDataReady()) {
         // Datas are in TCP waiting buffer.
         // Read a message from RTIG TCP link.
-        msg_reseau->read((SecureTCPSocket *) this);
+       *msg_reseau = NM_Factory::receive((SecureTCPSocket *) this);        
         n = 1 ;
     }
     else if (SocketUDP::isDataReady()) {
         // Datas are in UDP waiting buffer.
         // Read a message from RTIG UDP link.
-        msg_reseau->read((SocketUDP *) this);
+       *msg_reseau = NM_Factory::receive((SocketUDP *) this);       
         n = 1 ;
     }
     else if (SocketUN::isDataReady()) {
         // Datas are in UNIX waiting buffer.
         // Read a message from federate UNIX link.
-        msg->read((SocketUN *) this);
+       (*msg) = new Message();
+        (*msg)->read((SocketUN *) this);
         n = 2 ;
     }
     else {
@@ -251,9 +237,12 @@
                        #else
                                 if(errno == EINTR)
                        #endif
-                throw NetworkSignal("");
-                               else
-                throw NetworkError("");
+                           {
+                throw NetworkSignal("EINTR on select");
+                }
+                               else {
+                 throw NetworkError("Unexpected errno on select");
+                               }
         }
 
         // At least one message has been received, read this message.
@@ -264,24 +253,25 @@
 
         if (_est_init_mc && FD_ISSET(_socket_mc, &fdset)) {
             // Read a message coming from the multicast link.
-            receiveMC(msg_reseau);
+            receiveMC(*msg_reseau);
             n = 1 ;
         }
 #endif
 
         if (FD_ISSET(SecureTCPSocket::returnSocket(), &fdset)) {
             // Read a message coming from the TCP link with RTIG.
-            msg_reseau->read((SecureTCPSocket *) this);
+               (*msg_reseau) = NM_Factory::receive((SecureTCPSocket *) this);  
          
             n = 1 ;
         }
         else if (FD_ISSET(SocketUDP::returnSocket(), &fdset)) {
             // Read a message coming from the UDP link with RTIG.
-            msg_reseau->read((SocketUDP *) this);
+               (*msg_reseau) = NM_Factory::receive((SocketUDP *) this);        
        
             n = 1 ;
         }
         else if (FD_ISSET(_socket_un, &fdset)) {
             // Read a message coming from the federate.
-            receiveUN(msg);
+            (*msg) = new Message();
+            receiveUN(*msg);
             n = 2 ;
         }
         else
@@ -290,7 +280,7 @@
             n = 3;
         }
     }
-}
+} /* end of readMessage */
 
 // ----------------------------------------------------------------------------
 /*! Returns true if a 'type_msg' message coming from federate
@@ -301,18 +291,17 @@
 bool
 Communications::searchMessage(NetworkMessage::Type type_msg,
                               FederateHandle numeroFedere,
-                              NetworkMessage *msg)
+                              NetworkMessage **msg)
 {
     list<NetworkMessage *>::iterator i ;
     for (i = waitingList.begin(); i != waitingList.end(); i++) {
 
         D.Out(pdProtocol, "Rechercher message de type %d .", type_msg);
 
-        if ((*i)->type == type_msg) {
+        if ((*i)->getType() == type_msg) {
             // if numeroFedere != 0, verify that federateNumbers are similar
             if (((*i)->federate == numeroFedere) || (numeroFedere == 0)) {
-                memcpy(msg, (*i), TAILLE_MSG_RESEAU);
-                delete (*i);
+               *msg = *i;                                
                 waitingList.erase(i);
                 D.Out(pdProtocol,
                       "Message of Type %d was already here.",
@@ -328,7 +317,7 @@
 void
 Communications::sendMessage(NetworkMessage *Msg)
 {
-    Msg->write((SecureTCPSocket *) this);
+    Msg->send((SecureTCPSocket *) this);
 }
 
 // ----------------------------------------------------------------------------
@@ -347,4 +336,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: Communications.cc,v 3.24 2008/04/23 07:36:00 siron Exp $
+// $Id: Communications.cc,v 3.25 2008/04/26 14:59:41 erk Exp $

Index: RTIA/DeclarationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/DeclarationManagement.cc,v
retrieving revision 3.17
retrieving revision 3.18
diff -u -b -r3.17 -r3.18
--- RTIA/DeclarationManagement.cc       21 Feb 2008 10:15:24 -0000      3.17
+++ RTIA/DeclarationManagement.cc       26 Apr 2008 14:59:41 -0000      3.18
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: DeclarationManagement.cc,v 3.17 2008/02/21 10:15:24 rousse Exp $
+// $Id: DeclarationManagement.cc,v 3.18 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -26,6 +26,7 @@
 #include "InteractionSet.hh"
 #include "ObjectClassSet.hh"
 #include "DeclarationManagement.hh"
+#include "NM_Classes.hh"
 
 #ifdef _WIN32
 #include <windows.h>
@@ -36,6 +37,8 @@
 #include <stdlib.h>
 #endif
 
+#include <memory>
+
 namespace certi {
 namespace rtia {
 
@@ -84,8 +87,7 @@
     }
 
     // Partie RTIG
-    NetworkMessage req ;
-    req.type = NetworkMessage::PUBLISH_OBJECT_CLASS ;
+    NM_Publish_Object_Class req ;    
     req.objectClass = theClassHandle ;
     req.handleArraySize = attribArraySize ;
     req.federation = fm->_numero_federation ;
@@ -98,11 +100,10 @@
     comm->sendMessage(&req);
 
     // Reception
-    NetworkMessage rep ;
-    comm->waitMessage(&rep, NetworkMessage::PUBLISH_OBJECT_CLASS, 
req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::PUBLISH_OBJECT_CLASS, req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of publishObjectClass */
 
 // ----------------------------------------------------------------------------
 // unpublishObjectClass
@@ -130,8 +131,8 @@
     }
 
     // Partie RTIG
-    NetworkMessage req ;
-    req.type = NetworkMessage::UNPUBLISH_OBJECT_CLASS ;
+    NM_Unpublish_Object_Class req ;
+   
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.objectClass = theClassHandle ;
@@ -140,11 +141,10 @@
     comm->sendMessage(&req);
 
     // On attend une reponse
-    NetworkMessage rep ;
-    comm->waitMessage(&rep, NetworkMessage::UNPUBLISH_OBJECT_CLASS, 
req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::UNPUBLISH_OBJECT_CLASS, req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of unpublishObjectClass */
 
 // ----------------------------------------------------------------------------
 // publishInteractionClass
@@ -155,8 +155,7 @@
 {
     e = e_NO_EXCEPTION ;
 
-    // Partie Locale
-
+    // Local publish
     try {
         rootObject->Interactions->publish(fm->federate,
                                           theInteractionHandle,
@@ -166,20 +165,18 @@
         throw e ;
     }
 
-    // Partie RTIG
-    NetworkMessage req ;
-    req.type = NetworkMessage::PUBLISH_INTERACTION_CLASS ;
+    // RTIG (may be non-local) request
+    NM_Publish_Interaction_Class req ;
+    
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.interactionClass = theInteractionHandle ;
 
     comm->sendMessage(&req);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::PUBLISH_INTERACTION_CLASS, req.federate));
 
-    NetworkMessage rep ;
-    comm->waitMessage(&rep, NetworkMessage::PUBLISH_INTERACTION_CLASS, 
req.federate);
-
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of publishInteractionClass */
 
 // ----------------------------------------------------------------------------
 // unpublishInteractionClass
@@ -202,19 +199,17 @@
     }
 
     // Partie RTIG
-    NetworkMessage req ;
-    req.type = NetworkMessage::UNPUBLISH_INTERACTION_CLASS ;
+    NM_Unpublish_Interaction_Class req;   
     req.interactionClass = theInteractionHandle ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
 
     comm->sendMessage(&req);
 
-    NetworkMessage rep ;
-    comm->waitMessage(&rep, NetworkMessage::UNPUBLISH_INTERACTION_CLASS, 
req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::UNPUBLISH_INTERACTION_CLASS, 
req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of unpublishInteractionClass */
 
 // ----------------------------------------------------------------------------
 // subscribeObjectClassAttribute
@@ -225,14 +220,13 @@
                               UShort attribArraySize,
                               TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Subscribe_Object_Class req;
 
     G.Out(pdGendoc,"enter 
DeclarationManagement::subscribeObjectClassAttribute");
     // Pas de partie locale pour les abonnements
 
     // Partie RTIG
 
-    req.type = NetworkMessage::SUBSCRIBE_OBJECT_CLASS ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.objectClass = theClassHandle ;
@@ -246,14 +240,14 @@
     comm->sendMessage(&req);
 
     // Reception
-    comm->waitMessage(&rep,
+    std::auto_ptr<NetworkMessage> rep(comm->waitMessage(
                       NetworkMessage::SUBSCRIBE_OBJECT_CLASS,
-                      req.federate);
+                      req.federate));
     G.Out(pdGendoc,"                              =====> received S_O_C from 
RTIG");
 
-    e = rep.exception ;
+    e = rep->exception ;
     G.Out(pdGendoc,"exit  
DeclarationManagement::subscribeObjectClassAttribute");
-}
+} /* end of subscribeObjectClassAttribute */
 
 // ----------------------------------------------------------------------------
 // unsubscribeObjectClassAttribute
@@ -262,26 +256,25 @@
 unsubscribeObjectClassAttribute(ObjectClassHandle theClassHandle,
                                 TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Unsubscribe_Object_Class req;
 
     e = e_NO_EXCEPTION ;
 
     // Pas de Partie Locale pour les abonnements
 
     // Partie RTIG
-    req.type = NetworkMessage::UNSUBSCRIBE_OBJECT_CLASS ;
     req.objectClass = theClassHandle ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep,
+    std::auto_ptr<NetworkMessage> rep(comm->waitMessage(
                       NetworkMessage::UNSUBSCRIBE_OBJECT_CLASS,
-                      req.federate);
+                      req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of unsubscribeObjectClassAttribute */
 
 // ----------------------------------------------------------------------------
 // subscribeInteractionClass
@@ -290,7 +283,7 @@
 subscribeInteractionClass(InteractionClassHandle theClassHandle,
                           TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Subscribe_Interaction_Class req;
 
     e = e_NO_EXCEPTION ;
 
@@ -307,19 +300,17 @@
     }
 
     // Partie RTIG
-
-    req.type = NetworkMessage::SUBSCRIBE_INTERACTION_CLASS ;
     req.interactionClass = theClassHandle ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, NetworkMessage::SUBSCRIBE_INTERACTION_CLASS,
-                     req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::SUBSCRIBE_INTERACTION_CLASS,
+                     req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of subscribeInteractionClass */
 
 // ----------------------------------------------------------------------------
 // unsubscribeInteractionClass
@@ -328,7 +319,7 @@
 unsubscribeInteractionClass(InteractionClassHandle theClassHandle,
                             TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Unsubscribe_Object_Class req;
 
     e = e_NO_EXCEPTION ;
 
@@ -345,20 +336,18 @@
     }
 
     // Partie RTIG
-
-    req.type = NetworkMessage::UNSUBSCRIBE_INTERACTION_CLASS ;
     req.interactionClass = theClassHandle ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep,
+    std::auto_ptr<NetworkMessage> rep(comm->waitMessage(
                       NetworkMessage::UNSUBSCRIBE_INTERACTION_CLASS,
-                      req.federate);
+                      req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of unsubscribeInteractionClass */
 
 // ----------------------------------------------------------------------------
 // startRegistrationForObjectClass
@@ -463,4 +452,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: DeclarationManagement.cc,v 3.17 2008/02/21 10:15:24 rousse Exp $
+// $Id: DeclarationManagement.cc,v 3.18 2008/04/26 14:59:41 erk Exp $

Index: RTIA/Communications.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/Communications.hh,v
retrieving revision 3.11
retrieving revision 3.12
diff -u -b -r3.11 -r3.12
--- RTIA/Communications.hh      23 Apr 2008 07:36:01 -0000      3.11
+++ RTIA/Communications.hh      26 Apr 2008 14:59:41 -0000      3.12
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: Communications.hh,v 3.11 2008/04/23 07:36:01 siron Exp $
+// $Id: Communications.hh,v 3.12 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_COMMUNICATIONS_HH
@@ -54,24 +54,35 @@
     void sendMessage(NetworkMessage *Msg);
     void sendUN(Message *Msg);
     void receiveUN(Message *Msg);
-    void readMessage(int&, NetworkMessage *, Message *, struct timeval *);
+    void readMessage(int&, NetworkMessage **, Message **, struct timeval *);
     void requestFederateService(Message *req);
     unsigned long getAddress();
     unsigned int getPort();
-    void waitMessage(NetworkMessage *msg,
-                     NetworkMessage::Type type_msg,
+    /**
+     * Wait for a message coming from RTIG and return
+     * when received.
+     * @param[in] type_msg, expected message type,
+     * @param[in] numeroFedere, federate which sent the message, 0 if 
indifferent.
+     * @return the pointer to new awaited message
+     */
+    NetworkMessage* waitMessage(NetworkMessage::Type type_msg,
                      FederateHandle numeroFedere);
 
 private:
+       /**
+        * this is the wait list of message 
+        * already received from RTIG
+        * but not dispatched message.
+        */
     std::list<NetworkMessage *> waitingList ;
 
     bool searchMessage(NetworkMessage::Type type_msg,
                       FederateHandle numeroFedere,
-                      NetworkMessage *msg);
+                      NetworkMessage **msg);
 };
 
 }} // namespace certi/rtia
 
 #endif // _CERTI_COMMUNICATIONS_HH
 
-// $Id: Communications.hh,v 3.11 2008/04/23 07:36:01 siron Exp $
+// $Id: Communications.hh,v 3.12 2008/04/26 14:59:41 erk Exp $

Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.53
retrieving revision 3.54
diff -u -b -r3.53 -r3.54
--- RTIA/FederationManagement.cc        8 Apr 2008 14:18:17 -0000       3.53
+++ RTIA/FederationManagement.cc        26 Apr 2008 14:59:41 -0000      3.54
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: FederationManagement.cc,v 3.53 2008/04/08 14:18:17 rousse Exp $
+// $Id: FederationManagement.cc,v 3.54 2008/04/26 14:59:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -26,6 +26,7 @@
 
 #include "TimeManagement.hh"
 #include "PrettyDebug.hh"
+#include "NM_Classes.hh"
 
 #ifdef _WIN32
 #include <windows.h>
@@ -114,7 +115,7 @@
                  CouldNotOpenFED,ErrorReadingFED,
                  RTIinternalError)
 {
-    NetworkMessage requete, reponse ;
+    NM_Create_Federation_Execution requete;
 
     G.Out(pdGendoc,"enter FederationManagement::createFederationExecution");
     D.Out(pdInit, "Creating Federation %s.", theName);
@@ -136,59 +137,55 @@
 
     if (e == e_NO_EXCEPTION)
         {
-        requete.type = NetworkMessage::CREATE_FEDERATION_EXECUTION ;
-        requete.federationName = new char[strlen(theName)+1] ;
-        strcpy(requete.federationName, theName);
-        requete.FEDid = new char[strlen(_FEDid)+1] ;
-        strcpy(requete.FEDid, _FEDid) ;
+        requete.federationName = theName;
+        requete.FEDid = _FEDid;        
 
         G.Out(pdGendoc,"createFederationExecution====>   send Message to 
RTIG");
 
         comm->sendMessage(&requete);
 
-        comm->waitMessage(&reponse, 
NetworkMessage::CREATE_FEDERATION_EXECUTION,
-                          federate);
+        std::auto_ptr<NetworkMessage> 
reponse(comm->waitMessage(NetworkMessage::CREATE_FEDERATION_EXECUTION,
+                          federate));
 
         G.Out(pdGendoc,"createFederationExecution<== receive Message from 
RTIG");
 
         // We have to see if C_F_E is OK.
 
-        if (reponse.exception == e_NO_EXCEPTION)
+        if (reponse->exception == e_NO_EXCEPTION)
             {
             _nom_federation = new char[strlen(theName)+1] ;
             strcpy(_nom_federation, theName);
-            _numero_federation = reponse.federation ;
-            //_est_createur_federation = true ;
+            _numero_federation = reponse->federation ;
             D.Out(pdInit, "est createur");
             }
-        else if (reponse.exception == e_CouldNotOpenFED)
+        else if (reponse->exception == e_CouldNotOpenFED)
             // RTIG encounters a problem creating federation execution
             {
-            e = reponse.exception;
+            e = reponse->exception;
             G.Out(pdGendoc,"exit FederationManagement::"
                            "createFederationExecution on exception");
-            throw CouldNotOpenFED (reponse.exceptionReason) ;
+            throw CouldNotOpenFED (reponse->exceptionReason.c_str()) ;
             }           
-        else if (reponse.exception == e_FederationExecutionAlreadyExists)
+        else if (reponse->exception == e_FederationExecutionAlreadyExists)
             {
-            e = reponse.exception;
+            e = reponse->exception;
             G.Out(pdGendoc,"exit FederationManagement::"
                            "createFederationExecution on exception");
-            throw FederationExecutionAlreadyExists (reponse.exceptionReason) ;
+            throw FederationExecutionAlreadyExists 
(reponse->exceptionReason.c_str()) ;
             }
-        else if (reponse.exception == e_ErrorReadingFED)
+        else if (reponse->exception == e_ErrorReadingFED)
             {
-            e = reponse.exception;
+            e = reponse->exception;
             G.Out(pdGendoc,"exit FederationManagement::"
                            "createFederationExecution on exception 
ErrorReadingFED");
-            throw ErrorReadingFED (reponse.exceptionReason) ;
+            throw ErrorReadingFED (reponse->exceptionReason.c_str()) ;
             }
         else
             {
-            e = reponse.exception ;
+            e = reponse->exception ;
             G.Out(pdGendoc,"exit FederationManagement::"
                            "createFederationExecution on exception 
RTIinternalError");
-            throw RTIinternalError (reponse.exceptionReason) ;
+            throw RTIinternalError (reponse->exceptionReason.c_str()) ;
             D.Out(pdInit, "deja cree");
             }
         }
@@ -205,7 +202,7 @@
 destroyFederationExecution(const char *theName,
                            TypeException &e)
 {
-    NetworkMessage requete, reponse ;
+    NM_Destroy_Federation_Execution requete ;
 
     D.Out(pdInit, "Destroy Federation %s.", theName);
     G.Out(pdGendoc,"enter FederationManagement::destroyFederationExecution");
@@ -218,25 +215,21 @@
 
     if (e == e_NO_EXCEPTION)
         {
-        requete.type = NetworkMessage::DESTROY_FEDERATION_EXECUTION ;
         requete.federation = _numero_federation ;
         requete.federate = federate ;
-        requete.federationName = new char[strlen(theName)+1] ;
-        strcpy(requete.federationName, theName);
+        requete.federationName = theName;
 
         G.Out(pdGendoc,"destroyFederationExecution====>send Message to RTIG");
 
         comm->sendMessage(&requete);
 
-        comm->waitMessage(&reponse,
+        std::auto_ptr<NetworkMessage> reponse(comm->waitMessage(
                           NetworkMessage::DESTROY_FEDERATION_EXECUTION,
-                          federate);
+                          federate));
 
-        if (reponse.exception == e_NO_EXCEPTION)
-            {
+        if (reponse->exception == e_NO_EXCEPTION) {
             _nom_federation = NULL ;
             _numero_federation = 0 ;
-            //_est_createur_federation = false ;
             _fin_execution = true ;
             // Now, remove temporary file (if not yet done)
             if ( _FEDid != NULL )
@@ -252,7 +245,7 @@
         else
             {
             // There is an exception so destroy may be not done on RTIG
-            e = reponse.exception ;
+            e = reponse->exception ;
             }
     }
 
@@ -267,7 +260,9 @@
                         const char *Federation,
                         TypeException &e)
 {
-    NetworkMessage requete, reponse, requeteFED ;
+    NM_Join_Federation_Execution requete;
+    NM_Get_FED_File              requeteFED;
+    
     int i, nb ;
     char *filename ; // Needed for working file name
 
@@ -277,18 +272,15 @@
     e = e_NO_EXCEPTION ;
 
     // this federate, may be, has yet joined federation so don't disturb RTIG
-    if (_est_membre_federation)
-        {
+    if (_est_membre_federation){
         e = e_FederateAlreadyExecutionMember ;
         return(0);
         }
 
     if (e == e_NO_EXCEPTION)
         {
-        requete.type = NetworkMessage::JOIN_FEDERATION_EXECUTION ;
-        requete.federationName = new char[strlen(Federation)+1] ;
-        strcpy(requete.federationName, Federation);
-        strcpy(requete.federateName, Federate);
+        requete.federationName = Federation;        
+        requete.federateName   = Federate;
 
         requete.bestEffortAddress = comm->getAddress();
         requete.bestEffortPeer = comm->getPort();
@@ -298,17 +290,16 @@
         comm->sendMessage(&requete);
 
         // Waiting RTIG answer for FED file opened
-        comm->waitMessage(&reponse, NetworkMessage::GET_FED_FILE, 0);
+        std::auto_ptr<NetworkMessage> 
reponse(comm->waitMessage(NetworkMessage::GET_FED_FILE, 0));
+        NM_Get_FED_File*  getFedMsg = 
static_cast<NM_Get_FED_File*>(reponse.get());
 
-        if ( reponse.exception != e_NO_EXCEPTION)
+        if ( reponse->exception != e_NO_EXCEPTION)
             {
-            // Bad answer from RTIG, join has failed
-            // We will receive a JFE message with exception
-            e = reponse.exception ;
+            // Bad answer from RTIG
+            e = reponse->exception ;
             }
         else
             {
-            // Good answer from RTIG, we will get FED file
            stat->rtiService(NetworkMessage::GET_FED_FILE);
             // RTIA have to open a new file for working
             // We have to build a name for working file, name begins by _RTIA_ 
(6 char)
@@ -324,7 +315,7 @@
             strcat(filename,Federation);
             // Last file type : fed or xml ?
    
-            string filename_RTIG = reponse.FEDid ;
+            string filename_RTIG = reponse->FEDid ;
             int nbcar_filename_RTIG=filename_RTIG.length();        
             string extension = filename_RTIG.substr(nbcar_filename_RTIG-3,3) ;
               if ( !strcasecmp(extension.c_str(),"fed") )
@@ -336,9 +327,7 @@
                   strcat(filename,".xml");
                   } 
               else 
-                  {
                   throw CouldNotOpenFED("nor .fed nor .xml"); 
-                  }
             // FED filename for working must be stored
             _FEDid =  new char[strlen(filename)+1] ;
             strcpy(_FEDid,filename) ;              
@@ -348,10 +337,8 @@
                 throw RTIinternalError("FED file has vanished.") ;
               
             // RTIA says RTIG OK for file transfer
-            requeteFED.type = NetworkMessage::GET_FED_FILE ;
-            strcpy(requeteFED.federateName, Federate);
-            requeteFED.FEDid = new char[strlen(filename)+1] ;
-            strcpy(requeteFED.FEDid,filename) ;
+            requeteFED.federateName = Federate;
+            requeteFED.FEDid = filename;            
             if ( e == e_NO_EXCEPTION)
                 requeteFED.number = 0 ;  // OK for open
             else
@@ -362,13 +349,13 @@
             comm->sendMessage(&requeteFED);
     
             // Now read loop from RTIG to get line contents and then write it 
into file
-            char *file_line = NULL ;
             unsigned long length=0 ;
             int num_line = 0 ; // no line read
             for (;;)
                 {
-                comm->waitMessage(&reponse, NetworkMessage::GET_FED_FILE, 0);
-                if ( reponse.exception != e_NO_EXCEPTION)
+                reponse.reset(comm->waitMessage(NetworkMessage::GET_FED_FILE, 
0));
+                getFedMsg = static_cast<NM_Get_FED_File*>(reponse.get());
+                if ( reponse->exception != e_NO_EXCEPTION)
                     {
                     cout << "Bad answer from RTIG" << endl ;
                     e = e_RTIinternalError ;
@@ -378,62 +365,57 @@
                 // Line read
                 num_line++ ;
                 // Check for EOF
-                if ( reponse.number == 0 )
+                if ( reponse->number == 0 )
                     break;
-                assert ( num_line == reponse.number ) ;
-                reponse.handleArraySize = 1 ;
-                file_line = reponse.getValue(0,&length) ;
-                int nbw = fputs(file_line,fdd);
-                file_line = NULL ;
+                assert ( num_line == reponse->number ) ;
+                reponse->handleArraySize = 1 ;
+                //file_line = reponse->getValue(0,&length) ;
+                int nbw = fputs(getFedMsg->getFEDLine().c_str(),fdd);
+                //file_line = NULL ;
                 // RTIA says OK to RTIG
-                requeteFED.type = NetworkMessage::GET_FED_FILE ;
-                strcpy(requeteFED.federateName, Federate);
+                requeteFED.federateName =Federate;
                 requeteFED.number = num_line ; 
-                requeteFED.FEDid = new char[strlen(filename)+1] ;
-                strcpy(requeteFED.FEDid,filename) ; 
-
+                requeteFED.FEDid = filename;
                 comm->sendMessage(&requeteFED);            
                 }
             // close working file
             fclose(fdd); 
-            G.Out(pdGendoc,"joinFederationExecution====> end FED file get from 
RTIG");
             }
        
+        G.Out(pdGendoc,"joinFederationExecution====> end FED file get from 
RTIG"); 
+          
             // Waiting RTIG answer (from any federate)
-            // We always receive an answer JFE message from RTIG
-            comm->waitMessage(&reponse, 
NetworkMessage::JOIN_FEDERATION_EXECUTION, 0);
+        
reponse.reset(comm->waitMessage(NetworkMessage::JOIN_FEDERATION_EXECUTION, 0));
 
             // If OK, regulators number is inside the answer.
             // Then we except a NULL message from each.
-            if (reponse.exception == e_NO_EXCEPTION)
-                {
+        if (reponse->exception == e_NO_EXCEPTION) {
                 _nom_federation = new char[strlen(Federation)+1] ;
                 strcpy(_nom_federation, Federation);
                 strcpy(_nom_federe, Federate);
-                _numero_federation = reponse.federation ;
-                federate = reponse.federate ;
-                tm->setFederate(reponse.federate);
+            _numero_federation = reponse->federation ;
+            federate = reponse->federate ;
+            tm->setFederate(reponse->federate);
 
 #ifdef FEDERATION_USES_MULTICAST
                 // creation du socket pour la communication best-effort
-                comm->CreerSocketMC(reponse.AdresseMulticast, MC_PORT);
+            comm->CreerSocketMC(reponse->AdresseMulticast, MC_PORT);
 #endif
 
-                nb = reponse.numberOfRegulators ;
-                for (i=0 ; i<nb ; i++)
-                    {
-                    comm->waitMessage(&reponse, NetworkMessage::MESSAGE_NULL, 
0);
+            nb = reponse->numberOfRegulators ;
+            for (i=0 ; i<nb ; i++) {
+                reponse.reset(comm->waitMessage(NetworkMessage::MESSAGE_NULL, 
0));
                     assert(tm != NULL);
-                    tm->insert(reponse.federate, reponse.date);
+                tm->insert(reponse->federate, reponse->getDate());
                     }
+
                 _est_membre_federation = true ;
                 G.Out(pdGendoc,"exit(%d) 
FederationManagement::joinFederationExecution",federate);
                 return(federate);
                 }
             else
-                 {e = reponse.exception ;}
+            e = reponse->exception ;
             }
- 
     G.Out(pdGendoc,"exit(0) FederationManagement::joinFederationExecution");
     return(0);
 }
@@ -446,7 +428,7 @@
 FederationManagement::resignFederationExecution(RTI::ResignAction,
                                                 TypeException &e)
 {
-    NetworkMessage msg, reponse ;
+    NM_Resign_Federation_Execution msg;
     TypeException exception = e_NO_EXCEPTION ;
 
     G.Out(pdGendoc,"enter FederationManagement::resignFederationExecution");
@@ -464,16 +446,14 @@
         if (tm->requestRegulateurState())
             tm->setTimeRegulating(false, exception);
 
-        msg.type = NetworkMessage::RESIGN_FEDERATION_EXECUTION ;
         msg.federation = _numero_federation ;
         msg.federate = federate ;
 
         G.Out(pdGendoc,"      resignFederationExecution ===> send NMessage RFE 
to RTIG");
         comm->sendMessage(&msg);
 
-        comm->waitMessage(&reponse,
-                          NetworkMessage::RESIGN_FEDERATION_EXECUTION,
-                          federate);
+        // WAIT FOR RTIG answer
+        std::auto_ptr<NetworkMessage> 
reponse(comm->waitMessage(NetworkMessage::RESIGN_FEDERATION_EXECUTION, 
federate));
 
         _est_membre_federation = false ;
         _numero_federation = 0 ;
@@ -527,8 +507,7 @@
         e = e_FederateNotExecutionMember ;
 
     if (e == e_NO_EXCEPTION) {
-        NetworkMessage req ;
-        req.type = NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT ;
+        NM_Register_Federation_Synchronization_Point req ;        
         req.federation = _numero_federation ;
         req.federate = federate ;
         req.setLabel(label);
@@ -578,8 +557,7 @@
         e = e_FederateNotExecutionMember ;
 
     if (e == e_NO_EXCEPTION) {
-        NetworkMessage req ;
-        req.type = NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT ;
+        NM_Register_Federation_Synchronization_Point req;        
         req.federation = _numero_federation ;
         req.federate = federate ;
         req.setLabel(label);
@@ -635,9 +613,8 @@
         e = e_FederateNotExecutionMember ;
 
     if (e == e_NO_EXCEPTION) {
-        NetworkMessage req ;
+        NM_Synchronization_Point_Achieved req ;
 
-        req.type = NetworkMessage::SYNCHRONIZATION_POINT_ACHIEVED ;
         req.federation = _numero_federation ;
         req.federate = federate ;
         req.setLabel(label);
@@ -750,9 +727,9 @@
 
     assert(label != 0);
 
-    NetworkMessage req ;
-    req.type = NetworkMessage::REQUEST_FEDERATION_SAVE ;
-    req.date = the_time ;
+    NM_Request_Federation_Save req ;
+    
+    req.setDate(the_time);
     req.setLabel(label);
     req.federation = _numero_federation ;
     req.federate = federate ;
@@ -781,8 +758,8 @@
 
     assert(label != 0);
 
-    NetworkMessage req ;
-    req.type = NetworkMessage::REQUEST_FEDERATION_SAVE ;
+    NM_Request_Federation_Save req ;
+    
     req.setLabel(label);
     req.federation = _numero_federation ;
     req.federate = federate ;
@@ -807,9 +784,8 @@
     if (!savingState)
         throw SaveNotInitiated("Federation did not initiate saving.");
 
-    NetworkMessage req ;
+    NM_Federate_Save_Begun req ;
 
-    req.type = NetworkMessage::FEDERATE_SAVE_BEGUN ;
     req.federate = federate ;
     req.federation = _numero_federation ;
 
@@ -830,11 +806,10 @@
     if (!savingState)
         throw SaveNotInitiated("Federation did not initiate saving.");
 
-    NetworkMessage req ;
+    std::auto_ptr<NetworkMessage> req(NM_Factory::create(status ? 
NetworkMessage::FEDERATE_SAVE_COMPLETE : 
NetworkMessage::FEDERATE_SAVE_NOT_COMPLETE));
 
-    req.type= status ? NetworkMessage::FEDERATE_SAVE_COMPLETE : 
NetworkMessage::FEDERATE_SAVE_NOT_COMPLETE ;
-    req.federate = federate ;
-    req.federation = _numero_federation ;
+    req->federate = federate ;
+    req->federation = _numero_federation ;
 
     if (status)
        {    
@@ -845,7 +820,7 @@
        G.Out(pdGendoc,"      federateSaveStatus ====>send Message F_S_N_C to 
RTIG");
        }
 
-    comm->sendMessage(&req);
+    comm->sendMessage(req.get());
 
     G.Out(pdGendoc,"exit  FederationManagement::federateSaveStatus");
 }
@@ -899,8 +874,8 @@
 
     assert(label != NULL);
 
-    NetworkMessage req ;
-    req.type = NetworkMessage::REQUEST_FEDERATION_RESTORE ;
+    NM_Request_Federation_Restore req ;
+    
     req.setLabel(label);
     req.federate = federate ;
     req.federation = _numero_federation ;
@@ -923,15 +898,10 @@
     if (!restoringState)
         throw RestoreNotRequested("Federation did not initiate restoring.");
 
-    NetworkMessage req ;
-    req.federate = federate ;
-    req.federation = _numero_federation ;
-    if (status)
-        req.type = NetworkMessage::FEDERATE_RESTORE_COMPLETE ;
-    else
-        req.type = NetworkMessage::FEDERATE_RESTORE_NOT_COMPLETE ;
-
-    comm->sendMessage(&req);
+    std::auto_ptr<NetworkMessage> req(NM_Factory::create(status ? 
NetworkMessage::FEDERATE_RESTORE_COMPLETE : 
NetworkMessage::FEDERATE_RESTORE_NOT_COMPLETE));
+    req->federate = federate ;
+    req->federation = _numero_federation ;
+    comm->sendMessage(req.get());
 }
 
 // ----------------------------------------------------------------------------
@@ -1034,4 +1004,3 @@
 
 }} // namespace certi/rtia
 
-// $Id: FederationManagement.cc,v 3.53 2008/04/08 14:18:17 rousse Exp $

Index: RTIA/ObjectManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.cc,v
retrieving revision 3.36
retrieving revision 3.37
diff -u -b -r3.36 -r3.37
--- RTIA/ObjectManagement.cc    13 Mar 2008 14:39:18 -0000      3.36
+++ RTIA/ObjectManagement.cc    26 Apr 2008 14:59:42 -0000      3.37
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: ObjectManagement.cc,v 3.36 2008/03/13 14:39:18 siron Exp $
+// $Id: ObjectManagement.cc,v 3.37 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -30,6 +30,7 @@
 #include "FederationManagement.hh"
 #include "PrettyDebug.hh"
 #include "TimeManagement.hh"
+#include "NM_Classes.hh"
 
 #ifdef _WIN32
 #include <windows.h>
@@ -69,27 +70,27 @@
                                  FederationTime,
                                  TypeException & e)
 {
-    NetworkMessage req, rep ;
+    NM_Register_Object req;
 
-    req.type = NetworkMessage::REGISTER_OBJECT ;
     req.federate = fm->federate ;
     req.federation = fm->_numero_federation ;
     req.objectClass = the_class ;
-    strcpy(req.label, (char *) theObjectName);
+    req.setLabel(theObjectName);
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, NetworkMessage::REGISTER_OBJECT, req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::REGISTER_OBJECT, req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
-        rootObject->registerObjectInstance(fm->federate, the_class, rep.object,
-                                           rep.label);
-        return rep.object ;
+        rootObject->registerObjectInstance(fm->federate, the_class, 
rep->object,
+                                           rep->getLabel().c_str());
+        return rep->object ;
+    }
+    else {
+        return 0;
     }
-    else
-        return 0 ;
 }
 
 // ----------------------------------------------------------------------------
@@ -112,21 +113,20 @@
                                         const char *theTag,
                                         TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Update_Attribute_Values req;
     int i ;
     bool validCall ;
+    EventRetractionHandle evtrHandle;
 
     validCall = tm->testValidTime(theTime) ;
     if (validCall) {
 
        // Building request (req NetworkMessage)
-       req.type = NetworkMessage::UPDATE_ATTRIBUTE_VALUES ;
        req.federation = fm->_numero_federation ;
        req.federate = fm->federate ;
        req.object = theObjectHandle ;
-       req.date = theTime ;
-       // true for UAV with time
-       req.setBoolean(true);
+       // set Date for UAV with time
+       req.setDate(theTime);
 
        req.handleArraySize = attribArraySize ;
 
@@ -135,17 +135,19 @@
            req.setValue(i, valueArray[i].value, valueArray[i].length);
        }
 
-       strcpy(req.label, theTag);
+       req.setLabel(theTag);
 
        comm->sendMessage(&req);
-       comm->waitMessage(&rep, NetworkMessage::UPDATE_ATTRIBUTE_VALUES, 
req.federate);
-
-       e = rep.exception ;
+       std::auto_ptr<NetworkMessage> rep(comm->waitMessage(req.getType(), 
req.federate));
+       e = rep->exception ;
+       evtrHandle = rep->eventRetraction;      
+    }
+    else {
+       e = e_InvalidFederationTime;
     }
-    else
-       e = e_InvalidFederationTime ;
 
-    return rep.eventRetraction ;
+    // FIXME returned evtrHandle carry uninitialized value
+    return evtrHandle ;
 }
 
 // ----------------------------------------------------------------------------
@@ -166,16 +168,14 @@
                                         const char *theTag,
                                         TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Update_Attribute_Values req;
     int i ;
 
     // Building request (req NetworkMessage)
-    req.type = NetworkMessage::UPDATE_ATTRIBUTE_VALUES ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = theObjectHandle ;
-    // false for UAV without time
-    req.setBoolean(false);
+    // Do no set Date if without time
 
     req.handleArraySize = attribArraySize ;
 
@@ -184,14 +184,15 @@
         req.setValue(i, valueArray[i].value, valueArray[i].length);
     }
 
-    strcpy(req.label, theTag);
+    req.setLabel(theTag);
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::UPDATE_ATTRIBUTE_VALUES, 
req.federate);
+    std::auto_ptr<NetworkMessage> rep(comm->waitMessage(req.getType(), 
req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
 }
+
 // ----------------------------------------------------------------------------
 //! discoverObject.
 void
@@ -282,8 +283,9 @@
                                  RegionHandle region,
                                   TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Send_Interaction req;
     bool validCall ;
+    EventRetractionHandle evtrHandle;
 
     validCall = tm->testValidTime(theTime) ;
     if (validCall) {
@@ -296,15 +298,12 @@
                                          paramArraySize);
 
        // Building network message (req) to RTIG.
-       req.type = NetworkMessage::SEND_INTERACTION ;
        req.interactionClass = theInteraction ;
        // true for UAV with time
-       req.setBoolean(true);
-       req.date = theTime ;
+       req.setDate(theTime);
        req.region = region ;
        req.federation = fm->_numero_federation ;
        req.federate = fm->federate ;
-
        req.handleArraySize = paramArraySize ;
 
        for (int i=0 ; i<paramArraySize ; i++) {
@@ -312,19 +311,20 @@
           req.setValue(i, valueArray[i].value, valueArray[i].length);
        }
 
-       strcpy(req.label, theTag);
+       req.setLabel(theTag);
 
        // Send network message and then wait for answer.
        comm->sendMessage(&req);
-       comm->waitMessage(&rep, NetworkMessage::SEND_INTERACTION, req.federate);
-
-       e = rep.exception ;
-
+       std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::SEND_INTERACTION, req.federate));
+       e = rep->exception ;
+       evtrHandle = rep->eventRetraction;
     }
-    else
+    else {
        e = e_InvalidFederationTime ;
+    }
 
-    return rep.eventRetraction ;
+    // FIXME returned evtrHandle carry uninitialized value
+    return evtrHandle ;
 }
 
 // ----------------------------------------------------------------------------
@@ -338,7 +338,7 @@
                                  RegionHandle region,
                                   TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Send_Interaction req;
     G.Out(pdGendoc,"ObjectManagement::sendInteraction without time");
     // Local test to know if interaction is correct.
     rootObject->Interactions->isReady(fm->federate,
@@ -347,10 +347,9 @@
                                       paramArraySize);
 
     // Building network message (req) to RTIG.
-    req.type = NetworkMessage::SEND_INTERACTION ;
     req.interactionClass = theInteraction ;
     // false for UAV without time
-    req.setBoolean(false);
+    req.isDated    = false;
     req.region = region ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
@@ -362,15 +361,15 @@
        req.setValue(i, valueArray[i].value, valueArray[i].length);
     }
 
-    strcpy(req.label, theTag);
+    req.setLabel(theTag);
 
     // Send network message and then wait for answer.
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::SEND_INTERACTION, req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::SEND_INTERACTION, req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
-}
+} /* end of sendInteraction */
 
 // ----------------------------------------------------------------------------
 //! receiveInteraction with time
@@ -424,27 +423,25 @@
                                const char *theTag,
                                TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Delete_Object req;
 
-    req.type = NetworkMessage::DELETE_OBJECT ;
     req.object = theObjectHandle ;
-    req.setBoolean(true);
-    req.date = theTime;
+    req.setDate(theTime);
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
 
-    strcpy(req.label, theTag);
+    req.setLabel(theTag);
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DELETE_OBJECT, req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DELETE_OBJECT, req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
         rootObject->deleteObjectInstance(fm->federate, theObjectHandle, 
theTag);
     }
 
-    return rep.eventRetraction ;
-}
+    return rep->eventRetraction ;
+} /* end deleteObject */
 
 // ----------------------------------------------------------------------------
 //! deleteObject without time
@@ -453,24 +450,22 @@
                                const char *theTag,
                                TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Delete_Object req;
 
-    req.type = NetworkMessage::DELETE_OBJECT ;
     req.object = theObjectHandle ;
-    req.setBoolean(false);
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
 
-    strcpy(req.label, theTag);
+    req.setLabel(theTag);
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DELETE_OBJECT, req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DELETE_OBJECT, req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
         rootObject->deleteObjectInstance(fm->federate, theObjectHandle, 
theTag);
     }
-}
+} /* end of deleteObject */
 
 // ----------------------------------------------------------------------------
 //! removeObject with time
@@ -481,6 +476,7 @@
                                const char *the_tag,
                                EventRetractionHandle the_event,
                                TypeException &)
+
 {
     Message req;
 
@@ -524,10 +520,9 @@
                                                TransportType theType,
                                                TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Change_Attribute_Transport_Type req;
     int i ;
 
-    req.type = NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE ;
     req.object = theObjectHandle ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
@@ -538,13 +533,13 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep,
+    std::auto_ptr<NetworkMessage> rep(comm->waitMessage(
                       NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE,
-                      req.federate);
+                      req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
-    return rep.eventRetraction ;
+    return rep->eventRetraction ;
 }
 
 // ----------------------------------------------------------------------------
@@ -556,10 +551,9 @@
                                            OrderType theType,
                                            TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Change_Attribute_Order_Type req ;
     int i ;
 
-    req.type = NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE ;
     req.object = theObjectHandle ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
@@ -571,11 +565,11 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE, 
req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE, 
req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
-    return rep.eventRetraction ;
+    return rep->eventRetraction ;
 }
 
 // ----------------------------------------------------------------------------
@@ -585,19 +579,18 @@
                                                  TransportType theType,
                                                  TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Change_Interaction_Transport_Type req;
 
-    req.type = NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE ;
     req.interactionClass = id ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.transport = theType ;
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE, 
req.federate);
-    e = rep.exception ;
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE, 
req.federate));
+    e = rep->exception ;
 
-    return rep.eventRetraction ;
+    return rep->eventRetraction ;
 }
 
 // ----------------------------------------------------------------------------
@@ -607,9 +600,8 @@
                                              OrderType theType,
                                              TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Change_Interaction_Order_Type req;
 
-    req.type = NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE ;
     req.interactionClass = id ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
@@ -617,12 +609,12 @@
 
     comm->sendMessage(&req);
 
-    comm->waitMessage(&rep, NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE, 
req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE, 
req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
-    return rep.eventRetraction ;
-}
+    return rep->eventRetraction ;
+} /* end of changeInteractionOrderType */
 
 // ----------------------------------------------------------------------------
 //! requestObjectAttributeValueUpdate
@@ -632,11 +624,10 @@
                                                     UShort attribArraySize,
                                                     TypeException &e)
 {
-    NetworkMessage req, rep ;
+    NM_Request_Object_Attribute_Value_Update req;
 
     G.Out(pdGendoc,"enter 
ObjectManagement::requestObjectAttributeValueUpdate");
 
-    req.type = NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE ;
     req.object = handle ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
@@ -647,12 +638,12 @@
 
     req.handleArraySize = attribArraySize ;
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, 
NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE,
-                      req.federate);
-    e = rep.exception ;
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE,
+                      req.federate));
+    e = rep->exception ;
     G.Out(pdGendoc,"exit  
ObjectManagement::requestObjectAttributeValueUpdate");
 
-}
+} /* end of requestObjectAttributeValueUpdate */
 
 
 // --------------------------------------
@@ -803,4 +794,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: ObjectManagement.cc,v 3.36 2008/03/13 14:39:18 siron Exp $
+// $Id: ObjectManagement.cc,v 3.37 2008/04/26 14:59:42 erk Exp $

Index: RTIA/RTIA_network.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_network.cc,v
retrieving revision 3.22
retrieving revision 3.23
diff -u -b -r3.22 -r3.23
--- RTIA/RTIA_network.cc        5 Mar 2008 15:33:50 -0000       3.22
+++ RTIA/RTIA_network.cc        26 Apr 2008 14:59:42 -0000      3.23
@@ -18,10 +18,11 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIA_network.cc,v 3.22 2008/03/05 15:33:50 rousse Exp $
+// $Id: RTIA_network.cc,v 3.23 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
+#include "NM_Classes.hh"
 #include "RTIA.hh"
 #include "ObjectClassAttribute.hh"
 #include "Interaction.hh"
@@ -41,12 +42,9 @@
 void
 RTIA::processNetworkMessage(NetworkMessage *msg)
 {
-NetworkMessage::Type msgType = msg->type;
+NetworkMessage::Type msgType = msg->getType();
 
-G.Out(pdGendoc,"enter RTIA::processNetworkMessage");
-
-//D.Mes(pdMessage, 'N', msgType);
-msg->trace("RTIA::processNetworkMessage ");
+       G.Out(pdGendoc,"enter RTIA::processNetworkMessage");
 
     switch(msgType) {
 
@@ -54,9 +52,9 @@
       {
           D.Out(pdTrace,
                 "Receving Message from RTIG, type 
NetworkMessage::MESSAGE_NULL(%f).",
-                msg->date);
+                msg->getDate());
 
-          tm->update(msg->federate, msg->date);
+          tm->update(msg->federate, msg->getDate());
           delete msg ;
           break ;
       }
@@ -67,8 +65,8 @@
           D.Out(pdTrace,
                 "Receving Message from RTIG, type 
NetworkMessage::SET_TIME_REGULATING.");
 
-          if (msg->regulator)
-              tm->insert(msg->federate, msg->date);
+          if (static_cast<NM_Set_Time_Regulating*>(msg)->isRegulator())
+              tm->insert(msg->federate, msg->getDate());
           else
               tm->remove(msg->federate);
           delete msg ;
@@ -98,8 +96,8 @@
           D.Out(pdTrace, "Receving Message from RTIG, "
                 "type NetworkMessage::DISCOVER_OBJECT.");
           queues->insertFifoMessage(msg);
-          break ;
       }
+      break;
 
       case NetworkMessage::REFLECT_ATTRIBUTE_VALUES:
       {
@@ -344,4 +342,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: RTIA_network.cc,v 3.22 2008/03/05 15:33:50 rousse Exp $
+// $Id: RTIA_network.cc,v 3.23 2008/04/26 14:59:42 erk Exp $

Index: RTIA/DataDistribution.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/DataDistribution.cc,v
retrieving revision 3.23
retrieving revision 3.24
diff -u -b -r3.23 -r3.24
--- RTIA/DataDistribution.cc    29 Nov 2007 16:51:15 -0000      3.23
+++ RTIA/DataDistribution.cc    26 Apr 2008 14:59:42 -0000      3.24
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: DataDistribution.cc,v 3.23 2007/11/29 16:51:15 rousse Exp $
+// $Id: DataDistribution.cc,v 3.24 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -33,8 +33,10 @@
 #include "ObjectClassAttribute.hh"
 #include "RoutingSpace.hh"
 #include "FedRegion.hh"
+#include "NM_Classes.hh"
 
 #include <cassert>
+#include <memory>
 
 using std::string ;
 using std::endl ;
@@ -122,33 +124,31 @@
     throw (SpaceNotDefined)
 {
     D[pdDebug] << "Start creating region in space " << space << "..." << endl ;
+    NM_DDM_Create_Region req;    
 
-    NetworkMessage req, rep ;
-
-    req.type = NetworkMessage::DDM_CREATE_REGION ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.space = space ;
     req.nbExtents = nb_extents ;
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_CREATE_REGION, req.federate);
-    e = rep.exception ;
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_CREATE_REGION, req.federate));
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
-       D[pdDebug] << "Create region " << rep.region << endl ;
-        RTIRegion *region = new RTIRegion(rep.region,
+       D[pdDebug] << "Create region " << rep->region << endl ;
+        RTIRegion *region = new RTIRegion(rep->region,
                                          rootObject->getRoutingSpace(space),
                                          nb_extents);
 
        assert(region->getNumberOfExtents() == nb_extents);
         rootObject->addRegion(region);
-
-        return rep.region ;
+        return rep->region;
     }
-    else
+    else {
         return 0 ;
-}
+    }
+} /* end of createRegion */
 
 // ----------------------------------------------------------------------------
 // modifyRegion
@@ -164,22 +164,22 @@
     RTIRegion *region = rootObject->getRegion(handle);
 
     // Request to RTIG
-    NetworkMessage req, rep ;
-    req.type = NetworkMessage::DDM_MODIFY_REGION ;
+    NM_DDM_Modify_Region req;
+        
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.region = handle ;
     req.setExtents(extents);
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_MODIFY_REGION, req.federate);
-    e = rep.exception ;
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_MODIFY_REGION, req.federate));    
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
        region->replaceExtents(extents);        
        D[pdDebug] << "Modified region " << handle << endl ;
     }
-}
+} /* end of modifyRegion */
 
 // ----------------------------------------------------------------------------
 // deleteRegion
@@ -194,22 +194,21 @@
     rootObject->getRegion(handle);
 
     // Request to RTIG
-    NetworkMessage req, rep ;
+    NM_DDM_Delete_Region req;
 
-    req.type = NetworkMessage::DDM_DELETE_REGION ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.region = handle ;
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_DELETE_REGION, req.federate);
-    e = rep.exception ;
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_DELETE_REGION, req.federate));
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
         rootObject->deleteRegion(handle);
         D[pdDebug] << "Deleted region " << handle << endl ;
     }
-}
+} /* end of deleteRegion */
 
 // ----------------------------------------------------------------------------
 void
@@ -231,9 +230,8 @@
        rootObject->getObjectAttribute(object, attr[i])->associate(r);  
     }
 
-    NetworkMessage req, rep ;
+    NM_DDM_Associate_Region req;
 
-    req.type = NetworkMessage::DDM_ASSOCIATE_REGION ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = object ;
@@ -241,11 +239,11 @@
     req.setAHS(attr, nb);
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_ASSOCIATE_REGION,
-                     req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_ASSOCIATE_REGION,req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+    
+} /* end of associateRegion */
 
 // ----------------------------------------------------------------------------
 ObjectHandle
@@ -259,9 +257,8 @@
     D[pdDebug] << "Register object of class " << class_handle << " with "
               << regions.size() << " region(s)." << std::endl ;
 
-    NetworkMessage req, rep ;
+    NM_DDM_Register_Object req;    
 
-    req.type = NetworkMessage::DDM_REGISTER_OBJECT ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.objectClass = class_handle ;
@@ -270,26 +267,25 @@
     req.setRegions(regions);
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_REGISTER_OBJECT,
-                     req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_REGISTER_OBJECT,req.federate));
 
-    e = rep.exception ;
+    e = rep->exception ;
 
     if (e == e_NO_EXCEPTION) {
-        rootObject->registerObjectInstance(fm->federate, class_handle, 
rep.object,
-                                           rep.label);
+        rootObject->registerObjectInstance(fm->federate, class_handle, 
rep->object,
+                                           rep->getLabel().c_str());
        for (int i = 0 ; i < nb ; ++i) {
            D[pdDebug] << "Register attribute [" << i << "] Attr: " << attrs[i]
                       << " Region: " << regions[i] << std::endl ;
                
-           ObjectAttribute *attribute = 
rootObject->getObjectAttribute(rep.object, attrs[i]);
+           ObjectAttribute *attribute = 
rootObject->getObjectAttribute(rep->object, attrs[i]);
            RTIRegion *region = rootObject->getRegion(regions[i]);
            attribute->associate(region);
        }
-        return rep.object ;
+           return rep->object;     
     }
     else return 0 ;
-}
+} /* end of registerObject */
 
 // ----------------------------------------------------------------------------
 void
@@ -304,20 +300,19 @@
 
     rootObject->getObject(object)->unassociate(r);
 
-    NetworkMessage req, rep ;
+    NM_DDM_Unassociate_Region req;
 
-    req.type = NetworkMessage::DDM_UNASSOCIATE_REGION ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.object = object ;
     req.region = region ;
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_UNASSOCIATE_REGION,
-                     req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_UNASSOCIATE_REGION,
+                     req.federate));
 
-   e = rep.exception ;
-}
+   e = rep->exception ;
+} /* end of unassociateRegion */
 
 // ----------------------------------------------------------------------------
 void
@@ -331,9 +326,8 @@
     D[pdDebug] << "Subscribe attributes with region " << region << endl ;
     rootObject->getRegion(region);
 
-    NetworkMessage req, rep ;
+    NM_DDM_Subscribe_Attributes req;
 
-    req.type = NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.objectClass = obj_class ;
@@ -341,11 +335,11 @@
     req.setAHS(attr, nb);
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES,
-                     req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES,
+                     req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of subscribe */
 
 // ----------------------------------------------------------------------------
 void
@@ -358,20 +352,19 @@
               << " with region " << region << endl ;
     rootObject->getRegion(region);
 
-    NetworkMessage req, rep ;
+    NM_DDM_Unsubscribe_Attributes req;
 
-    req.type = NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES ;
     req.federation = fm->_numero_federation ;
     req.federate = fm->federate ;
     req.objectClass = obj_class ;
     req.region = region ;
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES,
-                     req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES,
+                     req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of unsubscribeAttributes */
 
 // ----------------------------------------------------------------------------
 void
@@ -383,18 +376,17 @@
     D[pdDebug] << "Subscribe interaction with region " << region << endl ;
     rootObject->getRegion(region);
 
-    NetworkMessage req, rep ;
+    NM_DDM_Subscribe_Interaction req;
 
-    req.type = NetworkMessage::DDM_SUBSCRIBE_INTERACTION ;
     req.interactionClass = int_class ;
     req.region = region ;
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_SUBSCRIBE_INTERACTION,
-                     req.federate);
+    std::auto_ptr<NetworkMessage> 
rep(comm->waitMessage(NetworkMessage::DDM_SUBSCRIBE_INTERACTION,
+                     req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of subscribeInteraction */
 
 // ----------------------------------------------------------------------------
 void
@@ -406,19 +398,18 @@
     D[pdDebug] << "Unsubscribe interaction with region " << region << endl ;
     rootObject->getRegion(region);
 
-    NetworkMessage req, rep ;
+    NM_DDM_Unsubscribe_Interaction req;
 
-    req.type = NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION ;
     req.interactionClass = int_class ;
     req.region = region ;
 
     comm->sendMessage(&req);
-    comm->waitMessage(&rep, NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION,
-                     req.federate);
+    std::auto_ptr<NetworkMessage>  
rep(comm->waitMessage(NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION,
+                     req.federate));
 
-    e = rep.exception ;
-}
+    e = rep->exception ;
+} /* end of unsubscribeInteraction */
 
 }} // namespace certi::rtia
 
-// $Id: DataDistribution.cc,v 3.23 2007/11/29 16:51:15 rousse Exp $
+// $Id: DataDistribution.cc,v 3.24 2008/04/26 14:59:42 erk Exp $

Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.73
retrieving revision 3.74
diff -u -b -r3.73 -r3.74
--- RTIA/RTIA_federate.cc       23 Apr 2008 13:03:48 -0000      3.73
+++ RTIA/RTIA_federate.cc       26 Apr 2008 14:59:42 -0000      3.74
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIA_federate.cc,v 3.73 2008/04/23 13:03:48 erk Exp $
+// $Id: RTIA_federate.cc,v 3.74 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -1367,7 +1367,7 @@
         rep.setException(e_RTIinternalError);
     }
 
-    delete req ;;
+    delete req;
 
     if (rep.type != Message::TICK_REQUEST) {
        // generic federate service acknowledgment
@@ -1380,4 +1380,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: RTIA_federate.cc,v 3.73 2008/04/23 13:03:48 erk Exp $
+// $Id: RTIA_federate.cc,v 3.74 2008/04/26 14:59:42 erk Exp $

Index: scripts/GenMessageClass.py
===================================================================
RCS file: /sources/certi/certi/scripts/GenMessageClass.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- scripts/GenMessageClass.py  12 Mar 2008 15:04:09 -0000      1.2
+++ scripts/GenMessageClass.py  26 Apr 2008 14:59:42 -0000      1.3
@@ -5,7 +5,7 @@
 import shutil
 
 def usage():
-    print "Usage:\n %s --file=<message> [--verbose] [--help]" % 
os.path.basename(sys.argv[0])
+    print "Usage:\n %s --file=<message> [--type=header|body|factory] 
[--verbose] [--help]" % os.path.basename(sys.argv[0])
     
 try:
     opts, args = getopt.getopt(sys.argv[1:], "f:t:vh", 
["file=","type=","verbose","help"])
@@ -46,7 +46,9 @@
         print "       virtual ~NM_%s();"  % cname.title()
         print "       virtual void serialize();"
         print "       virtual void deserialize();"
+        print "       /* specific Getter/Setter */"
         print "  protected:"
+        print "       /* specific field */"
         print "  private:"       
         print "};\n"
         print "/*<END>---------- %s ------------<END>*/\n" % cname.title()
@@ -55,15 +57,22 @@
     if (gentype.lower()=="body"):
         print "/*<BEGIN>---------- %s ------------<BEGIN>*/" % cname.title()
         print "NM_%s::NM_%s() {"  % (cname.title(),cname.title())
-        print "    this->type = NetworkMessage::%s;" % cname
         print "    this->name = \"%s\";" % cname
+        print "    this->type = NetworkMessage::%s;" % cname
+        print "    /* specific field init */"
         print "}"
         print "NM_%s::~NM_%s() {"  % (cname.title(), cname.title())
         print "}"       
         print "void NM_%s::serialize() {"  % cname.title()
-        print "}"
+        print "  /* call mother class */      "
+        print "  NetworkMessage::serialize(); "
+        print "  /* specific code (if any) goes here */"
+        print "} /* end of serialize */ "
         print "void NM_%s::deserialize() {" % cname.title()
-        print "}"
+        print "  /* call mother class */      "
+        print "  NetworkMessage::deserialize(); "
+        print "  /* specific code (if any) goes here */"
+        print "} /* end of deserialize */"
         print "/*<END>---------- %s ------------<END>*/\n" % cname.title()
 
 

Index: scripts/FindLexYacc.cmake
===================================================================
RCS file: /sources/certi/certi/scripts/FindLexYacc.cmake,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- scripts/FindLexYacc.cmake   31 Jul 2007 14:52:04 -0000      1.2
+++ scripts/FindLexYacc.cmake   26 Apr 2008 14:59:42 -0000      1.3
@@ -1,11 +1,23 @@
+IF(UNIX)
+   FILE(TO_CMAKE_PATH "/usr/local/bin" PATH_DIR)
+ENDIF(UNIX)
 
-SET(PATH_DIR /usr/local/bin /usr/bin)
+IF(WIN32)
+    FILE(TO_CMAKE_PATH "C:/Program Files/GnuWin32/bin" PATH_DIR)     
+ENDIF(WIN32)
 
 MESSAGE(STATUS "Looking for lex...")
+# FIND_PROGRAM twice using NO_DEFAULT_PATH on first shot
 FIND_PROGRAM(LEX_PROGRAM 
   NAMES flex lex
   PATHS ${PATH_DIR}
+   NO_DEFAULT_PATH 
   DOC "A lex-compatible lexer generator")
+FIND_PROGRAM(LEX_PROGRAM 
+  NAMES flex lex
+  PATHS ${PATH_DIR}
+  DOC "A lex-compatible lexer generator")
+
 IF (LEX_PROGRAM) 
   MESSAGE(STATUS "Looking for lex... - found lex is ${LEX_PROGRAM}")
   SET(LEX_FOUND "YES")
@@ -15,10 +27,17 @@
 ENDIF (LEX_PROGRAM) 
 
 MESSAGE(STATUS "Looking for yacc...")
+# FIND_PROGRAM twice using NO_DEFAULT_PATH on first shot
 FIND_PROGRAM(YACC_PROGRAM 
-  NAMES yacc yacc.bison bison
+  NAMES bison yacc yacc.bison 
   PATHS ${PATH_DIR}
+  NO_DEFAULT_PATH
   DOC "A yacc-compatible parser generator")
+FIND_PROGRAM(YACC_PROGRAM 
+  NAMES bison yacc yacc.bison 
+  PATHS ${PATH_DIR}
+  DOC "A yacc-compatible parser generator")
+  
 IF (YACC_PROGRAM) 
   SET(YACC_FOUND "YES")
   MESSAGE(STATUS "Looking for yacc... - found yacc is ${YACC_PROGRAM}")
@@ -31,3 +50,11 @@
   SET(YACC_FOUND "NO")
   MESSAGE(STATUS "Looking for yacc... - NOT found")
 ENDIF (YACC_PROGRAM)
+    
+IF(WIN32)
+   IF(LEX_FOUND)
+        get_filename_component(PATH_LEX ${LEX_PROGRAM} PATH)
+        get_filename_component(INCLUDE_LEX ${PATH_LEX} PATH)
+        INCLUDE_DIRECTORIES(${INCLUDE_LEX})
+   ENDIF(LEX_FOUND)
+ENDIF(WIN32)
\ No newline at end of file

Index: test/Billard/dtest_billard.py
===================================================================
RCS file: /sources/certi/certi/test/Billard/dtest_billard.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- test/Billard/dtest_billard.py       7 Apr 2008 20:40:29 -0000       1.2
+++ test/Billard/dtest_billard.py       26 Apr 2008 14:59:42 -0000      1.3
@@ -163,9 +163,7 @@
 dtest.SSHSessionHandler.logger.setLevel(level=logging.WARNING)
 
 def goTest():
-    myDTestMaster = dtest.DTestMaster()
-    if (traceActive):
-        myDTestMaster.setTrace(1)
+    myDTestMaster = dtest.DTestMaster("CERTI Billard autotest","Launch RTIG + 
several billards")
     if (pseudoExecActive):
         myDTestMaster.setPseudoExec(1)
     myDTestMaster.timeout = 40

Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.61
retrieving revision 3.62
diff -u -b -r3.61 -r3.62
--- RTIG/RTIG_processing.cc     8 Apr 2008 14:18:18 -0000       3.61
+++ RTIG/RTIG_processing.cc     26 Apr 2008 14:59:42 -0000      3.62
@@ -18,11 +18,12 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIG_processing.cc,v 3.61 2008/04/08 14:18:18 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.62 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
 #include "RTIG.hh"
+#include "NM_Classes.hh"
 
 #include <assert.h>
 
@@ -40,20 +41,20 @@
 void
 RTIG::processCreateFederation(Socket *link, NetworkMessage *req)
 {
-    char *federation = req->federationName ;
-    char *FEDid = req->FEDid ;
-    NetworkMessage rep ;               // rep for answer to RTIA
+    std::string federation = req->federationName;
+    std::string FEDid      = req->FEDid;    
+    NM_Create_Federation_Execution  rep;   // rep for answer to RTIA
 
     G.Out(pdGendoc,"enter RTIG::processCreateFederation");
     G.Out(pdGendoc,"BEGIN ** CREATE FEDERATION SERVICE **");
 
-    if (federation == NULL) 
+    if (federation.length() == 0) 
         {
         G.Out(pdGendoc,"exit  RTIG::processCreateFederation on exception 
RTIinternalError");        
         throw RTIinternalError("Invalid Federation Name.");
         }
 
-    auditServer << "Federation Name : " << federation ;
+    //auditServer << "Federation Name : " << federation ;
     Handle h = federationHandles.provide();
 
 #ifdef FEDERATION_USES_MULTICAST
@@ -78,46 +79,43 @@
     ClientSockets.push_front(com_mc);
 
 #else
-    rep.exception = e_NO_EXCEPTION ;
     // We catch createFederation because it is useful to send
     // exception reason to RTIA 
     try {
-        federations.createFederation(federation, h, FEDid);
+        federations.createFederation(federation.c_str(), h, FEDid.c_str());
         }
     catch (CouldNotOpenFED e)
         {
         rep.exception = e_CouldNotOpenFED ;
-        strcpy(rep.exceptionReason,e._reason) ;
+        rep.exceptionReason=e._reason;
         }
     catch (ErrorReadingFED e)
         {
         rep.exception = e_ErrorReadingFED ;
-        strcpy(rep.exceptionReason,e._reason) ;
+        rep.exceptionReason = e._reason ;
         }
     catch (FederationExecutionAlreadyExists e)
         {
         rep.exception = e_FederationExecutionAlreadyExists ;
-        strcpy(rep.exceptionReason,e._reason) ;
+        rep.exceptionReason =e._reason ;
         }
 #endif
     // Prepare answer for RTIA : store NetworkMessage rep
-    rep.type = NetworkMessage::CREATE_FEDERATION_EXECUTION ;
     if ( rep.exception == e_NO_EXCEPTION )
         {
         rep.federation = h ;
-        rep.FEDid = new char [strlen(FEDid)+1] ;
-        strcpy(rep.FEDid,FEDid) ;
-        rep.federationName = new char [strlen(federation)+1] ;
-        strcpy(rep.federationName,federation);
-        auditServer <<" created." ;
+        rep.FEDid = FEDid;
+        rep.federationName = federation;
+        auditServer <<" created.";
+            
         }
 
     G.Out(pdGendoc,"processCreateFederation===>write answer to RTIA");
 
-    rep.write(link); // Send answer to RTIA
+    rep.send(link); // Send answer to RTIA
 
     D.Out(pdInit, "Federation \"%s\" created with Handle %d.",
-          federation, rep.federation);
+          federation.c_str(), rep.federation);
 
     G.Out(pdGendoc,"END ** CREATE FEDERATION SERVICE **");
     G.Out(pdGendoc,"exit RTIG::processCreateFederation");
@@ -128,9 +126,9 @@
 void
 RTIG::processJoinFederation(Socket *link, NetworkMessage *req)
 {
-    char *federation = req->federationName ;
-    char *federate = req->federateName ;
-    char *filename = NULL ;
+    std::string federation = req->federationName ;
+    std::string federate = req->federateName ;
+    std::string filename ;
     
     unsigned int peer = req->bestEffortPeer ;
     unsigned long address = req->bestEffortAddress ;
@@ -145,18 +143,18 @@
     G.Out(pdGendoc,"BEGIN ** JOIN FEDERATION SERVICE **");
     G.Out(pdGendoc,"enter RTIG::processJoinFederation");
 
-    if ((federation == NULL) || (federate == NULL))
+    if ((federation.length()==0) || (federate.length() == 0))
         throw RTIinternalError("Invalid Federation/Federate Name.");
 
-    auditServer << "Federate \"" << federate << "\" joins Federation \""
-               << federation << "\"" ;
+    auditServer << "Federate \"" << federate.c_str() << "\" joins Federation 
\""
+               << federation.c_str() << "\"" ;
 
-    federations.exists(federation, num_federation);
+    federations.exists(federation.c_str(), num_federation);
 
     try
        {
         num_federe = federations.addFederate(num_federation,
-                                          federate,
+                                          federate.c_str(),
                                           (SecureTCPSocket *) link);
         }
     catch (RTI::FederateAlreadyExecutionMember &e)
@@ -165,26 +163,23 @@
         // RTIG has to return something to RTIA
         // RTIA waits a GET_FED_FILE message
         // RTIG says not OK to RTIA in a GET_FED_FILE message
-        NetworkMessage repFED ;
-       repFED.type = NetworkMessage::GET_FED_FILE ;
+        NM_Get_FED_File repFED ;
        repFED.exception = e_FederateAlreadyExecutionMember ;
-       strcpy(repFED.exceptionReason,"Federate with same name has yet joined 
the federation");
-
-       G.Out(pdGendoc,"processJoinFederation==>Answer to RTIA GFF ERROR 
%s",repFED.exceptionReason);
-
-       repFED.write(link);
+       repFED.exceptionReason="Federate with same name has yet joined the 
federation";
+       G.Out(pdGendoc,"processJoinFederation==>Answer to RTIA GFF ERROR 
%s",repFED.exceptionReason.c_str());
+       repFED.send(link);
 
        G.Out(pdGendoc,"exit RTIG::processJoinFederation on Error");
        G.Out(pdGendoc,"END ** JOIN FEDERATION (BAD) SERVICE **");
+       // FIXME strange to send 2 messages?
        // Prepare answer about JoinFederationExecution
-       NetworkMessage rep ;
-      rep.type = NetworkMessage::JOIN_FEDERATION_EXECUTION ;
+       NM_Join_Federation_Execution rep ;
       rep.exception = e_FederateAlreadyExecutionMember ;
-      strcpy(rep.exceptionReason,"Federate with same name has yet joined the 
federation");
+      rep.exceptionReason = "Federate with same name has yet joined the 
federation";
 
-      G.Out(pdGendoc,"processJoinFederation==>Answer to RTIA JFE ERROR 
%s",rep.exceptionReason);
+      G.Out(pdGendoc,"processJoinFederation==>Answer to RTIA JFE ERROR 
%s",rep.exceptionReason.c_str());
 
-      rep.write(link);
+      rep.send(link);
       return ;
        }               
 
@@ -210,11 +205,8 @@
 
     // Prepare answer about JoinFederationExecution
     // This answer wille be made AFTER FED file processing
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::JOIN_FEDERATION_EXECUTION ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federationName = new char[strlen(federation)+1];
-    strcpy(rep.federationName,federation);
+    NM_Join_Federation_Execution rep ;        
+    rep.federationName = federation;    
     rep.federate = num_federe ;
     rep.federation = num_federation ;
     rep.numberOfRegulators = nb_regulateurs ;
@@ -225,7 +217,7 @@
     TypeException e = e_NO_EXCEPTION ;
     // Open FED file and says to RTIA if success
     FILE *fdd ;
-    if ( (fdd=fopen(filename,"r")) == NULL )
+    if ( (fdd=fopen(filename.c_str(),"r")) == NULL )
         {
         // Problem : file has been opened during create federation and now we 
can't
         // May be file has been deleted       
@@ -234,28 +226,25 @@
         }
 
     // RTIG says OK or not to RTIA
-    NetworkMessage repFED ;
-    repFED.type = NetworkMessage::GET_FED_FILE ;
+    NM_Get_FED_File repFED ;    
     repFED.federate = num_federe ;
     repFED.federation = num_federation ;
     repFED.number = 0 ;
-    repFED.FEDid = new char[strlen(filename)+1] ;
-    strcpy(repFED.FEDid,filename) ;
+    repFED.FEDid = filename ;    
     repFED.exception = e ;
     // Send answer
     D.Out(pdTrace,"send NetworkMessage of Type %d after open \"%s\"",
-          repFED.type,repFED.FEDid);
+          repFED.getType(),repFED.FEDid.c_str());
     G.Out(pdGendoc,"processJoinFederation====>Begin FED file transfer");
 
-    repFED.write(link);
+    repFED.send(link);
 
     if ( e ==  e_NO_EXCEPTION )  
         {
         // Wait for OK from RTIA
-        NetworkMessage msg ;
-        msg.type = NetworkMessage::GET_FED_FILE ;
-        D.Out(pdTrace,"wait NetworkMessage of Type %d",msg.type);
-        msg.read(link);
+       NM_Get_FED_File msg ;        
+        D.Out(pdTrace,"wait NetworkMessage of Type %d",msg.getType());
+        msg.receive(link);
         assert ( msg.number == 0 );
         // RTIA has opened working file then RTIG has to transfer file contents
         // line by line
@@ -265,41 +254,34 @@
             {
             num_line++;
             // RTIG sends line to RTIA and number gives line number
-            repFED.type = NetworkMessage::GET_FED_FILE ;
             repFED.exception = e_NO_EXCEPTION ;
             repFED.federate = num_federe ;
             repFED.federation = num_federation ;
             repFED.number = num_line ;
-            repFED.FEDid = new char[strlen(filename)+1] ;
-            strcpy(repFED.FEDid,filename) ;
+            repFED.FEDid = filename;            
             // line transfered
-            repFED.handleArraySize = 1 ;
-            assert ( strlen(file_line) <= MAX_BYTES_PER_VALUE );
-            repFED.setValue(0,file_line,strlen(file_line)+1);  
-
+            repFED.setFEDLine(std::string(file_line));            
             // Send answer
-            repFED.write(link);
+            repFED.send(link);
 
             // Wait for OK from RTIA
-            msg.read(link);
+            msg.receive(link);
             assert ( msg.number == num_line );
             }
     
        // close
        fclose(fdd) ;
-        repFED.type = NetworkMessage::GET_FED_FILE ;
         repFED.exception = e_NO_EXCEPTION ;
         repFED.federate = num_federe ;
         repFED.federation = num_federation ;
         repFED.number = 0 ;
-        repFED.FEDid = new char[strlen(filename)+1] ;
-        strcpy(repFED.FEDid,filename) ;
+        repFED.FEDid = filename;        
 
         // Send answer
 
         G.Out(pdGendoc,"processJoinFederation====>End  FED file transfer");
 
-        repFED.write(link);
+        repFED.send(link);
         }
     // END of FED file processing
 
@@ -310,11 +292,11 @@
 #endif
 
     D.Out(pdInit, "Federate \"%s\" has joined Federation %u under handle %u.",
-          federate, num_federation, num_federe);
+          federate.c_str(), num_federation, num_federe);
 
     // Send answer
 
-    rep.write(link);
+    rep.send(link);
 
     G.Out(pdGendoc,"exit RTIG::processJoinFederation");
     G.Out(pdGendoc,"END ** JOIN FEDERATION SERVICE **");
@@ -327,7 +309,7 @@
 RTIG::processResignFederation(Socket *link,Handle federation,
                               FederateHandle federe)
 {
-    NetworkMessage reponse ;
+    NM_Resign_Federation_Execution reponse ;
 
     G.Out(pdGendoc,"BEGIN ** RESIGN FEDERATION SERVICE **");
     G.Out(pdGendoc,"enter RTIG::processResignFederation");
@@ -339,11 +321,9 @@
     auditServer << "Federate " << federe << " resign 
federation("<<federation<<")" ;
 
     // Send answer to RTIA
-    reponse.exception = e_NO_EXCEPTION ;
-    reponse.type = NetworkMessage::RESIGN_FEDERATION_EXECUTION ;
     reponse.federate = federe ;
     reponse.federation = federation ;
-    reponse.write(link);
+    reponse.send(link);
 
     G.Out(pdGendoc,"exit RTIG::processResignFederation");
     G.Out(pdGendoc,"END ** RESIGN FEDERATION SERVICE **");
@@ -355,61 +335,54 @@
 void
 RTIG::processDestroyFederation(Socket *link, NetworkMessage *req)
 {
-    NetworkMessage rep ;
+    NM_Destroy_Federation_Execution rep ;
     Handle num_federation ;
 
-    char *federation = req->federationName ;
+    std::string federation = req->federationName ;
 
     G.Out(pdGendoc,"enter RTIG::processDestroyFederation");
     G.Out(pdGendoc,"BEGIN ** DESTROY FEDERATION SERVICE **");
 
-    rep.exception = e_NO_EXCEPTION ;
+    if (federation.length() == 0) throw RTIinternalError("Invalid Federation 
Name.");
 
-    if (federation == NULL) throw RTIinternalError("Invalid Federation Name.");
-
-    federations.exists(federation, num_federation);
+    federations.exists(federation.c_str(), num_federation);
     // May throw RTIinternalError
     //           FederatesCurrentlyJoined
     //           FederationExecutionDoesNotExist
-    try
-      {
+    try {
       federations.destroyFederation(num_federation);
       // Here delete federation (num_federation) has been done
       federationHandles.free(num_federation);
-      D.Out(pdInit, "Federation \"%s\" has been destroyed.", federation);
+      D.Out(pdInit, "Federation \"%s\" has been destroyed.", 
federation.c_str());
       }
     catch (RTI::Exception &e)
       { printf("ERROR : %s  reason : %s\n",e._name,e._reason);
         if (strcmp(e._name,"RTIinternalError")==0 )
           {
           rep.exception = e_RTIinternalError;
-          strcpy(rep.exceptionReason,e._reason);
+          rep.exceptionReason = e._reason;
           } 
         else if (strcmp(e._name,"FederationExecutionDoesNotExist")==0 )
           {
           rep.exception = e_FederationExecutionDoesNotExist;
-          strcpy(rep.exceptionReason,e._reason);
+          rep.exceptionReason =e._reason;
           }
         else if (strcmp(e._name,"FederatesCurrentlyJoined")==0 )
           {
           rep.exception = e_FederatesCurrentlyJoined;
-          strcpy(rep.exceptionReason,"at least one federate joined");
+          rep.exceptionReason = "at least one federate joined";
           }       
       }
 
-    rep.type = NetworkMessage::DESTROY_FEDERATION_EXECUTION ;
     rep.federate = req->federate ;
-    rep.federationName = new char[strlen(req->federationName)+1];
-    strcpy(rep.federationName,req->federationName);
+    rep.federationName = req->federationName;
     if ( rep.exception == e_NO_EXCEPTION )
        {
-       auditServer << "Federation Name \"" << federation << 
"\"("<<num_federation<<") destroyed." ;
+       auditServer << "Federation Name \"" << federation.c_str() << 
"\"("<<num_federation<<") destroyed." ;
        }
     G.Out(pdGendoc,"processDestroyFederation===>write DFE to RTIA");
 
-    rep.write(link);
-
-
+    rep.send(link);
 
     G.Out(pdGendoc,"END ** DESTROY FEDERATION SERVICE **");
     G.Out(pdGendoc,"exit RTIG::processDestroyFederation");
@@ -418,14 +391,14 @@
 // ----------------------------------------------------------------------------
 //! Put federate as time regulating.
 void
-RTIG::processSetTimeRegulating(NetworkMessage *msg)
+RTIG::processSetTimeRegulating(NM_Set_Time_Regulating *msg)
 {
-    if (msg->regulator) {
-        auditServer << "ON at time " << msg->date ;
+  if (msg->isRegulator()) {
+        auditServer << "ON at time " << msg->getDate();
 
         federations.createRegulator(msg->federation,
                                      msg->federate,
-                                     msg->date);
+                                     msg->getDate());
         D.Out(pdTerm, "Federate %u of Federation %u sets TimeRegulation ON.",
               msg->federate, msg->federation);
     }
@@ -442,10 +415,11 @@
 // ----------------------------------------------------------------------------
 //! Put federate as time constrained
 void
-RTIG::processSetTimeConstrained(NetworkMessage *msg)
+RTIG::processSetTimeConstrained(NM_Set_Time_Constrained *msg)
 {
-    if (msg->constrained) {
-        auditServer << "ON at time " << msg->date ;
+  
+  if (msg->isConstrained()) {
+        auditServer << "ON at time " << msg->getDate();
 
         federations.addConstrained(msg->federation,
                                     msg->federate);
@@ -467,13 +441,13 @@
 void
 RTIG::processMessageNull(NetworkMessage *msg)
 {
-    auditServer << "Date " << msg->date ;
+    auditServer << "Date " << msg->getDate() ;
 
     // Catch all exceptions because RTIA does not expect an answer anyway.
     try {
         federations.updateRegulator(msg->federation,
                                      msg->federate,
-                                     msg->date);
+                                     msg->getDate());
     } catch (Exception &e) {}
 }
 
@@ -486,50 +460,49 @@
     G.Out(pdGendoc,"BEGIN ** REGISTER FEDERATION SYNCHRONIZATION POINT Service 
**");
     G.Out(pdGendoc,"enter RTIG::processRegisterSynchronization");
 
-    auditServer << "Label \"" << req->label << "\" registered. Tag is \""
-               << req->tag << "\"" ;
+    auditServer << "Label \"" << req->getLabel().c_str() << "\" registered. 
Tag is \""
+               << req->getTag().c_str() << "\"" ;
 
     // boolean true means a federates set exists
     if ( req->boolean )
         federations.manageSynchronization(req->federation,
                                           req->federate,
                                           true,
-                                          req->label,
-                                          req->tag,
+                                          req->getLabel().c_str(),
+                                          req->getTag().c_str(),
                                           req->handleArraySize,
                                           req->handleArray);
     else
         federations.manageSynchronization(req->federation,
                                           req->federate,
                                           true,
-                                          req->label,
-                                          req->tag);
+                                          req->getLabel().c_str(),
+                                          req->getTag().c_str());
     D.Out(pdTerm, "Federation %u is now synchronizing.", req->federation);
 
     // send synchronizationPointRegistrationSucceeded() to federate.
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED ;
+    NM_Synchronization_Point_Registration_Succeeded rep ;    
     rep.federate = req->federate ;
     rep.federation = req->federation ;
-    rep.setLabel(req->label);
+    rep.setLabel(req->getLabel().c_str());
 
     G.Out(pdGendoc,"      processRegisterSynchronization====> write SPRS to 
RTIA");
 
-    rep.write(link);
+    rep.send(link);
 
     // boolean true means a federates set exists
     if ( req->boolean )
         federations.broadcastSynchronization(req->federation,
                                           req->federate,
-                                          req->label,
-                                          req->tag,
+                                          req->getLabel().c_str(),
+                                          req->getTag().c_str(),
                                           req->handleArraySize,
                                           req->handleArray);
     else
         federations.broadcastSynchronization(req->federation,
                                           req->federate,
-                                          req->label,
-                                          req->tag);
+                                          req->getLabel().c_str(),
+                                          req->getTag().c_str());
 
     G.Out(pdGendoc,"exit  RTIG::processRegisterSynchronization");
     G.Out(pdGendoc,"END   ** REGISTER FEDERATION SYNCHRONIZATION POINT Service 
**");
@@ -541,12 +514,12 @@
 void
 RTIG::processSynchronizationAchieved(Socket *, NetworkMessage *req)
 {
-    auditServer << "Label \"" << req->label << "\" ended." ;
+    auditServer << "Label \"" << req->getLabel().c_str() << "\" ended." ;
 
     federations.manageSynchronization(req->federation,
                                        req->federate,
                                        false,
-                                       req->label,
+                                       req->getLabel().c_str(),
                                        "");
     D.Out(pdTerm, "Federate %u has synchronized.", req->federate);
 }
@@ -563,11 +536,11 @@
     if ( req->boolean )
         // With time
         federations.requestFederationSave(req->federation, req->federate,
-                                          req->label, req->date);
+                                          req->getLabel().c_str(), 
req->getDate());
     else
         // Without time
         federations.requestFederationSave(req->federation, req->federate,
-                                          req->label);
+                                          req->getLabel().c_str());
 
     G.Out(pdGendoc,"exit  RTIG::processRequestFederationSave");
     G.Out(pdGendoc,"END   ** REQUEST FEDERATION SAVE SERVICE **");
@@ -593,14 +566,14 @@
 RTIG::processFederateSaveStatus(Socket *, NetworkMessage *req)
 {
     G.Out(pdGendoc,"enter RTIG::processFederateSaveStatus");
-    if (req->type == NetworkMessage::FEDERATE_SAVE_COMPLETE)
+    if (req->getType() == NetworkMessage::FEDERATE_SAVE_COMPLETE)
         G.Out(pdGendoc,"BEGIN ** FEDERATE SAVE COMPLETE SERVICE **");
     else
         G.Out(pdGendoc,"BEGIN ** FEDERATE SAVE NOT COMPLETE SERVICE **");
 
     auditServer << "Federate " << req->federate << " save ended." ;
 
-    bool status = req->type == NetworkMessage::FEDERATE_SAVE_COMPLETE ;
+    bool status = req->getType() == NetworkMessage::FEDERATE_SAVE_COMPLETE ;
     federations.federateSaveStatus(req->federation, req->federate, status);
 
     G.Out(pdGendoc,"exit  END   ** FEDERATE SAVE (NOT) COMPLETE SERVICE **");
@@ -616,7 +589,7 @@
     auditServer << "Federate " << req->federate << " request restore." ;
 
     federations.requestFederationRestore(req->federation, req->federate,
-                                          req->label);
+                                          req->getLabel().c_str());
     G.Out(pdGendoc,"exit  RTIG::processRequestFederationRestore");
     G.Out(pdGendoc,"END   ** REQUEST FEDERATION RESTORE SERVICE **");
 }
@@ -629,7 +602,7 @@
     G.Out(pdGendoc,"enter RTIG::processRequestFederateRestoreStatus");
     auditServer << "Federate " << req->federate << " restore ended." ;
 
-    bool status = req->type == NetworkMessage::FEDERATE_RESTORE_COMPLETE ;
+    bool status = req->getType() == NetworkMessage::FEDERATE_RESTORE_COMPLETE ;
 
     federations.federateRestoreStatus(req->federation, req->federate, status);
 
@@ -642,7 +615,7 @@
 void
 RTIG::processPublishObjectClass(Socket *link, NetworkMessage *req)
 {
-    bool pub = (req->type == NetworkMessage::PUBLISH_OBJECT_CLASS);
+    bool pub = (req->getType() == NetworkMessage::PUBLISH_OBJECT_CLASS);
 
     auditServer << "Class = " << req->objectClass << ", # of att. = " 
                << req->handleArraySize ;
@@ -657,14 +630,11 @@
     D.Out(pdRegister, "Federate %u of Federation %u published object class 
%d.",
           req->federate, req->federation, req->objectClass);
 
-    NetworkMessage rep ;
-    rep.type = req->type ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federate = req->federate ;
-    rep.objectClass = req->objectClass ;
-    rep.handleArraySize = 0 ;
+    std::auto_ptr<NetworkMessage> rep(NM_Factory::create(req->getType()));    
+    rep->federate    = req->federate ;
+    rep->objectClass = req->objectClass ;
 
-    rep.write(link); // send answer to RTIA
+    rep->send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -675,7 +645,7 @@
     G.Out(pdGendoc,"enter RTIG::processSubscribeObjectClass");
     G.Out(pdGendoc,"BEGIN **  SUBSCRIBE OBJECT CLASS SERVICE **");
 
-    bool sub = (req->type == NetworkMessage::SUBSCRIBE_OBJECT_CLASS);
+    bool sub = (req->getType() == NetworkMessage::SUBSCRIBE_OBJECT_CLASS);
 
     auditServer << "Class = " << req->objectClass
                << ", # of att. = " << req->handleArraySize ;
@@ -690,14 +660,12 @@
           "Federate %u of Federation %u subscribed to object class %d.",
           req->federate, req->federation, req->objectClass);
 
-    NetworkMessage rep ;
-    rep.type = req->type ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federate = req->federate ;
-    rep.objectClass = req->objectClass ;
-    rep.handleArraySize = 0 ;
+    std::auto_ptr<NetworkMessage> rep(NM_Factory::create(req->getType()));
+    rep->federate = req->federate ;
+    rep->objectClass = req->objectClass ;
+    rep->handleArraySize = 0 ;
 
-    rep.write(link); // send answer to RTIA
+    rep->send(link); // send answer to RTIA
 
     G.Out(pdGendoc,"END   **  SUBSCRIBE OBJECT CLASS SERVICE **");
     G.Out(pdGendoc,"exit  RTIG::processSubscribeObjectClass");
@@ -710,7 +678,7 @@
 {
     assert(link != NULL && req != NULL);
 
-    bool pub = (req->type == NetworkMessage::PUBLISH_INTERACTION_CLASS);
+    bool pub = (req->getType() == NetworkMessage::PUBLISH_INTERACTION_CLASS);
 
     auditServer << "Class = " << req->interactionClass ;
     federations.publishInteraction(req->federation,
@@ -722,13 +690,11 @@
           req->federation,
           req->interactionClass);
 
-    NetworkMessage rep ;
-    rep.type = req->type ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federate = req->federate ;
-    rep.interactionClass = req->interactionClass ;
+    std::auto_ptr<NetworkMessage> rep(NM_Factory::create(req->getType())); ;   
+    rep->federate = req->federate ;
+    rep->interactionClass = req->interactionClass ;
 
-    rep.write(link); // send answer to RTIA
+    rep->send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -736,7 +702,7 @@
 void
 RTIG::processSubscribeInteractionClass(Socket *link, NetworkMessage *req)
 {
-    bool sub = (req->type == NetworkMessage::SUBSCRIBE_INTERACTION_CLASS);
+    bool sub = (req->getType() == NetworkMessage::SUBSCRIBE_INTERACTION_CLASS);
 
     auditServer << "Class = %u" << req->interactionClass ;
     federations.subscribeInteraction(req->federation,
@@ -749,13 +715,11 @@
           req->federation,
           req->interactionClass);
 
-    NetworkMessage rep ;
-    rep.type = req->type ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federate = req->federate ;
-    rep.interactionClass = req->interactionClass ;
+    std::auto_ptr<NetworkMessage> rep(NM_Factory::create(req->getType()));;    
+    rep->federate = req->federate ;
+    rep->interactionClass = req->interactionClass ;
 
-    rep.write(link); // send answer to RTIA
+    rep->send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -763,26 +727,26 @@
 void
 RTIG::processRegisterObject(Socket *link, NetworkMessage *req)
 {
-    NetworkMessage rep ;
+  std::auto_ptr<NetworkMessage> rep(NM_Factory::create(req->getType()));;
 
     auditServer << "Class = %u" << req->objectClass ;
-    rep.object = federations.registerObject(req->federation,
+    rep->object = federations.registerObject(req->federation,
                                              req->federate,
                                              req->objectClass,
-                                             req->label);
-    auditServer << ", Handle = " << rep.object ;
+                                             
const_cast<char*>(req->getLabel().c_str()));
+    auditServer << ", Handle = " << rep->object ;
 
     D.Out(pdRegister,
           "Object \"%s\" of Federate %u has been registered under ID %u.",
-          req->label, req->federate, rep.object);
+          req->getLabel().c_str(), req->federate, rep->object);
 
-    rep.type = req->type ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federate = req->federate ;
-    rep.setLabel(req->label);
+    rep->federate    = req->federate ;
+    rep->federation  = req->federation;
+    rep->objectClass = req->objectClass;
     // rep.object is set by the call of registerObject
+    rep->setLabel(req->getLabel());
 
-    rep.write(link); // Send answer to RTIA
+    rep->send(link); // Send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -793,13 +757,13 @@
     ValueLengthPair *ValueArray = NULL ;
 
     auditServer << "ObjID = " << req->object
-               << ", Date = " << req->date ;
+               << ", Date = " << req->getDate() ;
 
     // Get Value Array
     ValueArray = req->getAttribValueArray();
 
     // Forward the call
-    if ( req->getBoolean() )
+    if ( req->isDated )
         {
         // UAV with time
         federations.updateAttribute(req->federation,
@@ -808,8 +772,8 @@
                                  req->handleArray,
                                  ValueArray,
                                  req->handleArraySize,
-                                 req->date,
-                                 req->label);
+                                 req->getDate(),
+                                 req->getLabel().c_str());
         }
     else
         {
@@ -820,23 +784,21 @@
                                  req->handleArray,
                                  ValueArray,
                                  req->handleArraySize,
-                                 req->label);
+                                 req->getLabel().c_str());
         }
     free(ValueArray);
 
     // Building answer (Network Message re)
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::UPDATE_ATTRIBUTE_VALUES ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Update_Attribute_Values rep ;
     rep.federate = req->federate ;
     rep.object = req->object ;
-    rep.date = req->date ;
+    rep.setDate(req->getDate());
     rep.handleArraySize = 0 ;
     // Don't forget label and tag
-    strcpy(rep.label,req->label) ;
-    strcpy(rep.tag,req->tag) ;
+    rep.setLabel(req->getLabel());
+    rep.setTag(req->getTag());
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -851,10 +813,10 @@
 
     // Building Value Array
     auditServer << "IntID = " << req->interactionClass
-               << ", date = " << req->date ;
+               << ", date = " << req->getDate() ;
     values = req->getParamValueArray();
 
-    if ( req->getBoolean() )
+    if ( req->isDated )
         {
         federations.updateParameter(req->federation,
                                req->federate,
@@ -862,9 +824,9 @@
                                req->handleArray,
                                values,
                                req->handleArraySize,
-                               req->date,
+                               req->getDate(),
                                req->region,
-                               req->label);
+                               req->getLabel().c_str());
         }
     else
         {
@@ -875,24 +837,22 @@
                                values,
                                req->handleArraySize,
                                req->region,
-                               req->label);
+                               req->getLabel().c_str());
         }
     free(values);
 
     D.Out(pdDebug, "Interaction %d parameters update completed",
           req->interactionClass);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::SEND_INTERACTION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Send_Interaction rep ;    
     rep.federate = req->federate ;
     rep.interactionClass = req->interactionClass ;
     rep.handleArraySize = 0 ;
     // Don't forget label and tag
-    strcpy(rep.label,req->label) ;
-    strcpy(rep.tag,req->tag) ;
+    rep.setLabel(req->getLabel());
+    rep.setTag(req->getTag());
     G.Out(pdGendoc,"processSendInteraction===>write");
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 
     G.Out(pdGendoc,"exit RTIG::processSendInteraction");
     G.Out(pdGendoc,"END ** SEND INTERACTION SERVICE **");
@@ -908,30 +868,28 @@
     G.Out(pdGendoc,"enter RTIG::processDeleteObject");
     auditServer << "ObjID = %u" << req->object ;
 
-    if ( req->getBoolean() ) {
+    if ( req->isDated ) {
        federations.destroyObject(req->federation,
                                  req->federate,
                                   req->object,
-                                 req->date,
-                                  req->label);
+                                 req->getDate(),
+                                  const_cast<char*>(req->getLabel().c_str()));
     }
     else {
        federations.destroyObject(req->federation,
                                  req->federate,
                                   req->object,
-                                  req->label);
+                                  const_cast<char*>(req->getLabel().c_str()));
     }
 
     D.Out(pdRegister, "Object # %u of Federation %u has been deleted.",
           req->object, req->federation);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DELETE_OBJECT ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Delete_Object rep ;    
     rep.federate = req->federate ;
     rep.object = req->object ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
     
     G.Out(pdGendoc,"exit RTIG::processDeleteObject");
     G.Out(pdGendoc,"END ** DELETE OBJECT INSTANCE **");
@@ -955,13 +913,11 @@
     D.Out(pdDebug, "Owner of Attribute %u of Object %u .",
           req->handleArray[0], req->object);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Query_Attribute_Ownership rep ;    
     rep.federate = req->federate ;
     rep.object = req->object ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -969,7 +925,7 @@
 void
 RTIG::processAttributeOwnedByFederate(Socket *link, NetworkMessage *req)
 {
-    NetworkMessage rep ;
+    NM_Is_Attribute_Owned_By_Federate rep ;
 
     D.Out(pdDebug, "Owner of Attribute %u of Object %u .",
           req->handleArray[0], req->object);
@@ -980,19 +936,17 @@
                              req->federate,
                              req->object,
                              req->handleArray[0]))
-        strcpy(rep.label, "RTI_TRUE");
+        rep.setLabel("RTI_TRUE");
     else
-        strcpy(rep.label, "RTI_FALSE");
+        rep.setLabel("RTI_FALSE");
 
     D.Out(pdDebug, "Owner of Attribute %u of Object %u .",
           req->handleArray[0], req->object);
 
-    rep.type = NetworkMessage::IS_ATTRIBUTE_OWNED_BY_FEDERATE ;
-    rep.exception = e_NO_EXCEPTION ;
     rep.federate = req->federate ;
     rep.object = req->object ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1007,20 +961,18 @@
                                       req->object,
                                       req->handleArray,
                                       req->handleArraySize,
-                                      req->label);
+                                      req->getLabel().c_str());
 
     D.Out(pdDebug, "Federate %u of Federation %u negotiate "
           "divestiture of object %u.",
           req->federate, req->federation, req->object);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Negotiated_Attribute_Ownership_Divestiture rep ;    
     rep.federate = req->federate ;
     rep.object = req->object ;
     rep.handleArraySize = 0 ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1042,14 +994,12 @@
           "of object %u.",
           req->federate, req->federation, req->object);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Attribute_Ownership_Acquisition_If_Available rep ;   
     rep.federate = req->federate ;
     rep.object = req->object ;
     rep.handleArraySize = 0 ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1071,14 +1021,12 @@
           "of object %u.",
           req->federate, req->federation, req->object);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Unconditional_Attribute_Ownership_Divestiture rep ;    
     rep.federate = req->federate ;
     rep.object = req->object ;
     rep.handleArraySize = 0 ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1094,20 +1042,18 @@
                          req->object,
                          req->handleArray,
                          req->handleArraySize,
-                         req->label);
+                         req->getLabel().c_str());
 
     D.Out(pdDebug,
           "Federate %u of Federation %u ownership acquisition of object %u.",
           req->federate, req->federation, req->object);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Attribute_Ownership_Acquisition rep ;    
     rep.federate = req->federate ;
     rep.object = req->object ;
     rep.handleArraySize = 0 ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1128,14 +1074,12 @@
           "divestiture of object %u.",
           req->federate, req->federation, req->object);
 
-    NetworkMessage rep ;
-    rep.type = 
NetworkMessage::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Cancel_Negotiated_Attribute_Ownership_Divestiture rep ;    
     rep.federate = req->federate ;
     rep.object = req->object ;
     rep.handleArraySize = 0 ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1157,19 +1101,17 @@
           "of object %u.",
           req->federate, req->federation, req->object);
 
-    NetworkMessage rep ;
+    NM_Attribute_Ownership_Release_Response rep ;
     rep.handleArraySize = attributes->size();
 
     for (unsigned int i = 0 ; i < attributes->size(); i++) {
         rep.handleArray[i] = attributes->getHandle(i);
     }
 
-    rep.type = NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE ;
-    rep.exception = e_NO_EXCEPTION ;
     rep.federate = req->federate ;
     rep.object = req->object ;
 
-    rep.write(link); // Send answer to RTIA
+    rep.send(link); // Send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1190,14 +1132,12 @@
           "Federate %u of Federation %u release response of object %u.",
           req->federate, req->federation, req->object);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_Cancel_Attribute_Ownership_Acquisition rep ;    
     rep.federate = req->federate ;
     rep.object = req->object ;
     rep.handleArraySize = 0 ;
 
-    rep.write(link); // send answer to RTIA
+    rep.send(link); // send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1207,7 +1147,7 @@
 {
     // TODO: audit...
 
-    NetworkMessage rep ;
+    NM_DDM_Create_Region rep ;
 
     rep.region = federations.createRegion(req->federation,
                                            req->federate,
@@ -1218,10 +1158,8 @@
                << req->federation << " creates region " << rep.region
                << endl ;
 
-    rep.type = NetworkMessage::DDM_CREATE_REGION ;
-    rep.exception = e_NO_EXCEPTION ;
     rep.federate = req->federate ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1236,12 +1174,9 @@
                << req->federation << " modifies region " << req->region
                << endl ;
 
-    NetworkMessage rep ;
-
-    rep.type = NetworkMessage::DDM_MODIFY_REGION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Modify_Region rep ;
     rep.federate = req->federate ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1257,12 +1192,10 @@
                << req->federation << " deletes region " << req->region
                << endl ;
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DDM_DELETE_REGION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Delete_Region rep ;    
     rep.federate = req->federate ;
     rep.region = req->region ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1280,11 +1213,9 @@
                                 req->region, req->handleArraySize,
                                 req->handleArray);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DDM_ASSOCIATE_REGION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Associate_Region rep ;    
     rep.federate = req->federate ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1301,11 +1232,9 @@
                << req->federation << " associates region " << req->region
                << " from object " << req->object << endl ;
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DDM_UNASSOCIATE_REGION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Unassociate_Region rep ;
     rep.federate = req->federate ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1322,13 +1251,11 @@
                                       req->objectClass, req->region,
                                       req->handleArraySize, req->handleArray);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Subscribe_Attributes rep ;    
     rep.federate = req->federate ;
     rep.objectClass = req->objectClass ;
     rep.handleArraySize = 0 ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1344,11 +1271,9 @@
     federations.unsubscribeAttributesWR(req->federation, req->federate,
                                         req->objectClass, req->region);
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Unsubscribe_Attributes rep ;
     rep.federate = req->federate ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1365,11 +1290,9 @@
                << req->federation << " subscribes with region " << req->region
                << " to interaction class " << req->interactionClass << endl ;
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DDM_SUBSCRIBE_INTERACTION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Subscribe_Interaction rep ;    
     rep.federate = req->federate ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1386,11 +1309,9 @@
                << req->federation << " unsubscribes with region " << 
req->region
                << " from interaction class " << req->interactionClass << endl ;
 
-    NetworkMessage rep ;
-    rep.type = NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION ;
-    rep.exception = e_NO_EXCEPTION ;
+    NM_DDM_Unsubscribe_Interaction rep ;
     rep.federate = req->federate ;
-    rep.write(link);
+    rep.send(link);
 }
 
 // ----------------------------------------------------------------------------
@@ -1398,7 +1319,7 @@
 void
 RTIG::processRegisterObjectWithRegion(Socket *link, NetworkMessage *req)
 {
-    NetworkMessage rep ;
+       std::auto_ptr<NetworkMessage> rep(NM_Factory::create(req->getType()));
     // FIXME bug #9869
     // When we were passed a set of region
     // we should register object for each region  
@@ -1407,24 +1328,20 @@
     //     - req->region  (coming from NetworkMessage::region)
     //     - req->regions (coming from BasicMessage::regions)
     // would be nice to sort those thing out.
-    rep.object = federations.registerObjectWithRegion(req->federation,
+    rep->object = federations.registerObjectWithRegion(req->federation,
                                                      req->federate,
                                                      req->objectClass,
-                                                     req->label,
+                                                     
const_cast<char*>(req->getLabel().c_str()),
                                                      req->region,
                                                      req->handleArraySize,
                                                      req->handleArray);
        
     D.Out(pdRegister,
           "Object \"%s\" of Federate %u has been registered under ID %u.",
-          req->label, req->federate, rep.object);
-
-    rep.type = NetworkMessage::DDM_REGISTER_OBJECT ;
-    rep.type = req->type ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federate = req->federate ;
+          req->getLabel().c_str(), req->federate, rep->object);
 
-    rep.write(link); // Send answer to RTIA
+    rep->federate = req->federate ;
+    rep->send(link); // Send answer to RTIA
 }
 
 // ----------------------------------------------------------------------------
@@ -1432,7 +1349,7 @@
 void
 RTIG::processRequestObjectAttributeValueUpdate(Socket *link, NetworkMessage 
*request)
 {
-    NetworkMessage answer ;
+    NM_Request_Object_Attribute_Value_Update answer ;
     Handle federateOwner ;  // federate owner of the object
     G.Out(pdGendoc,"enter RTIG::processRequestObjectAttributeValueUpdate");
     G.Out(pdGendoc,"BEGIN ** REQUEST OBJECT ATTRIBUTE VALUE UPDATE **");
@@ -1452,29 +1369,27 @@
      catch (ObjectNotKnown e)
         {
         answer.exception = e_ObjectNotKnown ;
-        strcpy(answer.exceptionReason,e._reason) ;
+        answer.exceptionReason = e._reason ;
         }
      catch (FederationExecutionDoesNotExist e)
         {
         answer.exception = e_FederationExecutionDoesNotExist ;
-        strcpy(answer.exceptionReason,e._reason) ;
+        answer.exceptionReason = e._reason ;
         }
      catch (RTIinternalError e)
         {
         answer.exception = e_RTIinternalError ;
-        strcpy(answer.exceptionReason,e._reason) ;
+        answer.exceptionReason = e._reason ;
         }
 
-    answer.type = NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE;
-    answer.type = request->type ;
     answer.federate = request->federate ;
     answer.object = request->object ;
 
-    answer.write(link); // Send answer to RTIA
+    answer.send(link); // Send answer to RTIA
     G.Out(pdGendoc,"exit  RTIG::processRequestObjectAttributeValueUpdate");
     G.Out(pdGendoc,"END   ** REQUEST OBJECT ATTRIBUTE VALUE UPDATE **");
 }
 
 }} // namespace certi/rtig
 
-// $Id: RTIG_processing.cc,v 3.61 2008/04/08 14:18:18 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.62 2008/04/26 14:59:42 erk Exp $

Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.81
retrieving revision 3.82
diff -u -b -r3.81 -r3.82
--- RTIG/Federation.cc  1 Apr 2008 13:00:46 -0000       3.81
+++ RTIG/Federation.cc  26 Apr 2008 14:59:42 -0000      3.82
@@ -18,11 +18,12 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: Federation.cc,v 3.81 2008/04/01 13:00:46 rousse Exp $
+// $Id: Federation.cc,v 3.82 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
 #include "Federation.hh"
+#include "NM_Classes.hh"
 #include <sstream>
 #include <cassert>
 
@@ -41,6 +42,7 @@
 #include "ObjectClassAttribute.hh"
 #include "PrettyDebug.hh"
 #include "LBTS.hh"
+#include "NM_Classes.hh"
 
 #ifdef _WIN32
 #include <windows.h>
@@ -438,39 +440,37 @@
     // Send, to the newly added federate, a Null message from each regulating
     // federate (i) with their logical time h(i). This permits to calculate
     // its LBTS.
-    NetworkMessage message ;
+    NM_Message_Null nullMessage;
+    NM_Announce_Synchronization_Point ASPMessage; 
     try {
        std::vector<LBTS::FederateClock> v ;
        regulators.get(v);
 
         for (unsigned int i = 0 ; i < v.size(); ++i) {
-            message.type = NetworkMessage::MESSAGE_NULL ;
-            message.federation = handle ;
-           message.federate = v[i].first ;
-           message.date = v[i].second ;
-
+            nullMessage.federation = handle ;
+               nullMessage.federate = v[i].first ;
+               nullMessage.setDate(v[i].second);
             D.Out(pdTerm,
                  "Sending NULL message(type %d) from %d to new federate.",
-                  message.type, message.federate);
+                  nullMessage.getType(), nullMessage.federate);
 
-            message.write(tcp_link);
+            nullMessage.send(tcp_link);
         }
 
         // If federation is synchronizing, put federate in same state.
         if (isSynchronizing()) {
-            message.type = NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT ;
-            message.federate = federate_handle ;
-            message.federation = handle ;
+            ASPMessage.federate = federate_handle ;
+            ASPMessage.federation = handle ;
 
             std::map<const char *, const char *>::const_iterator i ;
             i = synchronizationLabels.begin();
             for (; i != synchronizationLabels.end(); i++) {
-                message.setLabel((*i).first);
-                message.setTag((*i).second);
+                ASPMessage.setLabel((*i).first);
+                ASPMessage.setTag((*i).second);
                 D.Out(pdTerm, "Sending synchronization message %s (type %d)"
-                      " to the new Federate.", (*i).first, message.type);
+                      " to the new Federate.", (*i).first, 
ASPMessage.getType());
 
-                message.write(tcp_link);
+                ASPMessage.send(tcp_link);
                 federates.back().addSynchronizationLabel((*i).first);
             }
         }
@@ -528,13 +528,12 @@
     D.Out(pdTerm, "Federation %d: Federate %d is now a regulator(Time=%f).",
           handle, federate_handle, time);
 
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::SET_TIME_REGULATING ;
+    NM_Set_Time_Regulating msg ;
     msg.exception = e_NO_EXCEPTION ;
     msg.federation = handle ;
     msg.federate = federate_handle ;
-    msg.regulator = true ;
-    msg.date = time ;
+    msg.regulatorOn();
+    msg.setDate(time);
 
     this->broadcastAnyMessage(&msg, 0);
 }
@@ -557,7 +556,7 @@
 #else
                 socket = server->getSocketLink(i->getHandle());
 #endif
-                msg->write(socket);
+                msg->send(socket);
             }
             catch (RTIinternalError &e) {
                 D[pdExcept] << "Reference to a killed Federate while "
@@ -605,7 +604,7 @@
 #else
                             socket = server->getSocketLink(i->getHandle());
 #endif
-                            msg->write(socket);
+                            msg->send(socket);
                             }
                         catch (RTIinternalError &e)
                             {
@@ -898,8 +897,7 @@
         throw RTIinternalError("Bad pause label(null or too long).");
 
     // broadcast announceSynchronizationPoint() to all federates in federation.
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT ;
+    NM_Announce_Synchronization_Point msg ;    
     msg.federate = federate ;
     msg.federation = handle ;
     msg.setLabel(label);
@@ -934,8 +932,7 @@
         throw RTIinternalError("Bad pause label(null or too long).");
 
     // broadcast announceSynchronizationPoint() to all federates in federation.
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT ;
+    NM_Announce_Synchronization_Point msg ;    
     msg.federate = federate ;
     msg.federation = handle ;
     msg.setLabel(label);
@@ -976,14 +973,12 @@
     saveInProgress = true ;
     saveLabel = the_label ;
 
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::INITIATE_FEDERATE_SAVE ;
+    NM_Initiate_Federate_Save msg ;    
     msg.federate = the_federate ;
     msg.federation = handle ;
     msg.setLabel(the_label);
-    // boolean true means with time and needs time
-    msg.setBoolean(true);
-    msg.date = time;
+    // timed message
+    msg.setDate(time);
 
     G.Out(pdGendoc,"      requestFederationSave====>broadcast I_F_S to all");
 
@@ -1017,13 +1012,10 @@
     saveInProgress = true ;
     saveLabel = the_label ;
 
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::INITIATE_FEDERATE_SAVE ;
+    NM_Initiate_Federate_Save msg ;    
     msg.federate = the_federate ;
     msg.federation = handle ;
     msg.setLabel(the_label);
-    // boolean false means without time
-    msg.setBoolean(false);
 
     G.Out(pdGendoc,"                  requestFederationSave====>broadcast 
I_F_S"
                    " to all");
@@ -1075,14 +1067,12 @@
     }
 
     // Send end save message.
-    NetworkMessage msg ;
-
-    msg.type = saveStatus ? NetworkMessage::FEDERATION_SAVED : 
NetworkMessage::FEDERATION_NOT_SAVED ;
+    std::auto_ptr<NetworkMessage> msg(NM_Factory::create(saveStatus ? 
NetworkMessage::FEDERATION_SAVED : NetworkMessage::FEDERATION_NOT_SAVED )) ;
 
-    msg.federate = the_federate ;
-    msg.federation = handle ;
+    msg->federate = the_federate ;
+    msg->federation = handle ;
 
-    broadcastAnyMessage(&msg, 0);
+    broadcastAnyMessage(msg.get(), 0);
 
     G.Out(pdGendoc,"            =======> broadcast F_S or F_N_S");
 
@@ -1108,11 +1098,8 @@
         throw RestoreInProgress("Already in restoring state.");
 
     Socket * socket ;
+    NetworkMessage *msg;
 
-    NetworkMessage * msg = new NetworkMessage ;
-    msg->federate = the_federate ;
-    msg->federation = handle ;
-    msg->setLabel(the_label);
 
     // Informs sending federate of success/failure in restoring.
     // At this point, only verify that file is present.
@@ -1137,9 +1124,15 @@
 // JYR Note : forcing success to true to skip xmlParseFile (not compliant ?)
     success = true ;
 
-    msg->type = success ?
-        NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED
-        : NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED ;
+    if (success) {
+       msg = 
NM_Factory::create(NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED);
+    } else {
+       msg = 
NM_Factory::create(NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED);
+    }
+    
+    msg->federate = the_federate ;
+    msg->federation = handle ;
+    msg->setLabel(the_label);
 
     socket = server->getSocketLink(msg->federate);
 
@@ -1148,7 +1141,7 @@
     else
        G.Out(pdGendoc,"             =====> send message R_F_R_F to RTIA");
 
-    msg->write(socket);
+    msg->send(socket);
     delete msg ;
 
     // Reading file failed: not restoring !
@@ -1166,10 +1159,9 @@
     restoreInProgress = true ;
 
     // Informs federates a new restore is being done.
-    msg = new NetworkMessage ;
+    msg = NM_Factory::create(NetworkMessage::FEDERATION_RESTORE_BEGUN);
     msg->federate = the_federate ;
     msg->federation = handle ;
-    msg->type = NetworkMessage::FEDERATION_RESTORE_BEGUN ;
 
     G.Out(pdGendoc,"             =====> broadcast message F_R_B");
 
@@ -1177,10 +1169,9 @@
     delete msg ;
 
     // For each federate, send an initiateFederateRestore with correct handle.
-    msg = new NetworkMessage ;
+    msg = NM_Factory::create(NetworkMessage::INITIATE_FEDERATE_RESTORE);
     msg->federation = handle ;
     msg->setLabel(the_label);
-    msg->type = NetworkMessage::INITIATE_FEDERATE_RESTORE ;
 
     for (FederateList::iterator i = federates.begin(); i != federates.end(); 
++i) {
         msg->federate = i->getHandle();
@@ -1188,8 +1179,9 @@
         // send message.
         socket = server->getSocketLink(msg->federate);
         G.Out(pdGendoc,"             =====> send message I_F_R to federate 
%d",msg->federate);
-        msg->write(socket);
+        msg->send(socket);
     }
+    delete msg;
     G.Out(pdGendoc,"exit  Federation::requestFederationRestore");
 }
 
@@ -1217,17 +1209,12 @@
     }
 
     // Send end restore message.
-    NetworkMessage msg ;
-
-    if (restoreStatus)
-        msg.type = NetworkMessage::FEDERATION_RESTORED ;
-    else
-        msg.type = NetworkMessage::FEDERATION_NOT_RESTORED ;
+    std::auto_ptr<NetworkMessage> msg(NM_Factory::create(restoreStatus ? 
NetworkMessage::FEDERATION_RESTORED : NetworkMessage::FEDERATION_NOT_RESTORED)) 
;
 
-    msg.federate = the_federate ;
-    msg.federation = handle ;
+    msg->federate = the_federate ;
+    msg->federation = handle ;
 
-    broadcastAnyMessage(&msg, 0);
+    broadcastAnyMessage(msg.get(), 0);
 
     // Reinitialize state.
     restoreStatus = true ;
@@ -1492,13 +1479,10 @@
     D.Out(pdTerm, "Federation %d: Federate %d is not a regulator anymore.",
           handle, federate_handle);
 
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::SET_TIME_REGULATING ;
-    msg.exception = e_NO_EXCEPTION ;
+    NM_Set_Time_Regulating msg ;    
     msg.federation = handle ;
     msg.federate = federate_handle ;
-    msg.regulator = false ;
-    msg.date = 0 ;
+    msg.regulatorOff();    
 
     broadcastAnyMessage(&msg, 0);
 }
@@ -1549,9 +1533,7 @@
     }
 
     // send a federationSynchronized().
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::FEDERATION_SYNCHRONIZED ;
-    msg.exception = e_NO_EXCEPTION ;
+    NM_Federation_Synchronized msg ;    
     msg.federation = handle ;
     msg.federate = federate_handle ;
     msg.setLabel(label);
@@ -1697,12 +1679,10 @@
 
     regulators.update(federate_handle, time);
 
-    NetworkMessage msg ;
-    msg.type = NetworkMessage::MESSAGE_NULL ;
-    msg.exception = e_NO_EXCEPTION ;
+    NM_Message_Null msg ;   
     msg.federation = handle ;
     msg.federate = federate_handle ;
-    msg.date = time ;
+    msg.setDate(time);
 
     broadcastAnyMessage(&msg, federate_handle);
 }
@@ -2275,7 +2255,7 @@
         throw (ObjectNotKnown)
 {
 FederateHandle theOwnerHandle ;
-NetworkMessage mess ;
+NM_Provide_Attribute_Value_Update mess ;
 
     G.Out(pdGendoc,"enter Federation::requestObjectOwner");
 
@@ -2283,7 +2263,6 @@
     theOwnerHandle = root->requestObjectOwner(theFederateHandle,theObject) ;
 
     // Send a PROVIDE_ATTRIBUTE_VALUE_UPDATE to the owner
-    mess.type = NetworkMessage::PROVIDE_ATTRIBUTE_VALUE_UPDATE ;
     mess.federate = theFederateHandle ;
     mess.object = theObject ;
     mess.handleArraySize = theListSize ;
@@ -2292,12 +2271,10 @@
         mess.handleArray[i] = theAttributeList[i] ;
         }
 
+     mess.send(server->getSocketLink(theOwnerHandle));
+ 
      G.Out(pdGendoc,"            requestObjectOwner ===> write PAVU to RTIA %d"
                    ,theOwnerHandle);
-
-     mess.write(server->getSocketLink(theOwnerHandle));
- 
-   
     G.Out(pdGendoc,"exit  Federation::requestObjectOwner");
     return(theOwnerHandle);
 
@@ -2305,5 +2282,5 @@
 
 }} // namespace certi/rtig
 
-// $Id: Federation.cc,v 3.81 2008/04/01 13:00:46 rousse Exp $
+// $Id: Federation.cc,v 3.82 2008/04/26 14:59:42 erk Exp $
 

Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.39
retrieving revision 3.40
diff -u -b -r3.39 -r3.40
--- RTIG/RTIG.cc        8 Apr 2008 14:18:17 -0000       3.39
+++ RTIG/RTIG.cc        26 Apr 2008 14:59:42 -0000      3.40
@@ -18,13 +18,14 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIG.cc,v 3.39 2008/04/08 14:18:17 rousse Exp $
+// $Id: RTIG.cc,v 3.40 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
 #include "RTIG.hh"
 
 #include "PrettyDebug.hh"
+#include "NM_Classes.hh"
 
 #ifdef _WIN32
 #include <signal.h>
@@ -42,7 +43,7 @@
 namespace certi {
 namespace rtig {
 
-static pdCDebug D("RTIG", __FILE__);
+static PrettyDebug D("RTIG", __FILE__);
 static PrettyDebug G("GENDOC",__FILE__);
 
 // ----------------------------------------------------------------------------
@@ -84,15 +85,12 @@
 Socket*
 RTIG::chooseProcessingMethod(Socket *link, NetworkMessage *msg)
 {
-    G.Out(pdGendoc,"enter RTIG::chooseProcessingMethod type %d",msg->type);
+    G.Out(pdGendoc,"enter RTIG::chooseProcessingMethod type %d 
(%s)",msg->getType(),msg->getName().c_str());
     // This may throw a security error.
-    if ( msg->type != NetworkMessage::DESTROY_FEDERATION_EXECUTION)
+    if ( msg->getType() != NetworkMessage::DESTROY_FEDERATION_EXECUTION)
        socketServer.checkMessage(link->returnSocket(), msg);
 
-       //D.Mes(pdMessage, 'N', msg->type);
-       msg->trace("RTIG::chooseProcessingMethod ");
-       
-    switch(msg->type) {
+    switch(msg->getType()) {
       case NetworkMessage::MESSAGE_NULL:
         D.Out(pdDebug, "Message Null.");
         auditServer.setLevel(0);
@@ -120,20 +118,20 @@
         break ;
 
       case NetworkMessage::CREATE_FEDERATION_EXECUTION:
-        D.Out(pdTrace, "Create federation \"%s\".", msg->federationName);
+        D.Out(pdTrace, "Create federation \"%s\".", 
msg->federationName.c_str());
         auditServer.setLevel(9);
         processCreateFederation(link, msg);
         break ;
 
       case NetworkMessage::DESTROY_FEDERATION_EXECUTION:
-        D.Out(pdTrace, "Destroy federation \"%s\".", msg->federationName);
+        D.Out(pdTrace, "Destroy federation \"%s\".", 
msg->federationName.c_str());
         auditServer.setLevel(9);
         processDestroyFederation(link, msg);
         break ;
 
       case NetworkMessage::JOIN_FEDERATION_EXECUTION:
         D.Out(pdTrace, "federate \"%s\" joins federation \"%s\".",
-              msg->federateName, msg->federationName);
+              msg->federateName.c_str(), msg->federationName.c_str());
         auditServer.setLevel(9);
         processJoinFederation(link, msg);
         break ;
@@ -204,15 +202,16 @@
 
       case NetworkMessage::SET_TIME_REGULATING:
         D.Out(pdTrace, "SetTimeRegulating du federe %u(date=%f).",
-              msg->federate, msg->date);
+              msg->federate, msg->getDate());
         auditServer.setLevel(8);
-        processSetTimeRegulating(msg);
+        processSetTimeRegulating(static_cast<NM_Set_Time_Regulating*>(msg));
         break ;
 
       case NetworkMessage::SET_TIME_CONSTRAINED:
         D.Out(pdTrace, "SetTimeConstrained du federe %u.", msg->federate);
         auditServer.setLevel(8);
-        processSetTimeConstrained(msg);
+        
+        processSetTimeConstrained(static_cast<NM_Set_Time_Constrained*>(msg));
         break ;
 
       case NetworkMessage::PUBLISH_OBJECT_CLASS:
@@ -371,7 +370,7 @@
        
       default:
         // FIXME: Should treat other cases CHANGE_*_ORDER/TRANSPORT_TYPE
-        D.Out(pdError, "processMessageRecu: unknown type %u.", msg->type);
+        D.Out(pdError, "processMessageRecu: unknown type %u.", msg->getType());
         throw RTIinternalError("Unknown Message Type");
     }
     G.Out(pdGendoc,"exit  RTIG::chooseProcessingMethod");
@@ -508,10 +507,9 @@
 on the link. This message only holds the exception.
 */
 Socket*
-RTIG::processIncomingMessage(Socket *link)
+RTIG::processIncomingMessage(Socket *link) throw (NetworkError)
 {
-    NetworkMessage msg ;
-    NetworkMessage rep ; // Server Answer(only if an exception is raised)
+    NetworkMessage* msg ;
 
     char buffer[BUFFER_EXCEPTION_REASON_SIZE] ; // To store the exception 
reason
     G.Out(pdGendoc,"enter RTIG::processIncomingMessage");
@@ -520,13 +518,14 @@
         return NULL ;
     }
 
-    msg.read(link);
+    /* virtual constructor call */
+    msg = NM_Factory::receive(link);
 
-    rep.type = msg.type ;
-    rep.exception = e_NO_EXCEPTION ;
-    rep.federate = msg.federate ;
+    // Server Answer(only if an exception is raised)
+    std::auto_ptr<NetworkMessage> rep(NM_Factory::create(msg->getType()));    
+    rep->federate = msg->federate ;
 
-    auditServer.startLine(msg.federation, msg.federate, msg.type);
+    auditServer.startLine(msg->federation, msg->federate, msg->getType());
 
     // This macro is used to copy any non null exception reason
     // string into our buffer(used for Audit purpose).
@@ -536,332 +535,332 @@
     buffer[0] = 0 ;
 
     try {
-        link = chooseProcessingMethod(link, &msg);
+        link = chooseProcessingMethod(link, msg);
     }
     catch (ArrayIndexOutOfBounds &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ArrayIndexOutOfBounds ;
+        rep->exception = e_ArrayIndexOutOfBounds ;
     }
     catch (AttributeAlreadyOwned &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeAlreadyOwned ;
+        rep->exception = e_AttributeAlreadyOwned ;
     }
     catch (AttributeAlreadyBeingAcquired &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeAlreadyBeingAcquired ;
+        rep->exception = e_AttributeAlreadyBeingAcquired ;
     }
     catch (AttributeAlreadyBeingDivested &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeAlreadyBeingDivested ;
+        rep->exception = e_AttributeAlreadyBeingDivested ;
     }
     catch (AttributeDivestitureWasNotRequested &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeDivestitureWasNotRequested ;
+        rep->exception = e_AttributeDivestitureWasNotRequested ;
     }
     catch (AttributeAcquisitionWasNotRequested &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeAcquisitionWasNotRequested ;
+        rep->exception = e_AttributeAcquisitionWasNotRequested ;
     }
     catch (AttributeNotDefined &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeNotDefined ;
+        rep->exception = e_AttributeNotDefined ;
     }
     catch (AttributeNotKnown &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeNotKnown ;
+        rep->exception = e_AttributeNotKnown ;
     }
     catch (AttributeNotOwned &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeNotOwned ;
+        rep->exception = e_AttributeNotOwned ;
     }
     catch (AttributeNotPublished &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeNotPublished ;
+        rep->exception = e_AttributeNotPublished ;
     }
     catch (AttributeNotSubscribed &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_AttributeNotSubscribed ;
+        rep->exception = e_AttributeNotSubscribed ;
     }
     catch (ConcurrentAccessAttempted &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ConcurrentAccessAttempted ;
+        rep->exception = e_ConcurrentAccessAttempted ;
     }
     catch (CouldNotDiscover &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_CouldNotDiscover ;
+        rep->exception = e_CouldNotDiscover ;
     }
     catch (CouldNotOpenRID &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_CouldNotOpenRID ;
+        rep->exception = e_CouldNotOpenRID ;
     }
     catch (CouldNotOpenFED &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_CouldNotOpenFED ;
+        rep->exception = e_CouldNotOpenFED ;
     }
     catch (CouldNotRestore &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_CouldNotRestore ;
+        rep->exception = e_CouldNotRestore ;
     }
     catch (DeletePrivilegeNotHeld &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_DeletePrivilegeNotHeld ;
+        rep->exception = e_DeletePrivilegeNotHeld ;
     }
     catch (ErrorReadingRID &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ErrorReadingRID ;
+        rep->exception = e_ErrorReadingRID ;
     }
     catch (EventNotKnown &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_EventNotKnown ;
+        rep->exception = e_EventNotKnown ;
     }
     catch (FederateAlreadyPaused &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateAlreadyPaused ;
+        rep->exception = e_FederateAlreadyPaused ;
     }
     catch (FederateAlreadyExecutionMember &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateAlreadyExecutionMember ;
+        rep->exception = e_FederateAlreadyExecutionMember ;
     }
     catch (FederateDoesNotExist &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateDoesNotExist ;
+        rep->exception = e_FederateDoesNotExist ;
     }
     catch (FederateInternalError &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateInternalError ;
+        rep->exception = e_FederateInternalError ;
     }
     catch (FederateNameAlreadyInUse &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateNameAlreadyInUse ;
+        rep->exception = e_FederateNameAlreadyInUse ;
     }
     catch (FederateNotExecutionMember &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateNotExecutionMember ;
+        rep->exception = e_FederateNotExecutionMember ;
     }
     catch (FederateNotPaused &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateNotPaused ;
+        rep->exception = e_FederateNotPaused ;
     }
     catch (FederateNotPublishing &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateNotPublishing ;
+        rep->exception = e_FederateNotPublishing ;
     }
     catch (FederateNotSubscribing &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateNotSubscribing ;
+        rep->exception = e_FederateNotSubscribing ;
     }
     catch (FederateOwnsAttributes &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateOwnsAttributes ;
+        rep->exception = e_FederateOwnsAttributes ;
     }
     catch (FederatesCurrentlyJoined &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederatesCurrentlyJoined ;
+        rep->exception = e_FederatesCurrentlyJoined ;
     }
     catch (FederateWasNotAskedToReleaseAttribute &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederateWasNotAskedToReleaseAttribute ;
+        rep->exception = e_FederateWasNotAskedToReleaseAttribute ;
     }
     catch (FederationAlreadyPaused &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederationAlreadyPaused ;
+        rep->exception = e_FederationAlreadyPaused ;
     }
     catch (FederationExecutionAlreadyExists &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederationExecutionAlreadyExists ;
+        rep->exception = e_FederationExecutionAlreadyExists ;
     }
     catch (FederationExecutionDoesNotExist &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederationExecutionDoesNotExist ;
+        rep->exception = e_FederationExecutionDoesNotExist ;
     }
     catch (FederationNotPaused &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederationNotPaused ;
+        rep->exception = e_FederationNotPaused ;
     }
     catch (FederationTimeAlreadyPassed &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_FederationTimeAlreadyPassed ;
+        rep->exception = e_FederationTimeAlreadyPassed ;
     }
     catch (IDsupplyExhausted &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_IDsupplyExhausted ;
+        rep->exception = e_IDsupplyExhausted ;
     }
     catch (InteractionClassNotDefined &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InteractionClassNotDefined ;
+        rep->exception = e_InteractionClassNotDefined ;
     }
     catch (InteractionClassNotKnown &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InteractionClassNotKnown ;
+        rep->exception = e_InteractionClassNotKnown ;
     }
     catch (InteractionClassNotPublished &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InteractionClassNotPublished ;
+        rep->exception = e_InteractionClassNotPublished ;
     }
     catch (InteractionParameterNotDefined &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InteractionParameterNotDefined ;
+        rep->exception = e_InteractionParameterNotDefined ;
     }
     catch (InteractionParameterNotKnown &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InteractionParameterNotKnown ;
+        rep->exception = e_InteractionParameterNotKnown ;
     }
     catch (InvalidDivestitureCondition &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidDivestitureCondition ;
+        rep->exception = e_InvalidDivestitureCondition ;
     }
     catch (InvalidExtents &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidExtents ;
+        rep->exception = e_InvalidExtents ;
     }
     catch (InvalidFederationTime &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidFederationTime ;
+        rep->exception = e_InvalidFederationTime ;
     }
     catch (InvalidFederationTimeDelta &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidFederationTimeDelta ;
+        rep->exception = e_InvalidFederationTimeDelta ;
     }
     catch (InvalidObjectHandle &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidObjectHandle ;
+        rep->exception = e_InvalidObjectHandle ;
     }
     catch (InvalidOrderType &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidOrderType ;
+        rep->exception = e_InvalidOrderType ;
     }
     catch (InvalidResignAction &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidResignAction ;
+        rep->exception = e_InvalidResignAction ;
     }
     catch (InvalidRetractionHandle &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidRetractionHandle ;
+        rep->exception = e_InvalidRetractionHandle ;
     }
     catch (InvalidRoutingSpace &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidRoutingSpace ;
+        rep->exception = e_InvalidRoutingSpace ;
     }
     catch (InvalidTransportType &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_InvalidTransportType ;
+        rep->exception = e_InvalidTransportType ;
     }
     catch (MemoryExhausted &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_MemoryExhausted ;
+        rep->exception = e_MemoryExhausted ;
     }
     catch (NameNotFound &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_NameNotFound ;
+        rep->exception = e_NameNotFound ;
     }
     catch (NoPauseRequested &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_NoPauseRequested ;
+        rep->exception = e_NoPauseRequested ;
     }
     catch (NoResumeRequested &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_NoResumeRequested ;
+        rep->exception = e_NoResumeRequested ;
     }
     catch (ObjectClassNotDefined &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ObjectClassNotDefined ;
+        rep->exception = e_ObjectClassNotDefined ;
     }
     catch (ObjectClassNotKnown &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ObjectClassNotKnown ;
+        rep->exception = e_ObjectClassNotKnown ;
     }
     catch (ObjectClassNotPublished &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ObjectClassNotPublished ;
+        rep->exception = e_ObjectClassNotPublished ;
     }
     catch (ObjectClassNotSubscribed &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ObjectClassNotSubscribed ;
+        rep->exception = e_ObjectClassNotSubscribed ;
     }
     catch (ObjectNotKnown &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ObjectNotKnown ;
+        rep->exception = e_ObjectNotKnown ;
     }
     catch (ObjectAlreadyRegistered &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ObjectAlreadyRegistered ;
+        rep->exception = e_ObjectAlreadyRegistered ;
     }
     catch (RegionNotKnown &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_RegionNotKnown ;
+        rep->exception = e_RegionNotKnown ;
     }
     catch (RestoreInProgress &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_RestoreInProgress ;
+        rep->exception = e_RestoreInProgress ;
     }
     catch (RestoreNotRequested &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_RestoreNotRequested ;
+        rep->exception = e_RestoreNotRequested ;
     }
     catch (RTIinternalError &e) {
         if (e._reason == NULL)
@@ -869,78 +868,78 @@
         else
             D.Out(pdExcept, "Catching \"%s\" exception: %s.", e._name, 
e._reason);
         CPY_NOT_NULL(e);
-        rep.exception = e_RTIinternalError ;
+        rep->exception = e_RTIinternalError ;
     }
     catch (SaveInProgress &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_SaveInProgress ;
+        rep->exception = e_SaveInProgress ;
     }
     catch (SaveNotInitiated &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_SaveNotInitiated ;
+        rep->exception = e_SaveNotInitiated ;
     }
     catch (SecurityError &e) {
         cout << endl << "Security Error : " << e._reason << endl ;
         CPY_NOT_NULL(e);
-        rep.exception = e_SecurityError ;
+        rep->exception = e_SecurityError ;
     }
     catch (SpaceNotDefined &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_SpaceNotDefined ;
+        rep->exception = e_SpaceNotDefined ;
     }
     catch (SpecifiedSaveLabelDoesNotExist &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_SpecifiedSaveLabelDoesNotExist ;
+        rep->exception = e_SpecifiedSaveLabelDoesNotExist ;
     }
     catch (TimeAdvanceAlreadyInProgress &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_TimeAdvanceAlreadyInProgress ;
+        rep->exception = e_TimeAdvanceAlreadyInProgress ;
     }
     catch (TimeAdvanceWasNotInProgress &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_TimeAdvanceWasNotInProgress ;
+        rep->exception = e_TimeAdvanceWasNotInProgress ;
     }
     catch (TooManyIDsRequested &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_TooManyIDsRequested ;
+        rep->exception = e_TooManyIDsRequested ;
     }
     catch (UnableToPerformSave &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_UnableToPerformSave ;
+        rep->exception = e_UnableToPerformSave ;
     }
     catch (UnimplementedService &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_UnimplementedService ;
+        rep->exception = e_UnimplementedService ;
     }
     catch (UnknownLabel &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_UnknownLabel ;
+        rep->exception = e_UnknownLabel ;
     }
     catch (ValueCountExceeded &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ValueCountExceeded ;
+        rep->exception = e_ValueCountExceeded ;
     }
     catch (ValueLengthExceeded &e) {
         D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_ValueLengthExceeded ;
+        rep->exception = e_ValueLengthExceeded ;
     }
 
     // Non RTI specific exception, Client connection problem(internal)
     catch (NetworkError &e) {
         strcpy(buffer, " - NetworkError");
-        auditServer.endLine(rep.exception, buffer);
+        auditServer.endLine(rep->exception, buffer);
 
         throw e ;
     }
@@ -949,28 +948,29 @@
     catch (Exception &e) {
         D.Out(pdExcept, "Unknown Exception : %s.", e._name);
         CPY_NOT_NULL(e);
-        rep.exception = e_RTIinternalError ;
+        rep->exception = e_RTIinternalError ;
     }
 
     // buffer may contain an exception reason. If not, set it to OK
     // or Exception
     if (strlen(buffer)== 0) {
-        if (rep.exception == e_NO_EXCEPTION)
+        if (rep->exception == e_NO_EXCEPTION)
             strcpy(buffer, " - OK");
         else
             strcpy(buffer, " - Exception");
     }
 
-    auditServer.endLine(rep.exception, buffer);
+    auditServer.endLine(rep->exception, buffer);
 
     if (link == NULL) return link ;
 
-    if (rep.exception != e_NO_EXCEPTION) {
+    /* FIXME ***/
+    if (rep->exception != e_NO_EXCEPTION) {
         G.Out(pdGendoc,"            processIncomingMessage ===> write on 
exception to RTIA");
-        rep.write(link);
+        rep->send(link);
         D.Out(pdExcept,
               "RTIG catched exception %d and sent it back to federate %d.",
-              rep.exception, rep.federate);
+              rep->exception, rep->federate);
     }
     G.Out(pdGendoc,"exit  RTIG::processIncomingMessage");
     return link ;
@@ -991,4 +991,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG.cc,v 3.39 2008/04/08 14:18:17 rousse Exp $
+// $Id: RTIG.cc,v 3.40 2008/04/26 14:59:42 erk Exp $

Index: RTIG/RTIG.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.hh,v
retrieving revision 3.24
retrieving revision 3.25
diff -u -b -r3.24 -r3.25
--- RTIG/RTIG.hh        8 Apr 2008 14:18:18 -0000       3.24
+++ RTIG/RTIG.hh        26 Apr 2008 14:59:42 -0000      3.25
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIG.hh,v 3.24 2008/04/08 14:18:18 rousse Exp $
+// $Id: RTIG.hh,v 3.25 2008/04/26 14:59:42 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef CERTI_RTIG_HH
@@ -26,6 +26,7 @@
 
 #include "certi.hh"
 #include "NetworkMessage.hh"
+#include "NM_Classes.hh"
 #include "SecureTCPSocket.hh"
 #include "SocketServer.hh"
 #include "FederationsList.hh"
@@ -60,7 +61,7 @@
 private:
     // Both methods return the socket, because it may have been closed
     // & deleted.
-    Socket* processIncomingMessage(Socket*);
+  Socket* processIncomingMessage(Socket*) throw (NetworkError) ;
     Socket* chooseProcessingMethod(Socket*, NetworkMessage *);
 
     void openConnection();
@@ -71,8 +72,8 @@
     void processJoinFederation(Socket*, NetworkMessage*);
     void processResignFederation(Socket*,Handle, FederateHandle);
     void processDestroyFederation(Socket*, NetworkMessage*);
-    void processSetTimeRegulating(NetworkMessage *msg);
-    void processSetTimeConstrained(NetworkMessage *msg);
+    void processSetTimeRegulating(NM_Set_Time_Regulating *msg);
+    void processSetTimeConstrained(NM_Set_Time_Constrained *msg);
     void processMessageNull(NetworkMessage*);
     void processRegisterSynchronization(Socket*, NetworkMessage*);
     void processSynchronizationAchieved(Socket*, NetworkMessage*);
@@ -131,4 +132,4 @@
 
 #endif // CERTI_RTIG_HH
 
-// $Id: RTIG.hh,v 3.24 2008/04/08 14:18:18 rousse Exp $
+// $Id: RTIG.hh,v 3.25 2008/04/26 14:59:42 erk Exp $

Index: test/utility/CertiUtilTests.cc
===================================================================
RCS file: /sources/certi/certi/test/utility/CertiUtilTests.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- test/utility/CertiUtilTests.cc      3 Mar 2008 15:15:09 -0000       1.8
+++ test/utility/CertiUtilTests.cc      26 Apr 2008 14:59:42 -0000      1.9
@@ -64,6 +64,8 @@
        int64_t  i64  = -1000000000;
        float    f32  = 3.1415927;
        double   d64  = 2.7182818;
+       bool     trueBool  = true;
+       bool     falseBool = false;
        char*    vstr = NULL;
        std::string  vstdstr;
        uint8_t  vu8   = 0;
@@ -76,6 +78,8 @@
        int64_t  vi64  = 0;
        float    vf32  = 0.0;
        double   vd64  = 0.0;   
+       bool     vtrueBool  = false;
+       bool     vfalseBool = true;             
        cout << "Testing MessageBuffer class BEGIN..."<<endl;
        cout << "    Current (Default) MessageBuffer MaxSize               = 
"<< MsgBuf.maxSize() <<endl;
        cout << "    Current (initially void) MessageBuffer size = "<< 
MsgBuf.size()<<endl;
@@ -93,6 +97,8 @@
        MsgBuf.write_int64(i64);
        MsgBuf.write_float(f32);
        MsgBuf.write_double(d64);
+       MsgBuf.write_bool(trueBool);
+       MsgBuf.write_bool(falseBool);
        cout << "    std::string = " << stdstr << endl;
        MsgBuf.write_string(stdstr);
        cout << "    Current MessageBuffer size                  = "<< 
MsgBuf.size()<<endl;
@@ -112,6 +118,8 @@
        MsgBuf.read_int64(&vi64); assert(vi64==i64);
        MsgBuf.read_float(&vf32); assert(vf32==f32);
        MsgBuf.read_double(&vd64); assert(vd64==d64);   
+       vtrueBool = MsgBuf.read_bool(); assert(trueBool==vtrueBool);
+       vfalseBool = MsgBuf.read_bool(); assert(falseBool==vfalseBool);
        vstdstr  = MsgBuf.read_string(); assert(vstdstr==stdstr);
        cout << "    std::string = " << vstdstr << endl;
        cout << "    All encoded/decoded values are equal." << endl;

Index: libCERTI/NM_Classes.hh
===================================================================
RCS file: libCERTI/NM_Classes.hh
diff -N libCERTI/NM_Classes.hh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ libCERTI/NM_Classes.hh      26 Apr 2008 14:59:40 -0000      3.1
@@ -0,0 +1,1394 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2002-2008  ONERA
+//
+// This program is free software ; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation ; either version 2 of
+// the License, or (at your option) Any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY ; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program ; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA
+//
+// ----------------------------------------------------------------------------
+
+#ifndef CERTI_NM_CLASSES_HH
+#define CERTI_NM_CLASSES_HH
+#include "NetworkMessage.hh"
+#include <vector>
+
+namespace certi {
+/**
+ * Network Message factory
+ */
+class CERTI_EXPORT NM_Factory {
+public:
+       static NetworkMessage* create(NetworkMessage::Message_T type) throw 
(RTIinternalError);
+       static NetworkMessage* receive(Socket* socket) throw 
(NetworkError,RTIinternalError);
+};
+
+class CERTI_EXPORT NM_WithHandleArray : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_WithHandleArray();
+       virtual ~NM_WithHandleArray();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);     
+       /* specific Getter/Setter */    
+       AttributeHandle getHandle(int i) {return handleArray[i];};
+       void setHandle(AttributeHandle h, int i) {handleArray[i]=h;};
+protected:
+       /* specific field */
+private:
+};
+
+class CERTI_EXPORT NM_DDM_Base : public NM_WithHandleArray {
+public:
+       typedef NM_WithHandleArray Super;
+       NM_DDM_Base();
+       virtual ~NM_DDM_Base();
+       virtual void serialize(MessageBuffer& msgBuffer)   = 0;
+       virtual void deserialize(MessageBuffer& msgBuffer) = 0; 
+       /* specific Getter/Setter */    
+       const SpaceHandle getSpace() const {return space;};
+       void setSpace(SpaceHandle space) {this->space=space;};
+
+       const int32_t geNbExtents() const {return nbExtents;};
+       void setNbExtents(int32_t nbExtents) {this->nbExtents=nbExtents;};
+
+       const int32_t getRegion() const {return region;};
+       void setRegion(int32_t region) {this->region=region;};  
+
+       const ObjectHandle getObject() const {return object;};
+       void setObject(ObjectHandle object) {this->object=object;};
+
+       const ObjectClassHandle getObjectClass() const {return objectClass;};
+       void setObjectClass(ObjectClassHandle objectClass) 
{this->objectClass=objectClass;};
+
+       const InteractionClassHandle getInteractionClass() const {return 
interactionClass;};
+       void setInteractionClass(InteractionClassHandle interactionClass) 
{this->interactionClass=interactionClass;};
+protected:
+       /* specific field */
+private:
+};
+
+
+/*<BEGIN>---------- Not_Used ------------<BEGIN>*/
+class CERTI_EXPORT NM_Not_Used : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Not_Used();
+       virtual ~NM_Not_Used();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Not_Used ------------<END>*/
+
+/*<BEGIN>---------- Close_Connexion ------------<BEGIN>*/
+class CERTI_EXPORT NM_Close_Connexion : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Close_Connexion();
+       virtual ~NM_Close_Connexion();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Close_Connexion ------------<END>*/
+
+/*<BEGIN>---------- Message_Null ------------<BEGIN>*/
+class CERTI_EXPORT NM_Message_Null : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Message_Null();
+       virtual ~NM_Message_Null();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Message_Null ------------<END>*/
+
+/*<BEGIN>---------- Create_Federation_Execution ------------<BEGIN>*/
+class CERTI_EXPORT NM_Create_Federation_Execution : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Create_Federation_Execution();
+       virtual ~NM_Create_Federation_Execution();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */      
+       //      std::string federationName ;
+       //      std::string FEDid ;
+private:
+};
+
+/*<END>---------- Create_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Destroy_Federation_Execution ------------<BEGIN>*/
+class CERTI_EXPORT NM_Destroy_Federation_Execution : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Destroy_Federation_Execution();
+       virtual ~NM_Destroy_Federation_Execution();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */     
+       //      std::string federationName;
+private:
+};
+
+/*<END>---------- Destroy_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Join_Federation_Execution ------------<BEGIN>*/
+class CERTI_EXPORT NM_Join_Federation_Execution : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Join_Federation_Execution();
+       virtual ~NM_Join_Federation_Execution();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //      int32_t  numberOfRegulators;
+       //      uint32_t multicastAddress;
+       //      uint32_t bestEffortAddress;
+       //      uint32_t bestEffortPeer;
+       //      std::string federationName;
+       //      std::string federateName;
+private:
+};
+
+/*<END>---------- Join_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Resign_Federation_Execution ------------<BEGIN>*/
+class CERTI_EXPORT NM_Resign_Federation_Execution : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Resign_Federation_Execution();
+       virtual ~NM_Resign_Federation_Execution();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Resign_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Set_Time_Regulating ------------<BEGIN>*/
+class CERTI_EXPORT NM_Set_Time_Regulating : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Set_Time_Regulating();
+       virtual ~NM_Set_Time_Regulating();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       void regulatorOn() {regulator=true;};
+       void regulatorOff() {regulator=false;}; 
+       bool isRegulator() {return regulator;};
+protected:
+       /* specific field */
+       /**
+        * Toggle which indicates if federate
+        * wants to become regulator or leave
+        * its regulator state
+        */
+       bool regulator ;
+private:
+};
+
+/*<END>---------- Set_Time_Regulating ------------<END>*/
+
+/*<BEGIN>---------- Set_Time_Constrained ------------<BEGIN>*/
+class CERTI_EXPORT NM_Set_Time_Constrained : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Set_Time_Constrained();
+       virtual ~NM_Set_Time_Constrained();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       void constrainedOn() {constrained=true;};
+       void constrainedOff() {constrained=false;};             
+       bool isConstrained() {return constrained;};
+protected:
+       /* specific field */    
+       /**
+        * Toggle which indicates if federate
+        * wants to become constrained or leave
+        * its constrained state
+        */
+       bool constrained;
+private:
+};
+
+/*<END>---------- Set_Time_Constrained ------------<END>*/
+
+/*<BEGIN>---------- Register_Federation_Synchronization_Point 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Register_Federation_Synchronization_Point : public 
NM_WithHandleArray {
+public:
+       typedef NM_WithHandleArray Super;
+       NM_Register_Federation_Synchronization_Point();
+       virtual ~NM_Register_Federation_Synchronization_Point();        
+       /* specific Getter/Setter */
+protected:
+       /* specific field */      
+private:
+};
+
+/*<END>---------- Register_Federation_Synchronization_Point ------------<END>*/
+
+/*<BEGIN>---------- Synchronization_Point_Registration_Succeeded 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Synchronization_Point_Registration_Succeeded : public 
NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Synchronization_Point_Registration_Succeeded();
+       virtual ~NM_Synchronization_Point_Registration_Succeeded();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */     
+
+private:
+};
+
+/*<END>---------- Synchronization_Point_Registration_Succeeded 
------------<END>*/
+
+/*<BEGIN>---------- Announce_Synchronization_Point ------------<BEGIN>*/
+class CERTI_EXPORT NM_Announce_Synchronization_Point : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Announce_Synchronization_Point();
+       virtual ~NM_Announce_Synchronization_Point();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */      
+private:
+};
+
+/*<END>---------- Announce_Synchronization_Point ------------<END>*/
+
+/*<BEGIN>---------- Synchronization_Point_Achieved ------------<BEGIN>*/
+class CERTI_EXPORT NM_Synchronization_Point_Achieved : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Synchronization_Point_Achieved();
+       virtual ~NM_Synchronization_Point_Achieved();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */      
+private:
+};
+
+/*<END>---------- Synchronization_Point_Achieved ------------<END>*/
+
+/*<BEGIN>---------- Federation_Synchronized ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federation_Synchronized : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federation_Synchronized();
+       virtual ~NM_Federation_Synchronized();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */     
+private:
+};
+
+/*<END>---------- Federation_Synchronized ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Save ------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Federation_Save : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Request_Federation_Save();
+       virtual ~NM_Request_Federation_Save();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Request_Federation_Save ------------<END>*/
+
+/*<BEGIN>---------- Federate_Save_Begun ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federate_Save_Begun : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federate_Save_Begun();
+       virtual ~NM_Federate_Save_Begun();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+
+private:
+};
+
+/*<END>---------- Federate_Save_Begun ------------<END>*/
+
+/*<BEGIN>---------- Federate_Save_Complete ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federate_Save_Complete : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federate_Save_Complete();
+       virtual ~NM_Federate_Save_Complete();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federate_Save_Complete ------------<END>*/
+
+/*<BEGIN>---------- Federate_Save_Not_Complete ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federate_Save_Not_Complete : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federate_Save_Not_Complete();
+       virtual ~NM_Federate_Save_Not_Complete();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federate_Save_Not_Complete ------------<END>*/
+
+/*<BEGIN>---------- Initiate_Federate_Save ------------<BEGIN>*/
+class CERTI_EXPORT NM_Initiate_Federate_Save : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Initiate_Federate_Save();
+       virtual ~NM_Initiate_Federate_Save();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Initiate_Federate_Save ------------<END>*/
+
+/*<BEGIN>---------- Federation_Saved ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federation_Saved : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federation_Saved();
+       virtual ~NM_Federation_Saved();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federation_Saved ------------<END>*/
+
+/*<BEGIN>---------- Federation_Not_Saved ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federation_Not_Saved : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federation_Not_Saved();
+       virtual ~NM_Federation_Not_Saved();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federation_Not_Saved ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Restore ------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Federation_Restore : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Request_Federation_Restore();
+       virtual ~NM_Request_Federation_Restore();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+
+private:
+};
+
+/*<END>---------- Request_Federation_Restore ------------<END>*/
+
+/*<BEGIN>---------- Federate_Restore_Complete ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federate_Restore_Complete : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federate_Restore_Complete();
+       virtual ~NM_Federate_Restore_Complete();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federate_Restore_Complete ------------<END>*/
+
+/*<BEGIN>---------- Federate_Restore_Not_Complete ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federate_Restore_Not_Complete : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federate_Restore_Not_Complete();
+       virtual ~NM_Federate_Restore_Not_Complete();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federate_Restore_Not_Complete ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Restore_Succeeded ------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Federation_Restore_Succeeded : public 
NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Request_Federation_Restore_Succeeded();
+       virtual ~NM_Request_Federation_Restore_Succeeded();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Request_Federation_Restore_Succeeded ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Restore_Failed ------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Federation_Restore_Failed : public 
NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Request_Federation_Restore_Failed();
+       virtual ~NM_Request_Federation_Restore_Failed();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Request_Federation_Restore_Failed ------------<END>*/
+
+/*<BEGIN>---------- Federation_Restore_Begun ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federation_Restore_Begun : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federation_Restore_Begun();
+       virtual ~NM_Federation_Restore_Begun();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federation_Restore_Begun ------------<END>*/
+
+/*<BEGIN>---------- Initiate_Federate_Restore ------------<BEGIN>*/
+class CERTI_EXPORT NM_Initiate_Federate_Restore : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Initiate_Federate_Restore();
+       virtual ~NM_Initiate_Federate_Restore();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Initiate_Federate_Restore ------------<END>*/
+
+/*<BEGIN>---------- Federation_Restored ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federation_Restored : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federation_Restored();
+       virtual ~NM_Federation_Restored();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federation_Restored ------------<END>*/
+
+/*<BEGIN>---------- Federation_Not_Restored ------------<BEGIN>*/
+class CERTI_EXPORT NM_Federation_Not_Restored : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Federation_Not_Restored();
+       virtual ~NM_Federation_Not_Restored();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Federation_Not_Restored ------------<END>*/
+
+/*<BEGIN>---------- Publish_Object_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Publish_Object_Class : public NM_WithHandleArray {
+public:
+       typedef NM_WithHandleArray Super;
+       NM_Publish_Object_Class();
+       virtual ~NM_Publish_Object_Class();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //ObjectClassHandle objectClass;
+private:
+};
+
+/*<END>---------- Publish_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Unpublish_Object_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Unpublish_Object_Class : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Unpublish_Object_Class();
+       virtual ~NM_Unpublish_Object_Class();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //      ObjectClassHandle objectClass;
+private:
+};
+
+/*<END>---------- Unpublish_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Publish_Interaction_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Publish_Interaction_Class : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Publish_Interaction_Class();
+       virtual ~NM_Publish_Interaction_Class();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       const InteractionClassHandle getInteractionClassHandle() const {return 
interactionClass;};
+       void setInteractionClassHandle(InteractionClassHandle interactionClass) 
{this->interactionClass=interactionClass;};
+protected:
+       /* specific field */
+       //      InteractionClassHandle interactionClass;
+private:
+};
+
+/*<END>---------- Publish_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Unpublish_Interaction_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Unpublish_Interaction_Class : public 
NM_Publish_Interaction_Class {
+public:
+       typedef NM_Publish_Interaction_Class Super;
+       NM_Unpublish_Interaction_Class();
+       virtual ~NM_Unpublish_Interaction_Class();      
+       /* specific Getter/Setter */
+protected:
+       /* specific field */    
+private:
+};
+
+/*<END>---------- Unpublish_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Subscribe_Object_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Subscribe_Object_Class : public NM_WithHandleArray {
+public:
+       typedef NM_WithHandleArray Super;
+       NM_Subscribe_Object_Class();
+       virtual ~NM_Subscribe_Object_Class();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //ObjectClassHandle objectClass;
+private:
+};
+
+/*<END>---------- Subscribe_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Unsubscribe_Object_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Unsubscribe_Object_Class : public 
NM_Unpublish_Object_Class {
+public:
+       typedef NM_Unpublish_Object_Class Super;
+       NM_Unsubscribe_Object_Class();
+       virtual ~NM_Unsubscribe_Object_Class();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */    
+private:
+};
+
+/*<END>---------- Unsubscribe_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Subscribe_Interaction_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Subscribe_Interaction_Class : public 
NM_Publish_Interaction_Class {
+public:
+       typedef NM_Publish_Interaction_Class Super;
+       NM_Subscribe_Interaction_Class();
+       virtual ~NM_Subscribe_Interaction_Class();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Subscribe_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Unsubscribe_Interaction_Class ------------<BEGIN>*/
+class CERTI_EXPORT NM_Unsubscribe_Interaction_Class : public 
NM_Publish_Interaction_Class {
+public:
+       typedef NM_Publish_Interaction_Class Super;
+       NM_Unsubscribe_Interaction_Class();
+       virtual ~NM_Unsubscribe_Interaction_Class();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Unsubscribe_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Turn_Interactions_On ------------<BEGIN>*/
+class CERTI_EXPORT NM_Turn_Interactions_On : public 
NM_Publish_Interaction_Class {
+public:
+       typedef NM_Publish_Interaction_Class Super;
+       NM_Turn_Interactions_On();
+       virtual ~NM_Turn_Interactions_On();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Turn_Interactions_On ------------<END>*/
+
+/*<BEGIN>---------- Turn_Interactions_Off ------------<BEGIN>*/
+class CERTI_EXPORT NM_Turn_Interactions_Off : public 
NM_Publish_Interaction_Class {
+public:
+       typedef NM_Publish_Interaction_Class Super;
+       NM_Turn_Interactions_Off();
+       virtual ~NM_Turn_Interactions_Off();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Turn_Interactions_Off ------------<END>*/
+
+/*<BEGIN>---------- Register_Object ------------<BEGIN>*/
+class CERTI_EXPORT NM_Register_Object : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Register_Object();
+       virtual ~NM_Register_Object();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //      ObjectHandle object;
+private:
+};
+
+/*<END>---------- Register_Object ------------<END>*/
+
+/*<BEGIN>---------- Discover_Object ------------<BEGIN>*/
+class CERTI_EXPORT NM_Discover_Object : public NM_Register_Object {
+public:
+       typedef NM_Register_Object Super;
+       NM_Discover_Object();
+       virtual ~NM_Discover_Object();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Discover_Object ------------<END>*/
+
+/*<BEGIN>---------- Update_Attribute_Values ------------<BEGIN>*/
+class CERTI_EXPORT NM_Update_Attribute_Values : public NM_WithHandleArray {
+public:
+       typedef NM_WithHandleArray Super;
+       NM_Update_Attribute_Values();
+       virtual ~NM_Update_Attribute_Values();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //      ObjectClassHandle objectClass;  
+       //      ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS];
+private:
+};
+
+/*<END>---------- Update_Attribute_Values ------------<END>*/
+
+/*<BEGIN>---------- Reflect_Attribute_Values ------------<BEGIN>*/
+class CERTI_EXPORT NM_Reflect_Attribute_Values : public 
NM_Update_Attribute_Values {
+public:
+       typedef NM_Update_Attribute_Values Super;
+       NM_Reflect_Attribute_Values();
+       virtual ~NM_Reflect_Attribute_Values();       
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Reflect_Attribute_Values ------------<END>*/
+
+/*<BEGIN>---------- Send_Interaction ------------<BEGIN>*/
+class CERTI_EXPORT NM_Send_Interaction : public NM_WithHandleArray {
+public:
+       typedef NM_WithHandleArray Super;
+       NM_Send_Interaction();
+       virtual ~NM_Send_Interaction();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //      InteractionClassHandle interactionClass;        
+       //      ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS];
+private:
+};
+
+/*<END>---------- Send_Interaction ------------<END>*/
+
+/*<BEGIN>---------- Receive_Interaction ------------<BEGIN>*/
+class CERTI_EXPORT NM_Receive_Interaction : public NM_Send_Interaction {
+public:
+       typedef NM_Send_Interaction Super;
+       NM_Receive_Interaction();
+       virtual ~NM_Receive_Interaction();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Receive_Interaction ------------<END>*/
+
+/*<BEGIN>---------- Delete_Object ------------<BEGIN>*/
+class CERTI_EXPORT NM_Delete_Object : public NM_Register_Object {
+public:
+       typedef NM_Register_Object Super;
+       NM_Delete_Object();
+       virtual ~NM_Delete_Object();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+
+private:
+};
+
+/*<END>---------- Delete_Object ------------<END>*/
+
+/*<BEGIN>---------- Remove_Object ------------<BEGIN>*/
+class CERTI_EXPORT NM_Remove_Object : public NM_Delete_Object {
+public:
+       typedef NM_Delete_Object Super;
+       NM_Remove_Object();
+       virtual ~NM_Remove_Object();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Remove_Object ------------<END>*/
+
+/*<BEGIN>---------- Change_Attribute_Transport_Type ------------<BEGIN>*/
+class CERTI_EXPORT NM_Change_Attribute_Transport_Type : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Change_Attribute_Transport_Type();
+       virtual ~NM_Change_Attribute_Transport_Type();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Change_Attribute_Transport_Type ------------<END>*/
+
+/*<BEGIN>---------- Change_Attribute_Order_Type ------------<BEGIN>*/
+class CERTI_EXPORT NM_Change_Attribute_Order_Type : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Change_Attribute_Order_Type();
+       virtual ~NM_Change_Attribute_Order_Type();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Change_Attribute_Order_Type ------------<END>*/
+
+/*<BEGIN>---------- Change_Interaction_Transport_Type ------------<BEGIN>*/
+class CERTI_EXPORT NM_Change_Interaction_Transport_Type : public 
NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Change_Interaction_Transport_Type();
+       virtual ~NM_Change_Interaction_Transport_Type();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Change_Interaction_Transport_Type ------------<END>*/
+
+/*<BEGIN>---------- Change_Interaction_Order_Type ------------<BEGIN>*/
+class CERTI_EXPORT NM_Change_Interaction_Order_Type : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Change_Interaction_Order_Type();
+       virtual ~NM_Change_Interaction_Order_Type();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Change_Interaction_Order_Type ------------<END>*/
+
+/*<BEGIN>---------- Request_Class_Attribute_Value_Update ------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Class_Attribute_Value_Update : public 
NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Request_Class_Attribute_Value_Update();
+       virtual ~NM_Request_Class_Attribute_Value_Update();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Request_Class_Attribute_Value_Update ------------<END>*/
+
+/*<BEGIN>---------- Request_Object_Attribute_Value_Update ------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Object_Attribute_Value_Update : public 
NM_WithHandleArray {
+public:
+       typedef NM_WithHandleArray Super;
+       NM_Request_Object_Attribute_Value_Update();
+       virtual ~NM_Request_Object_Attribute_Value_Update();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       const ObjectHandle getObject() const {return object;};
+       void setObject(ObjectHandle object) {this->object=object;};
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Request_Object_Attribute_Value_Update ------------<END>*/
+
+/*<BEGIN>---------- Is_Attribute_Owned_By_Federate ------------<BEGIN>*/
+class CERTI_EXPORT NM_Is_Attribute_Owned_By_Federate : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Is_Attribute_Owned_By_Federate();
+       virtual ~NM_Is_Attribute_Owned_By_Federate();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+       //      ObjectHandle    object;
+       //      AttributeHandle attribute;
+private:
+};
+
+/*<END>---------- Is_Attribute_Owned_By_Federate ------------<END>*/
+
+/*<BEGIN>---------- Query_Attribute_Ownership ------------<BEGIN>*/
+class CERTI_EXPORT NM_Query_Attribute_Ownership : public 
NM_Is_Attribute_Owned_By_Federate {
+public:
+       typedef NM_Is_Attribute_Owned_By_Federate Super;
+       NM_Query_Attribute_Ownership();
+       virtual ~NM_Query_Attribute_Ownership();      
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Query_Attribute_Ownership ------------<END>*/
+
+/*<BEGIN>---------- Attribute_Is_Not_Owned ------------<BEGIN>*/
+class CERTI_EXPORT NM_Attribute_Is_Not_Owned : public 
NM_Is_Attribute_Owned_By_Federate {
+public:
+       typedef NM_Is_Attribute_Owned_By_Federate Super;
+       NM_Attribute_Is_Not_Owned();
+       virtual ~NM_Attribute_Is_Not_Owned();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Attribute_Is_Not_Owned ------------<END>*/
+
+/*<BEGIN>---------- Inform_Attribute_Ownership ------------<BEGIN>*/
+class CERTI_EXPORT NM_Inform_Attribute_Ownership : public 
NM_Is_Attribute_Owned_By_Federate {
+public:
+       typedef NM_Is_Attribute_Owned_By_Federate Super;
+       NM_Inform_Attribute_Ownership();
+       virtual ~NM_Inform_Attribute_Ownership();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Inform_Attribute_Ownership ------------<END>*/
+
+/*<BEGIN>---------- Negotiated_Attribute_Ownership_Divestiture 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Negotiated_Attribute_Ownership_Divestiture : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Negotiated_Attribute_Ownership_Divestiture();
+       virtual ~NM_Negotiated_Attribute_Ownership_Divestiture();
+       /* specific Getter/Setter */    
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Negotiated_Attribute_Ownership_Divestiture 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Acquisition_Notification 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Attribute_Ownership_Acquisition_Notification : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Attribute_Ownership_Acquisition_Notification();
+       virtual ~NM_Attribute_Ownership_Acquisition_Notification();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Attribute_Ownership_Acquisition_Notification 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Divestiture_Notification 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Attribute_Ownership_Divestiture_Notification : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Attribute_Ownership_Divestiture_Notification();
+       virtual ~NM_Attribute_Ownership_Divestiture_Notification();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Attribute_Ownership_Divestiture_Notification 
------------<END>*/
+
+/*<BEGIN>---------- Request_Attribute_Ownership_Assumption 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Attribute_Ownership_Assumption : public 
NM_Negotiated_Attribute_Ownership_Divestiture {
+public:
+       typedef NM_Negotiated_Attribute_Ownership_Divestiture Super;
+       NM_Request_Attribute_Ownership_Assumption();
+       virtual ~NM_Request_Attribute_Ownership_Assumption();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Request_Attribute_Ownership_Assumption ------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Unavailable ------------<BEGIN>*/
+class CERTI_EXPORT NM_Attribute_Ownership_Unavailable : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Attribute_Ownership_Unavailable();
+       virtual ~NM_Attribute_Ownership_Unavailable();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Attribute_Ownership_Unavailable ------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Acquisition_If_Available 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Attribute_Ownership_Acquisition_If_Available : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Attribute_Ownership_Acquisition_If_Available();
+       virtual ~NM_Attribute_Ownership_Acquisition_If_Available();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Attribute_Ownership_Acquisition_If_Available 
------------<END>*/
+
+/*<BEGIN>---------- Unconditional_Attribute_Ownership_Divestiture 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Unconditional_Attribute_Ownership_Divestiture : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Unconditional_Attribute_Ownership_Divestiture();
+       virtual ~NM_Unconditional_Attribute_Ownership_Divestiture();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Unconditional_Attribute_Ownership_Divestiture 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Acquisition ------------<BEGIN>*/
+class CERTI_EXPORT NM_Attribute_Ownership_Acquisition : public 
NM_Negotiated_Attribute_Ownership_Divestiture {
+public:
+       typedef NM_Negotiated_Attribute_Ownership_Divestiture Super;
+       NM_Attribute_Ownership_Acquisition();
+       virtual ~NM_Attribute_Ownership_Acquisition();  
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Attribute_Ownership_Acquisition ------------<END>*/
+
+/*<BEGIN>---------- Request_Attribute_Ownership_Release ------------<BEGIN>*/
+class CERTI_EXPORT NM_Request_Attribute_Ownership_Release : public 
NM_Negotiated_Attribute_Ownership_Divestiture {
+public:
+       typedef NM_Negotiated_Attribute_Ownership_Divestiture Super;
+       NM_Request_Attribute_Ownership_Release();
+       virtual ~NM_Request_Attribute_Ownership_Release();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Request_Attribute_Ownership_Release ------------<END>*/
+
+/*<BEGIN>---------- Cancel_Negotiated_Attribute_Ownership_Divestiture 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Cancel_Negotiated_Attribute_Ownership_Divestiture : 
public NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Cancel_Negotiated_Attribute_Ownership_Divestiture();
+       virtual ~NM_Cancel_Negotiated_Attribute_Ownership_Divestiture();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Cancel_Negotiated_Attribute_Ownership_Divestiture 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Release_Response ------------<BEGIN>*/
+class CERTI_EXPORT NM_Attribute_Ownership_Release_Response : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Attribute_Ownership_Release_Response();
+       virtual ~NM_Attribute_Ownership_Release_Response();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Attribute_Ownership_Release_Response ------------<END>*/
+
+/*<BEGIN>---------- Cancel_Attribute_Ownership_Acquisition 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Cancel_Attribute_Ownership_Acquisition : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Cancel_Attribute_Ownership_Acquisition();
+       virtual ~NM_Cancel_Attribute_Ownership_Acquisition();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Cancel_Attribute_Ownership_Acquisition ------------<END>*/
+
+/*<BEGIN>---------- Confirm_Attribute_Ownership_Acquisition_Cancellation 
------------<BEGIN>*/
+class CERTI_EXPORT NM_Confirm_Attribute_Ownership_Acquisition_Cancellation : 
public NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Confirm_Attribute_Ownership_Acquisition_Cancellation();
+       virtual ~NM_Confirm_Attribute_Ownership_Acquisition_Cancellation();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Confirm_Attribute_Ownership_Acquisition_Cancellation 
------------<END>*/
+
+/*<BEGIN>---------- DDM_Create_Region ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Create_Region : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Create_Region();
+       virtual ~NM_DDM_Create_Region();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       const SpaceHandle getSpace() const {return space;};
+       void setSpace(SpaceHandle space) {this->space=space;};  
+       const int32_t getRegion() const {return region;};
+       void setRegion(SpaceHandle region) {this->region=region;};
+protected:
+       /* specific field */
+       //      SpaceHandle space;
+       //      int32_t nbExtents;
+       //      int32_t region;
+private:
+};
+
+/*<END>---------- DDM_Create_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Modify_Region ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Modify_Region : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Modify_Region();
+       virtual ~NM_DDM_Modify_Region();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       const int32_t getRegion() const {return region;};
+       void setRegion(SpaceHandle region) {this->region=region;};
+protected:
+       /* specific field */
+       //      int32_t region;
+private:
+};
+
+/*<END>---------- DDM_Modify_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Delete_Region ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Delete_Region : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Delete_Region();
+       virtual ~NM_DDM_Delete_Region();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       const int32_t getRegion() const {return region;};
+       void setRegion(SpaceHandle region) {this->region=region;};
+protected:
+       /* specific field */
+       //      int32_t region; 
+private:
+};
+
+/*<END>---------- DDM_Delete_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Associate_Region ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Associate_Region : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Associate_Region();
+       virtual ~NM_DDM_Associate_Region();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       const int32_t getRegion() const {return region;};
+       void setRegion(SpaceHandle region) {this->region=region;};
+       const ObjectHandle getObject() const {return object;};
+       void setObject(ObjectHandle object) {this->object=object;};             
+protected:
+       /* specific field */
+       //      int32_t      region;
+       //      ObjectHandle object;
+private:
+};
+
+/*<END>---------- DDM_Associate_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Register_Object ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Register_Object : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Register_Object();
+       virtual ~NM_DDM_Register_Object();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- DDM_Register_Object ------------<END>*/
+
+/*<BEGIN>---------- DDM_Unassociate_Region ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Unassociate_Region : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Unassociate_Region();
+       virtual ~NM_DDM_Unassociate_Region();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- DDM_Unassociate_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Subscribe_Attributes ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Subscribe_Attributes : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Subscribe_Attributes();
+       virtual ~NM_DDM_Subscribe_Attributes();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- DDM_Subscribe_Attributes ------------<END>*/
+
+/*<BEGIN>---------- DDM_Unsubscribe_Attributes ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Unsubscribe_Attributes : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Unsubscribe_Attributes();
+       virtual ~NM_DDM_Unsubscribe_Attributes();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- DDM_Unsubscribe_Attributes ------------<END>*/
+
+/*<BEGIN>---------- DDM_Subscribe_Interaction ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Subscribe_Interaction : public NM_DDM_Base {
+public:
+       typedef NM_DDM_Base Super;
+       NM_DDM_Subscribe_Interaction();
+       virtual ~NM_DDM_Subscribe_Interaction();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- DDM_Subscribe_Interaction ------------<END>*/
+
+/*<BEGIN>---------- DDM_Unsubscribe_Interaction ------------<BEGIN>*/
+class CERTI_EXPORT NM_DDM_Unsubscribe_Interaction : public 
NM_DDM_Subscribe_Interaction {
+public:
+       typedef NM_DDM_Subscribe_Interaction Super;
+       NM_DDM_Unsubscribe_Interaction();
+       virtual ~NM_DDM_Unsubscribe_Interaction();      
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- DDM_Unsubscribe_Interaction ------------<END>*/
+
+/*<BEGIN>---------- Provide_Attribute_Value_Update ------------<BEGIN>*/
+class CERTI_EXPORT NM_Provide_Attribute_Value_Update : public 
NM_Request_Object_Attribute_Value_Update {
+public:
+       typedef NM_Request_Object_Attribute_Value_Update Super;
+       NM_Provide_Attribute_Value_Update();
+       virtual ~NM_Provide_Attribute_Value_Update();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Provide_Attribute_Value_Update ------------<END>*/
+
+/*<BEGIN>---------- Get_Fed_File ------------<BEGIN>*/
+class CERTI_EXPORT NM_Get_FED_File : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Get_FED_File();
+       virtual ~NM_Get_FED_File();
+       virtual void serialize(MessageBuffer& msgBuffer);
+       virtual void deserialize(MessageBuffer& msgBuffer);
+       /* specific Getter/Setter */
+       void setFEDid(std::string FEDid) {this->FEDid=FEDid;};
+       const std::string getFEDid() const {return FEDid;};
+       //      void setLineFollows() {lineFollows=true;};
+       //      void unsetLineFollows() {lineFollows=true;};
+       //const bool getLineFollows() {return lineFollows;};
+       void setFEDLine(std::string line) {this->line=line;};
+       std::string getFEDLine() {return line;};
+protected:
+       /* specific field */
+       //      std::string FEDid;
+       //      bool lineFollows;
+       std::string line;
+private:
+};
+
+/*<END>---------- Get_Fed_File ------------<END>*/
+
+/*<BEGIN>---------- Last ------------<BEGIN>*/
+class CERTI_EXPORT NM_Last : public NetworkMessage {
+public:
+       typedef NetworkMessage Super;
+       NM_Last();
+       virtual ~NM_Last();
+       /* specific Getter/Setter */
+protected:
+       /* specific field */
+private:
+};
+
+/*<END>---------- Last ------------<END>*/
+
+} /* end of namespace certi */
+
+#endif

Index: libCERTI/NM_Classes.cc
===================================================================
RCS file: libCERTI/NM_Classes.cc
diff -N libCERTI/NM_Classes.cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ libCERTI/NM_Classes.cc      26 Apr 2008 14:59:41 -0000      3.1
@@ -0,0 +1,1653 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2002-2005  ONERA
+//
+// This program is free software ; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation ; either version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY ; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program ; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// ----------------------------------------------------------------------------
+
+#include "NM_Classes.hh"
+
+namespace certi {
+
+NetworkMessage* NM_Factory::create(NetworkMessage::Message_T type) throw 
(RTIinternalError) {
+       NetworkMessage* msg;
+
+       switch (type) {
+       case NetworkMessage::NOT_USED:
+               throw RTIinternalError("NOT_USED message type should not be 
used!!");
+               msg = new NM_Not_Used(); 
+               break;
+       case NetworkMessage::CLOSE_CONNEXION:
+               msg = new NM_Close_Connexion(); 
+               break;
+       case NetworkMessage::MESSAGE_NULL:
+               msg = new NM_Message_Null(); 
+               break;
+       case NetworkMessage::CREATE_FEDERATION_EXECUTION:
+               msg = new NM_Create_Federation_Execution(); 
+               break;
+       case NetworkMessage::DESTROY_FEDERATION_EXECUTION:
+               msg = new NM_Destroy_Federation_Execution(); 
+               break;
+       case NetworkMessage::JOIN_FEDERATION_EXECUTION:
+               msg = new NM_Join_Federation_Execution(); 
+               break;
+       case NetworkMessage::RESIGN_FEDERATION_EXECUTION:
+               msg = new NM_Resign_Federation_Execution(); 
+               break;
+       case NetworkMessage::SET_TIME_REGULATING:
+               msg = new NM_Set_Time_Regulating(); 
+               break;
+       case NetworkMessage::SET_TIME_CONSTRAINED:
+               msg = new NM_Set_Time_Constrained(); 
+               break;
+       case NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT:
+               msg = new NM_Register_Federation_Synchronization_Point(); 
+               break;
+       case NetworkMessage::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED:
+               msg = new NM_Synchronization_Point_Registration_Succeeded(); 
+               break;
+       case NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT:
+               msg = new NM_Announce_Synchronization_Point(); 
+               break;
+       case NetworkMessage::SYNCHRONIZATION_POINT_ACHIEVED:
+               msg = new NM_Synchronization_Point_Achieved(); 
+               break;
+       case NetworkMessage::FEDERATION_SYNCHRONIZED:
+               msg = new NM_Federation_Synchronized(); 
+               break;
+       case NetworkMessage::REQUEST_FEDERATION_SAVE:
+               msg = new NM_Request_Federation_Save(); 
+               break;
+       case NetworkMessage::FEDERATE_SAVE_BEGUN:
+               msg = new NM_Federate_Save_Begun(); 
+               break;
+       case NetworkMessage::FEDERATE_SAVE_COMPLETE:
+               msg = new NM_Federate_Save_Complete(); 
+               break;
+       case NetworkMessage::FEDERATE_SAVE_NOT_COMPLETE:
+               msg = new NM_Federate_Save_Not_Complete(); 
+               break;
+       case NetworkMessage::INITIATE_FEDERATE_SAVE:
+               msg = new NM_Initiate_Federate_Save(); 
+               break;
+       case NetworkMessage::FEDERATION_SAVED:
+               msg = new NM_Federation_Saved(); 
+               break;
+       case NetworkMessage::FEDERATION_NOT_SAVED:
+               msg = new NM_Federation_Not_Saved(); 
+               break;
+       case NetworkMessage::REQUEST_FEDERATION_RESTORE:
+               msg = new NM_Request_Federation_Restore(); 
+               break;
+       case NetworkMessage::FEDERATE_RESTORE_COMPLETE:
+               msg = new NM_Federate_Restore_Complete(); 
+               break;
+       case NetworkMessage::FEDERATE_RESTORE_NOT_COMPLETE:
+               msg = new NM_Federate_Restore_Not_Complete(); 
+               break;
+       case NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED:
+               msg = new NM_Request_Federation_Restore_Succeeded(); 
+               break;
+       case NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED:
+               msg = new NM_Request_Federation_Restore_Failed(); 
+               break;
+       case NetworkMessage::FEDERATION_RESTORE_BEGUN:
+               msg = new NM_Federation_Restore_Begun(); 
+               break;
+       case NetworkMessage::INITIATE_FEDERATE_RESTORE:
+               msg = new NM_Initiate_Federate_Restore(); 
+               break;
+       case NetworkMessage::FEDERATION_RESTORED:
+               msg = new NM_Federation_Restored(); 
+               break;
+       case NetworkMessage::FEDERATION_NOT_RESTORED:
+               msg = new NM_Federation_Not_Restored(); 
+               break;
+       case NetworkMessage::PUBLISH_OBJECT_CLASS:
+               msg = new NM_Publish_Object_Class(); 
+               break;
+       case NetworkMessage::UNPUBLISH_OBJECT_CLASS:
+               msg = new NM_Unpublish_Object_Class(); 
+               break;
+       case NetworkMessage::PUBLISH_INTERACTION_CLASS:
+               msg = new NM_Publish_Interaction_Class(); 
+               break;
+       case NetworkMessage::UNPUBLISH_INTERACTION_CLASS:
+               msg = new NM_Unpublish_Interaction_Class(); 
+               break;
+       case NetworkMessage::SUBSCRIBE_OBJECT_CLASS:
+               msg = new NM_Subscribe_Object_Class(); 
+               break;
+       case NetworkMessage::UNSUBSCRIBE_OBJECT_CLASS:
+               msg = new NM_Unsubscribe_Object_Class(); 
+               break;
+       case NetworkMessage::SUBSCRIBE_INTERACTION_CLASS:
+               msg = new NM_Subscribe_Interaction_Class(); 
+               break;
+       case NetworkMessage::UNSUBSCRIBE_INTERACTION_CLASS:
+               msg = new NM_Unsubscribe_Interaction_Class(); 
+               break;
+       case NetworkMessage::TURN_INTERACTIONS_ON:
+               msg = new NM_Turn_Interactions_On(); 
+               break;
+       case NetworkMessage::TURN_INTERACTIONS_OFF:
+               msg = new NM_Turn_Interactions_Off(); 
+               break;
+       case NetworkMessage::REGISTER_OBJECT:
+               msg = new NM_Register_Object(); 
+               break;
+       case NetworkMessage::DISCOVER_OBJECT:
+               msg = new NM_Discover_Object(); 
+               break;
+       case NetworkMessage::UPDATE_ATTRIBUTE_VALUES:
+               msg = new NM_Update_Attribute_Values(); 
+               break;
+       case NetworkMessage::REFLECT_ATTRIBUTE_VALUES:
+               msg = new NM_Reflect_Attribute_Values(); 
+               break;
+       case NetworkMessage::SEND_INTERACTION:
+               msg = new NM_Send_Interaction(); 
+               break;
+       case NetworkMessage::RECEIVE_INTERACTION:
+               msg = new NM_Receive_Interaction(); 
+               break;
+       case NetworkMessage::DELETE_OBJECT:
+               msg = new NM_Delete_Object(); 
+               break;
+       case NetworkMessage::REMOVE_OBJECT:
+               msg = new NM_Remove_Object(); 
+               break;
+       case NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE:
+               throw RTIinternalError("CHANGE_ATTRIBUTE_TRANSPORT_TYPE: 
Unimplemented");
+               msg = new NM_Change_Attribute_Transport_Type(); 
+               break;
+       case NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE:
+               throw RTIinternalError("CHANGE_ATTRIBUTE_ORDER_TYPE: 
Unimplemented");
+               msg = new NM_Change_Attribute_Order_Type(); 
+               break;     
+       case NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE:
+               throw RTIinternalError("CHANGE_INTERACTION_TRANSPORT_TYPE: 
Unimplemented");
+               msg = new NM_Change_Interaction_Transport_Type(); 
+               break;     
+       case NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE:
+               throw RTIinternalError("CHANGE_INTERACTION_ORDER_TYPE: 
Unimplemented");
+               msg = new NM_Change_Interaction_Order_Type(); 
+               break;
+       case NetworkMessage::REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE:
+               msg = new NM_Request_Class_Attribute_Value_Update(); 
+               break;
+       case NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE:
+               msg = new NM_Request_Object_Attribute_Value_Update(); 
+               break;
+       case NetworkMessage::IS_ATTRIBUTE_OWNED_BY_FEDERATE:
+               msg = new NM_Is_Attribute_Owned_By_Federate(); 
+               break;
+       case NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP:
+               msg = new NM_Query_Attribute_Ownership(); 
+               break;
+       case NetworkMessage::ATTRIBUTE_IS_NOT_OWNED:
+               msg = new NM_Attribute_Is_Not_Owned(); 
+               break;
+       case NetworkMessage::INFORM_ATTRIBUTE_OWNERSHIP:
+               msg = new NM_Inform_Attribute_Ownership(); 
+               break;
+       case NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
+               msg = new NM_Negotiated_Attribute_Ownership_Divestiture(); 
+               break;
+       case NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION:
+               msg = new NM_Attribute_Ownership_Acquisition_Notification(); 
+               break;
+       case NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION:
+               msg = new NM_Attribute_Ownership_Divestiture_Notification(); 
+               break;
+       case NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION:
+               msg = new NM_Request_Attribute_Ownership_Assumption(); 
+               break;
+       case NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE:
+               msg = new NM_Attribute_Ownership_Unavailable(); 
+               break;
+       case NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE:
+               msg = new NM_Attribute_Ownership_Acquisition_If_Available(); 
+               break;
+       case NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
+               msg = new NM_Unconditional_Attribute_Ownership_Divestiture(); 
+               break;
+       case NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION:
+               msg = new NM_Attribute_Ownership_Acquisition(); 
+               break;
+       case NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE:
+               msg = new NM_Request_Attribute_Ownership_Release(); 
+               break;
+       case NetworkMessage::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE:
+               msg = new 
NM_Cancel_Negotiated_Attribute_Ownership_Divestiture(); 
+               break;
+       case NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE:
+               msg = new NM_Attribute_Ownership_Release_Response(); 
+               break;
+       case NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION:
+               msg = new NM_Cancel_Attribute_Ownership_Acquisition(); 
+               break;
+       case 
NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION:
+               msg = new 
NM_Confirm_Attribute_Ownership_Acquisition_Cancellation(); 
+               break;
+       case NetworkMessage::DDM_CREATE_REGION:
+               msg = new NM_DDM_Create_Region(); 
+               break;
+       case NetworkMessage::DDM_MODIFY_REGION:
+               msg = new NM_DDM_Modify_Region(); 
+               break;
+       case NetworkMessage::DDM_DELETE_REGION:
+               msg = new NM_DDM_Delete_Region(); 
+               break;
+       case NetworkMessage::DDM_ASSOCIATE_REGION:
+               msg = new NM_DDM_Associate_Region(); 
+               break;
+       case NetworkMessage::DDM_REGISTER_OBJECT:
+               msg = new NM_DDM_Register_Object(); 
+               break;
+       case NetworkMessage::DDM_UNASSOCIATE_REGION:
+               msg = new NM_DDM_Unassociate_Region(); 
+               break;
+       case NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES:
+               msg = new NM_DDM_Subscribe_Attributes(); 
+               break;
+       case NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES:
+               msg = new NM_DDM_Unsubscribe_Attributes(); 
+               break;
+       case NetworkMessage::DDM_SUBSCRIBE_INTERACTION:
+               msg = new NM_DDM_Subscribe_Interaction(); 
+               break;
+       case NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION:
+               msg = new NM_DDM_Unsubscribe_Interaction(); 
+               break;
+       case NetworkMessage::PROVIDE_ATTRIBUTE_VALUE_UPDATE:
+               msg = new NM_Provide_Attribute_Value_Update(); 
+               break;
+       case NetworkMessage::GET_FED_FILE:
+               msg = new NM_Get_FED_File(); 
+               break;
+       case NetworkMessage::LAST:
+               throw RTIinternalError("LAST message type should not be 
used!!");
+               msg = new NM_Last(); 
+               break;
+       default:
+               throw RTIinternalError("Unknown/Unimplemented message Type");
+       }
+       
+       return msg;
+} /* end of NM_Factory::create */
+
+NetworkMessage* 
+NM_Factory::receive(Socket* socket) throw (NetworkError, RTIinternalError) {
+       NetworkMessage  msgGen;
+       NetworkMessage* msg;
+       
+       /* receive generic message */
+       msgGen.receive(socket);
+       /* create specific message from type */
+       msg = NM_Factory::create(msgGen.getType());
+       /* msg->copyMsgBufFrom(msgGen); */      
+       msg->deserialize(msgGen);
+       return msg;     
+} /* end of NM_Factory::receive */
+
+NM_WithHandleArray::NM_WithHandleArray() {
+       this->name = "NM_WithHandleArray";
+       this->type = NetworkMessage::NOT_USED;
+       /* specific field init */
+       this->handleArraySize = 0;
+}
+
+NM_WithHandleArray::~NM_WithHandleArray() {
+}
+
+void NM_WithHandleArray::serialize(MessageBuffer& msgBuffer) {
+       int i;
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */  
+       msgBuffer.write_uint16(handleArraySize);
+       /* 
+        * Note that if handleArraySize is 0 
+        * the loop is void which is done on purpose.
+        * (this is a feature not a bug :-) 
+        */             
+       for (i = 0 ; i < handleArraySize ; ++i) {
+               msgBuffer.write_uint16(handleArray[i]);
+       }
+
+} /* end of serialize */ 
+void NM_WithHandleArray::deserialize(MessageBuffer& msgBuffer) {
+       int i;
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */  
+       handleArraySize = msgBuffer.read_int16();
+       /* 
+        * Note that if handleArraySize is 0 
+        * the loop is void which is done on purpose.
+        * (this is a feature not a bug :-) 
+        */     
+       for (i = 0 ; i < handleArraySize ; i ++) {
+               handleArray[i] = msgBuffer.read_int16();
+       }
+} /* end of deserialize */
+
+NM_DDM_Base::NM_DDM_Base() {
+       this->name = "NM_DDM_Base";
+       this->type = NetworkMessage::NOT_USED;
+       /* specific field init */
+       this->space       = 0;
+       this->nbExtents   = 0;
+       this->region      = 0;
+       this->object      = 0;
+       this->objectClass = 0;
+       this->boolean     = false;
+}
+
+NM_DDM_Base::~NM_DDM_Base() {
+}
+
+/*<BEGIN>---------- Not_Used ------------<BEGIN>*/
+NM_Not_Used::NM_Not_Used() {
+       this->name = "NOT_USED";
+       this->type = NetworkMessage::NOT_USED;
+       /* specific field init */
+}
+NM_Not_Used::~NM_Not_Used() {
+}
+/*<END>---------- Not_Used ------------<END>*/
+
+/*<BEGIN>---------- Close_Connexion ------------<BEGIN>*/
+NM_Close_Connexion::NM_Close_Connexion() {
+       this->name = "CLOSE_CONNEXION";
+       this->type = NetworkMessage::CLOSE_CONNEXION;
+       /* specific field init */
+}
+NM_Close_Connexion::~NM_Close_Connexion() {
+}
+/*<END>---------- Close_Connexion ------------<END>*/
+
+/*<BEGIN>---------- Message_Null ------------<BEGIN>*/
+NM_Message_Null::NM_Message_Null() {
+       this->name = "MESSAGE_NULL";
+       this->type = NetworkMessage::MESSAGE_NULL;
+       /* specific field init */
+       //isDated =true;
+}
+NM_Message_Null::~NM_Message_Null() {  
+}
+/*<END>---------- Message_Null ------------<END>*/
+
+/*<BEGIN>---------- Create_Federation_Execution ------------<BEGIN>*/
+NM_Create_Federation_Execution::NM_Create_Federation_Execution() {
+       this->name = "CREATE_FEDERATION_EXECUTION";
+       this->type = NetworkMessage::CREATE_FEDERATION_EXECUTION;
+       /* specific field init */
+       //isDated =true;
+}
+NM_Create_Federation_Execution::~NM_Create_Federation_Execution() {    
+}
+void NM_Create_Federation_Execution::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_string(federationName);
+       msgBuffer.write_string(FEDid);
+} /* end of serialize */ 
+void NM_Create_Federation_Execution::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       federationName = msgBuffer.read_string();
+       FEDid          = msgBuffer.read_string();
+} /* end of deserialize */
+/*<END>---------- Create_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Destroy_Federation_Execution ------------<BEGIN>*/
+NM_Destroy_Federation_Execution::NM_Destroy_Federation_Execution() {
+       this->name = "DESTROY_FEDERATION_EXECUTION";
+       this->type = NetworkMessage::DESTROY_FEDERATION_EXECUTION;    
+       /* specific field init */    
+       //isDated =true;
+}
+NM_Destroy_Federation_Execution::~NM_Destroy_Federation_Execution() {
+}
+void NM_Destroy_Federation_Execution::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_string(federationName);
+} /* end of serialize */ 
+void NM_Destroy_Federation_Execution::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       federationName = msgBuffer.read_string();    
+} /* end of deserialize */
+/*<END>---------- Destroy_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Join_Federation_Execution ------------<BEGIN>*/
+NM_Join_Federation_Execution::NM_Join_Federation_Execution() {
+       this->name = "JOIN_FEDERATION_EXECUTION";
+       this->type = NetworkMessage::JOIN_FEDERATION_EXECUTION;
+       /* specific field init */
+}
+NM_Join_Federation_Execution::~NM_Join_Federation_Execution() {
+}
+void NM_Join_Federation_Execution::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(numberOfRegulators);
+       msgBuffer.write_uint32(multicastAddress);
+       msgBuffer.write_uint32(bestEffortAddress);
+       msgBuffer.write_uint32(bestEffortPeer);
+       msgBuffer.write_string(federationName);
+       msgBuffer.write_string(federateName);
+} /* end of serialize */ 
+void NM_Join_Federation_Execution::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       numberOfRegulators = msgBuffer.read_int32();
+       multicastAddress   = msgBuffer.read_uint32();
+       bestEffortAddress  = msgBuffer.read_uint32();
+       bestEffortPeer     = msgBuffer.read_uint32();
+       federationName     = msgBuffer.read_string();
+       federateName       = msgBuffer.read_string();
+} /* end of deserialize */
+/*<END>---------- Join_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Resign_Federation_Execution ------------<BEGIN>*/
+NM_Resign_Federation_Execution::NM_Resign_Federation_Execution() {
+       this->name = "RESIGN_FEDERATION_EXECUTION";
+       this->type = NetworkMessage::RESIGN_FEDERATION_EXECUTION;
+       /* specific field init */
+}
+NM_Resign_Federation_Execution::~NM_Resign_Federation_Execution() {
+}
+/*<END>---------- Resign_Federation_Execution ------------<END>*/
+
+/*<BEGIN>---------- Set_Time_Regulating ------------<BEGIN>*/
+NM_Set_Time_Regulating::NM_Set_Time_Regulating() {
+       this->name = "SET_TIME_REGULATING";
+       this->type = NetworkMessage::SET_TIME_REGULATING;
+       /* specific field init */       
+       regulator = false;
+}
+NM_Set_Time_Regulating::~NM_Set_Time_Regulating() {
+}
+void NM_Set_Time_Regulating::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_bool(regulator);          
+} /* end of serialize */ 
+void NM_Set_Time_Regulating::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       regulator = msgBuffer.read_bool();
+} /* end of deserialize */
+/*<END>---------- Set_Time_Regulating ------------<END>*/
+
+/*<BEGIN>---------- Set_Time_Constrained ------------<BEGIN>*/
+NM_Set_Time_Constrained::NM_Set_Time_Constrained() {
+       this->name = "SET_TIME_CONSTRAINED";
+       this->type = NetworkMessage::SET_TIME_CONSTRAINED;
+       /* specific field init */
+       constrained=false;
+}
+NM_Set_Time_Constrained::~NM_Set_Time_Constrained() {
+}
+void NM_Set_Time_Constrained::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_bool(constrained);  
+} /* end of serialize */ 
+void NM_Set_Time_Constrained::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       constrained = msgBuffer.read_bool();
+} /* end of deserialize */
+/*<END>---------- Set_Time_Constrained ------------<END>*/
+
+/*<BEGIN>---------- Register_Federation_Synchronization_Point 
------------<BEGIN>*/
+NM_Register_Federation_Synchronization_Point::NM_Register_Federation_Synchronization_Point()
 {
+       this->name = "REGISTER_FEDERATION_SYNCHRONIZATION_POINT";
+       this->type = NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+       //isTagged   = true;
+}
+NM_Register_Federation_Synchronization_Point::~NM_Register_Federation_Synchronization_Point()
 {
+}
+/*<END>---------- Register_Federation_Synchronization_Point ------------<END>*/
+
+/*<BEGIN>---------- Synchronization_Point_Registration_Succeeded 
------------<BEGIN>*/
+NM_Synchronization_Point_Registration_Succeeded::NM_Synchronization_Point_Registration_Succeeded()
 {
+       this->name = "SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED";
+       this->type = 
NetworkMessage::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Synchronization_Point_Registration_Succeeded::~NM_Synchronization_Point_Registration_Succeeded()
 {
+}
+/*<END>---------- Synchronization_Point_Registration_Succeeded 
------------<END>*/
+
+/*<BEGIN>---------- Announce_Synchronization_Point ------------<BEGIN>*/
+NM_Announce_Synchronization_Point::NM_Announce_Synchronization_Point() {
+       this->name = "ANNOUNCE_SYNCHRONIZATION_POINT";
+       this->type = NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+       //isTagged   = true;
+}
+NM_Announce_Synchronization_Point::~NM_Announce_Synchronization_Point() {
+}
+/*<END>---------- Announce_Synchronization_Point ------------<END>*/
+
+/*<BEGIN>---------- Synchronization_Point_Achieved ------------<BEGIN>*/
+NM_Synchronization_Point_Achieved::NM_Synchronization_Point_Achieved() {
+       this->name = "SYNCHRONIZATION_POINT_ACHIEVED";
+       this->type = NetworkMessage::SYNCHRONIZATION_POINT_ACHIEVED;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Synchronization_Point_Achieved::~NM_Synchronization_Point_Achieved() {
+}
+/*<END>---------- Synchronization_Point_Achieved ------------<END>*/
+
+/*<BEGIN>---------- Federation_Synchronized ------------<BEGIN>*/
+NM_Federation_Synchronized::NM_Federation_Synchronized() {
+       this->name = "FEDERATION_SYNCHRONIZED";
+       this->type = NetworkMessage::FEDERATION_SYNCHRONIZED;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Federation_Synchronized::~NM_Federation_Synchronized() {
+}
+/*<END>---------- Federation_Synchronized ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Save ------------<BEGIN>*/
+NM_Request_Federation_Save::NM_Request_Federation_Save() {
+       this->name = "REQUEST_FEDERATION_SAVE";
+       this->type = NetworkMessage::REQUEST_FEDERATION_SAVE;
+       /* specific field init */
+       //isLabelled = true;
+}
+NM_Request_Federation_Save::~NM_Request_Federation_Save() {
+}
+/*<END>---------- Request_Federation_Save ------------<END>*/
+
+/*<BEGIN>---------- Federate_Save_Begun ------------<BEGIN>*/
+NM_Federate_Save_Begun::NM_Federate_Save_Begun() {
+       this->name = "FEDERATE_SAVE_BEGUN";
+       this->type = NetworkMessage::FEDERATE_SAVE_BEGUN;
+       /* specific field init */
+}
+NM_Federate_Save_Begun::~NM_Federate_Save_Begun() {
+}
+/*<END>---------- Federate_Save_Begun ------------<END>*/
+
+/*<BEGIN>---------- Federate_Save_Complete ------------<BEGIN>*/
+NM_Federate_Save_Complete::NM_Federate_Save_Complete() {
+       this->name = "FEDERATE_SAVE_COMPLETE";
+       this->type = NetworkMessage::FEDERATE_SAVE_COMPLETE;
+       /* specific field init */
+}
+NM_Federate_Save_Complete::~NM_Federate_Save_Complete() {
+}
+/*<END>---------- Federate_Save_Complete ------------<END>*/
+
+/*<BEGIN>---------- Federate_Save_Not_Complete ------------<BEGIN>*/
+NM_Federate_Save_Not_Complete::NM_Federate_Save_Not_Complete() {
+       this->name = "FEDERATE_SAVE_NOT_COMPLETE";
+       this->type = NetworkMessage::FEDERATE_SAVE_NOT_COMPLETE;
+       /* specific field init */
+}
+NM_Federate_Save_Not_Complete::~NM_Federate_Save_Not_Complete() {
+}
+/*<END>---------- Federate_Save_Not_Complete ------------<END>*/
+
+/*<BEGIN>---------- Initiate_Federate_Save ------------<BEGIN>*/
+NM_Initiate_Federate_Save::NM_Initiate_Federate_Save() {
+       this->name = "INITIATE_FEDERATE_SAVE";
+       this->type = NetworkMessage::INITIATE_FEDERATE_SAVE;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Initiate_Federate_Save::~NM_Initiate_Federate_Save() {
+}
+/*<END>---------- Initiate_Federate_Save ------------<END>*/
+
+/*<BEGIN>---------- Federation_Saved ------------<BEGIN>*/
+NM_Federation_Saved::NM_Federation_Saved() {
+       this->name = "FEDERATION_SAVED";
+       this->type = NetworkMessage::FEDERATION_SAVED;
+       /* specific field init */
+}
+NM_Federation_Saved::~NM_Federation_Saved() {
+}
+/*<END>---------- Federation_Saved ------------<END>*/
+
+/*<BEGIN>---------- Federation_Not_Saved ------------<BEGIN>*/
+NM_Federation_Not_Saved::NM_Federation_Not_Saved() {
+       this->name = "FEDERATION_NOT_SAVED";
+       this->type = NetworkMessage::FEDERATION_NOT_SAVED;
+       /* specific field init */
+}
+NM_Federation_Not_Saved::~NM_Federation_Not_Saved() {
+}
+/*<END>---------- Federation_Not_Saved ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Restore ------------<BEGIN>*/
+NM_Request_Federation_Restore::NM_Request_Federation_Restore() {
+       this->name = "REQUEST_FEDERATION_RESTORE";
+       this->type = NetworkMessage::REQUEST_FEDERATION_RESTORE;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Request_Federation_Restore::~NM_Request_Federation_Restore() {
+}
+/*<END>---------- Request_Federation_Restore ------------<END>*/
+
+/*<BEGIN>---------- Federate_Restore_Complete ------------<BEGIN>*/
+NM_Federate_Restore_Complete::NM_Federate_Restore_Complete() {
+       this->name = "FEDERATE_RESTORE_COMPLETE";
+       this->type = NetworkMessage::FEDERATE_RESTORE_COMPLETE;
+       /* specific field init */
+}
+NM_Federate_Restore_Complete::~NM_Federate_Restore_Complete() {
+}
+/*<END>---------- Federate_Restore_Complete ------------<END>*/
+
+/*<BEGIN>---------- Federate_Restore_Not_Complete ------------<BEGIN>*/
+NM_Federate_Restore_Not_Complete::NM_Federate_Restore_Not_Complete() {
+       this->name = "FEDERATE_RESTORE_NOT_COMPLETE";
+       this->type = NetworkMessage::FEDERATE_RESTORE_NOT_COMPLETE;
+       /* specific field init */
+}
+NM_Federate_Restore_Not_Complete::~NM_Federate_Restore_Not_Complete() {
+}
+/*<END>---------- Federate_Restore_Not_Complete ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Restore_Succeeded ------------<BEGIN>*/
+NM_Request_Federation_Restore_Succeeded::NM_Request_Federation_Restore_Succeeded()
 {
+       this->name = "REQUEST_FEDERATION_RESTORE_SUCCEEDED";
+       this->type = NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Request_Federation_Restore_Succeeded::~NM_Request_Federation_Restore_Succeeded()
 {
+}
+/*<END>---------- Request_Federation_Restore_Succeeded ------------<END>*/
+
+/*<BEGIN>---------- Request_Federation_Restore_Failed ------------<BEGIN>*/
+NM_Request_Federation_Restore_Failed::NM_Request_Federation_Restore_Failed() {
+       this->name = "REQUEST_FEDERATION_RESTORE_FAILED";
+       this->type = NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+       //isTagged   = true;
+}
+NM_Request_Federation_Restore_Failed::~NM_Request_Federation_Restore_Failed() {
+}
+/*<END>---------- Request_Federation_Restore_Failed ------------<END>*/
+
+/*<BEGIN>---------- Federation_Restore_Begun ------------<BEGIN>*/
+NM_Federation_Restore_Begun::NM_Federation_Restore_Begun() {
+       this->name = "FEDERATION_RESTORE_BEGUN";
+       this->type = NetworkMessage::FEDERATION_RESTORE_BEGUN;
+       /* specific field init */
+       //isLabelled = true;
+}
+NM_Federation_Restore_Begun::~NM_Federation_Restore_Begun() {
+}
+/*<END>---------- Federation_Restore_Begun ------------<END>*/
+
+/*<BEGIN>---------- Initiate_Federate_Restore ------------<BEGIN>*/
+NM_Initiate_Federate_Restore::NM_Initiate_Federate_Restore() {
+       this->name = "INITIATE_FEDERATE_RESTORE";
+       this->type = NetworkMessage::INITIATE_FEDERATE_RESTORE;
+       /* specific field init */
+}
+NM_Initiate_Federate_Restore::~NM_Initiate_Federate_Restore() {
+}
+/*<END>---------- Initiate_Federate_Restore ------------<END>*/
+
+/*<BEGIN>---------- Federation_Restored ------------<BEGIN>*/
+NM_Federation_Restored::NM_Federation_Restored() {
+       this->name = "FEDERATION_RESTORED";
+       this->type = NetworkMessage::FEDERATION_RESTORED;
+       /* specific field init */
+}
+NM_Federation_Restored::~NM_Federation_Restored() {
+}
+/*<END>---------- Federation_Restored ------------<END>*/
+
+/*<BEGIN>---------- Federation_Not_Restored ------------<BEGIN>*/
+NM_Federation_Not_Restored::NM_Federation_Not_Restored() {
+       this->name = "FEDERATION_NOT_RESTORED";
+       this->type = NetworkMessage::FEDERATION_NOT_RESTORED;
+       /* specific field init */
+}
+NM_Federation_Not_Restored::~NM_Federation_Not_Restored() {
+}
+/*<END>---------- Federation_Not_Restored ------------<END>*/
+
+/*<BEGIN>---------- Publish_Object_Class ------------<BEGIN>*/
+NM_Publish_Object_Class::NM_Publish_Object_Class() {
+       this->name = "PUBLISH_OBJECT_CLASS";
+       this->type = NetworkMessage::PUBLISH_OBJECT_CLASS;
+       /* specific field init */
+}
+NM_Publish_Object_Class::~NM_Publish_Object_Class() {
+}
+void
+NM_Publish_Object_Class::serialize(MessageBuffer& msgBuffer) {
+       Super::serialize(msgBuffer);
+       msgBuffer.write_int32(objectClass);
+}
+void
+NM_Publish_Object_Class::deserialize(MessageBuffer& msgBuffer) {
+       Super::deserialize(msgBuffer);
+       objectClass = msgBuffer.read_int32();
+}
+/*<END>---------- Publish_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Unpublish_Object_Class ------------<BEGIN>*/
+NM_Unpublish_Object_Class::NM_Unpublish_Object_Class() {
+       this->name = "UNPUBLISH_OBJECT_CLASS";
+       this->type = NetworkMessage::UNPUBLISH_OBJECT_CLASS;
+       /* specific field init */
+}
+NM_Unpublish_Object_Class::~NM_Unpublish_Object_Class() {
+}
+void NM_Unpublish_Object_Class::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(objectClass);
+} /* end of serialize */ 
+void NM_Unpublish_Object_Class::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       objectClass = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- Unpublish_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Publish_Interaction_Class ------------<BEGIN>*/
+NM_Publish_Interaction_Class::NM_Publish_Interaction_Class() {
+       this->name = "PUBLISH_INTERACTION_CLASS";
+       this->type = NetworkMessage::PUBLISH_INTERACTION_CLASS;
+       /* specific field init */
+}
+NM_Publish_Interaction_Class::~NM_Publish_Interaction_Class() {
+}
+void NM_Publish_Interaction_Class::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(interactionClass);
+} /* end of serialize */ 
+void NM_Publish_Interaction_Class::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       interactionClass = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- Publish_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Unpublish_Interaction_Class ------------<BEGIN>*/
+NM_Unpublish_Interaction_Class::NM_Unpublish_Interaction_Class() {
+       this->name = "UNPUBLISH_INTERACTION_CLASS";
+       this->type = NetworkMessage::UNPUBLISH_INTERACTION_CLASS;
+       /* specific field init */
+}
+NM_Unpublish_Interaction_Class::~NM_Unpublish_Interaction_Class() {
+}
+/*<END>---------- Unpublish_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Subscribe_Object_Class ------------<BEGIN>*/
+NM_Subscribe_Object_Class::NM_Subscribe_Object_Class() {
+       this->name = "SUBSCRIBE_OBJECT_CLASS";
+       this->type = NetworkMessage::SUBSCRIBE_OBJECT_CLASS;
+       /* specific field init */
+}
+NM_Subscribe_Object_Class::~NM_Subscribe_Object_Class() {
+}
+void NM_Subscribe_Object_Class::serialize(MessageBuffer& msgBuffer) {
+       Super::serialize(msgBuffer);
+       msgBuffer.write_int32(objectClass);
+}
+void NM_Subscribe_Object_Class::deserialize(MessageBuffer& msgBuffer) {
+       Super::deserialize(msgBuffer);
+       objectClass=msgBuffer.read_int32();
+}
+/*<END>---------- Subscribe_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Unsubscribe_Object_Class ------------<BEGIN>*/
+NM_Unsubscribe_Object_Class::NM_Unsubscribe_Object_Class() {
+       this->name = "UNSUBSCRIBE_OBJECT_CLASS";
+       this->type = NetworkMessage::UNSUBSCRIBE_OBJECT_CLASS;
+       /* specific field init */
+}
+NM_Unsubscribe_Object_Class::~NM_Unsubscribe_Object_Class() {
+}
+/*<END>---------- Unsubscribe_Object_Class ------------<END>*/
+
+/*<BEGIN>---------- Subscribe_Interaction_Class ------------<BEGIN>*/
+NM_Subscribe_Interaction_Class::NM_Subscribe_Interaction_Class() {
+       this->name = "SUBSCRIBE_INTERACTION_CLASS";
+       this->type = NetworkMessage::SUBSCRIBE_INTERACTION_CLASS;
+       /* specific field init */
+}
+NM_Subscribe_Interaction_Class::~NM_Subscribe_Interaction_Class() {
+}
+/*<END>---------- Subscribe_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Unsubscribe_Interaction_Class ------------<BEGIN>*/
+NM_Unsubscribe_Interaction_Class::NM_Unsubscribe_Interaction_Class() {
+       this->name = "UNSUBSCRIBE_INTERACTION_CLASS";
+       this->type = NetworkMessage::UNSUBSCRIBE_INTERACTION_CLASS;
+       /* specific field init */
+}
+NM_Unsubscribe_Interaction_Class::~NM_Unsubscribe_Interaction_Class() {
+}
+/*<END>---------- Unsubscribe_Interaction_Class ------------<END>*/
+
+/*<BEGIN>---------- Turn_Interactions_On ------------<BEGIN>*/
+NM_Turn_Interactions_On::NM_Turn_Interactions_On() {
+       this->name = "TURN_INTERACTIONS_ON";
+       this->type = NetworkMessage::TURN_INTERACTIONS_ON;
+       /* specific field init */
+}
+NM_Turn_Interactions_On::~NM_Turn_Interactions_On() {
+}
+/*<END>---------- Turn_Interactions_On ------------<END>*/
+
+/*<BEGIN>---------- Turn_Interactions_Off ------------<BEGIN>*/
+NM_Turn_Interactions_Off::NM_Turn_Interactions_Off() {
+       this->name = "TURN_INTERACTIONS_OFF";
+       this->type = NetworkMessage::TURN_INTERACTIONS_OFF;
+       /* specific field init */
+}
+NM_Turn_Interactions_Off::~NM_Turn_Interactions_Off() {
+}
+/*<END>---------- Turn_Interactions_Off ------------<END>*/
+
+/*<BEGIN>---------- Register_Object ------------<BEGIN>*/
+NM_Register_Object::NM_Register_Object() {
+       this->name = "REGISTER_OBJECT";
+       this->type = NetworkMessage::REGISTER_OBJECT;
+       /* specific field init */
+       //isLabelled = true;
+}
+NM_Register_Object::~NM_Register_Object() {
+}
+void NM_Register_Object::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(objectClass);
+       msgBuffer.write_int32(object);
+} /* end of serialize */ 
+void NM_Register_Object::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       objectClass = msgBuffer.read_int32();
+       object      = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- Register_Object ------------<END>*/
+
+/*<BEGIN>---------- Discover_Object ------------<BEGIN>*/
+NM_Discover_Object::NM_Discover_Object() {
+       this->name = "DISCOVER_OBJECT";
+       this->type = NetworkMessage::DISCOVER_OBJECT;
+       /* specific field init */
+       //isLabelled = true;
+}
+NM_Discover_Object::~NM_Discover_Object() {
+}
+/*<END>---------- Discover_Object ------------<END>*/
+
+/*<BEGIN>---------- Update_Attribute_Values ------------<BEGIN>*/
+NM_Update_Attribute_Values::NM_Update_Attribute_Values() {
+       this->name = "UPDATE_ATTRIBUTE_VALUES";
+       this->type = NetworkMessage::UPDATE_ATTRIBUTE_VALUES;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Update_Attribute_Values::~NM_Update_Attribute_Values() {
+}
+void NM_Update_Attribute_Values::serialize(MessageBuffer& msgBuffer) {
+       int i;
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* handleArraySize was done by superclass */
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(object);  
+       /* the value pre-encoded by the user (HLA 1.3) */
+       for (i = 0 ; i < handleArraySize ; i++) {
+               msgBuffer.write_int32(ValueArray[i].length) ;
+               msgBuffer.write_bytes(ValueArray[i].value, 
ValueArray[i].length);
+       }    
+} /* end of serialize */ 
+void NM_Update_Attribute_Values::deserialize(MessageBuffer& msgBuffer) {
+       int i;
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* handleArraySize was done by superclass */
+       /* specific code (if any) goes here */          
+       object          = msgBuffer.read_int32();       
+       for (i = 0 ; i < handleArraySize ; i ++) {
+               ValueArray[i].length = msgBuffer.read_int32();
+               msgBuffer.read_bytes(ValueArray[i].value, 
ValueArray[i].length);                
+       }
+} /* end of deserialize */
+/*<END>---------- Update_Attribute_Values ------------<END>*/
+
+/*<BEGIN>---------- Reflect_Attribute_Values ------------<BEGIN>*/
+NM_Reflect_Attribute_Values::NM_Reflect_Attribute_Values() {
+       this->name = "REFLECT_ATTRIBUTE_VALUES";
+       this->type = NetworkMessage::REFLECT_ATTRIBUTE_VALUES;
+       /* specific field init */
+}
+NM_Reflect_Attribute_Values::~NM_Reflect_Attribute_Values() {
+}
+/*<END>---------- Reflect_Attribute_Values ------------<END>*/
+
+/*<BEGIN>---------- Send_Interaction ------------<BEGIN>*/
+NM_Send_Interaction::NM_Send_Interaction() {
+       this->name = "SEND_INTERACTION";
+       this->type = NetworkMessage::SEND_INTERACTION;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Send_Interaction::~NM_Send_Interaction() {
+}
+void NM_Send_Interaction::serialize(MessageBuffer& msgBuffer) {
+       int i;
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(region);
+       msgBuffer.write_int32(interactionClass);        
+       /* the value pre-encoded by the user (HLA 1.3) */
+       for (i = 0 ; i < handleArraySize ; i++) {
+               msgBuffer.write_int32(ValueArray[i].length) ;
+               msgBuffer.write_bytes(ValueArray[i].value, 
ValueArray[i].length);
+       }    
+} /* end of serialize */ 
+void NM_Send_Interaction::deserialize(MessageBuffer& msgBuffer) {
+       int i;
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       region           = msgBuffer.read_int32();
+       interactionClass = msgBuffer.read_int32();
+       for (i = 0 ; i < handleArraySize ; i ++) {
+               ValueArray[i].length = msgBuffer.read_int32();
+               msgBuffer.read_bytes(ValueArray[i].value, ValueArray[i].length);
+       }
+} /* end of deserialize */
+/*<END>---------- Send_Interaction ------------<END>*/
+
+/*<BEGIN>---------- Receive_Interaction ------------<BEGIN>*/
+NM_Receive_Interaction::NM_Receive_Interaction() {
+       this->name = "RECEIVE_INTERACTION";
+       this->type = NetworkMessage::RECEIVE_INTERACTION;
+       /* specific field init */
+}
+NM_Receive_Interaction::~NM_Receive_Interaction() {
+}
+/*<END>---------- Receive_Interaction ------------<END>*/
+
+/*<BEGIN>---------- Delete_Object ------------<BEGIN>*/
+NM_Delete_Object::NM_Delete_Object() {
+       this->name = "DELETE_OBJECT";
+       this->type = NetworkMessage::DELETE_OBJECT;
+       /* specific field init */
+       //isDated =true;
+       //isLabelled = true;
+}
+NM_Delete_Object::~NM_Delete_Object() {
+}
+/*<END>---------- Delete_Object ------------<END>*/
+
+/*<BEGIN>---------- Remove_Object ------------<BEGIN>*/
+NM_Remove_Object::NM_Remove_Object() {
+       this->name = "REMOVE_OBJECT";
+       this->type = NetworkMessage::REMOVE_OBJECT;
+       /* specific field init */
+}
+NM_Remove_Object::~NM_Remove_Object() {
+}
+
+/*<END>---------- Remove_Object ------------<END>*/
+
+/*<BEGIN>---------- Change_Attribute_Transport_Type ------------<BEGIN>*/
+NM_Change_Attribute_Transport_Type::NM_Change_Attribute_Transport_Type() {
+       this->name = "CHANGE_ATTRIBUTE_TRANSPORT_TYPE";
+       this->type = NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE;
+       /* specific field init */
+}
+NM_Change_Attribute_Transport_Type::~NM_Change_Attribute_Transport_Type() {
+}
+void NM_Change_Attribute_Transport_Type::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of serialize */ 
+void NM_Change_Attribute_Transport_Type::deserialize(MessageBuffer& msgBuffer) 
{
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of deserialize */
+/*<END>---------- Change_Attribute_Transport_Type ------------<END>*/
+
+/*<BEGIN>---------- Change_Attribute_Order_Type ------------<BEGIN>*/
+NM_Change_Attribute_Order_Type::NM_Change_Attribute_Order_Type() {
+       this->name = "CHANGE_ATTRIBUTE_ORDER_TYPE";
+       this->type = NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE;
+       /* specific field init */
+}
+NM_Change_Attribute_Order_Type::~NM_Change_Attribute_Order_Type() {
+}
+void NM_Change_Attribute_Order_Type::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of serialize */ 
+void NM_Change_Attribute_Order_Type::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of deserialize */
+/*<END>---------- Change_Attribute_Order_Type ------------<END>*/
+
+/*<BEGIN>---------- Change_Interaction_Transport_Type ------------<BEGIN>*/
+NM_Change_Interaction_Transport_Type::NM_Change_Interaction_Transport_Type() {
+       this->name = "CHANGE_INTERACTION_TRANSPORT_TYPE";
+       this->type = NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE;
+       /* specific field init */
+}
+NM_Change_Interaction_Transport_Type::~NM_Change_Interaction_Transport_Type() {
+}
+void NM_Change_Interaction_Transport_Type::serialize(MessageBuffer& msgBuffer) 
{
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of serialize */ 
+void NM_Change_Interaction_Transport_Type::deserialize(MessageBuffer& 
msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of deserialize */
+/*<END>---------- Change_Interaction_Transport_Type ------------<END>*/
+
+/*<BEGIN>---------- Change_Interaction_Order_Type ------------<BEGIN>*/
+NM_Change_Interaction_Order_Type::NM_Change_Interaction_Order_Type() {
+       this->name = "CHANGE_INTERACTION_ORDER_TYPE";
+       this->type = NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE;
+       /* specific field init */
+}
+NM_Change_Interaction_Order_Type::~NM_Change_Interaction_Order_Type() {
+}
+void NM_Change_Interaction_Order_Type::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of serialize */ 
+void NM_Change_Interaction_Order_Type::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of deserialize */
+/*<END>---------- Change_Interaction_Order_Type ------------<END>*/
+
+/*<BEGIN>---------- Request_Class_Attribute_Value_Update ------------<BEGIN>*/
+NM_Request_Class_Attribute_Value_Update::NM_Request_Class_Attribute_Value_Update()
 {
+       this->name = "REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE";
+       this->type = NetworkMessage::REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE;
+       /* specific field init */
+}
+NM_Request_Class_Attribute_Value_Update::~NM_Request_Class_Attribute_Value_Update()
 {
+}
+void NM_Request_Class_Attribute_Value_Update::serialize(MessageBuffer& 
msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of serialize */ 
+void NM_Request_Class_Attribute_Value_Update::deserialize(MessageBuffer& 
msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+} /* end of deserialize */
+/*<END>---------- Request_Class_Attribute_Value_Update ------------<END>*/
+
+/*<BEGIN>---------- Request_Object_Attribute_Value_Update ------------<BEGIN>*/
+NM_Request_Object_Attribute_Value_Update::NM_Request_Object_Attribute_Value_Update()
 {
+       this->name = "REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE";
+       this->type = NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE;
+       /* specific field init */
+}
+NM_Request_Object_Attribute_Value_Update::~NM_Request_Object_Attribute_Value_Update()
 {
+}
+void NM_Request_Object_Attribute_Value_Update::serialize(MessageBuffer& 
msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(object);
+} /* end of serialize */ 
+void NM_Request_Object_Attribute_Value_Update::deserialize(MessageBuffer& 
msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       object  = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- Request_Object_Attribute_Value_Update ------------<END>*/
+
+/*<BEGIN>---------- Is_Attribute_Owned_By_Federate ------------<BEGIN>*/
+NM_Is_Attribute_Owned_By_Federate::NM_Is_Attribute_Owned_By_Federate() {
+       this->name = "IS_ATTRIBUTE_OWNED_BY_FEDERATE";
+       this->type = NetworkMessage::IS_ATTRIBUTE_OWNED_BY_FEDERATE;
+       /* specific field init */
+       //isLabelled = true;
+}
+NM_Is_Attribute_Owned_By_Federate::~NM_Is_Attribute_Owned_By_Federate() {
+}
+void NM_Is_Attribute_Owned_By_Federate::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(object);
+       msgBuffer.write_int32(attribute);
+} /* end of serialize */ 
+void NM_Is_Attribute_Owned_By_Federate::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       object    = msgBuffer.read_int32();
+       attribute = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- Is_Attribute_Owned_By_Federate ------------<END>*/
+
+/*<BEGIN>---------- Query_Attribute_Ownership ------------<BEGIN>*/
+NM_Query_Attribute_Ownership::NM_Query_Attribute_Ownership() {
+       this->name = "QUERY_ATTRIBUTE_OWNERSHIP";
+       this->type = NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP;
+       /* specific field init */
+}
+NM_Query_Attribute_Ownership::~NM_Query_Attribute_Ownership() {
+}
+/*<END>---------- Query_Attribute_Ownership ------------<END>*/
+
+/*<BEGIN>---------- Attribute_Is_Not_Owned ------------<BEGIN>*/
+NM_Attribute_Is_Not_Owned::NM_Attribute_Is_Not_Owned() {
+       this->name = "ATTRIBUTE_IS_NOT_OWNED";
+       this->type = NetworkMessage::ATTRIBUTE_IS_NOT_OWNED;
+       /* specific field init */
+}
+NM_Attribute_Is_Not_Owned::~NM_Attribute_Is_Not_Owned() {
+}
+/*<END>---------- Attribute_Is_Not_Owned ------------<END>*/
+
+/*<BEGIN>---------- Inform_Attribute_Ownership ------------<BEGIN>*/
+NM_Inform_Attribute_Ownership::NM_Inform_Attribute_Ownership() {
+       this->name = "INFORM_ATTRIBUTE_OWNERSHIP";
+       this->type = NetworkMessage::INFORM_ATTRIBUTE_OWNERSHIP;
+       /* specific field init */
+}
+NM_Inform_Attribute_Ownership::~NM_Inform_Attribute_Ownership() {
+}
+/*<END>---------- Inform_Attribute_Ownership ------------<END>*/
+
+/*<BEGIN>---------- Negotiated_Attribute_Ownership_Divestiture 
------------<BEGIN>*/
+NM_Negotiated_Attribute_Ownership_Divestiture::NM_Negotiated_Attribute_Ownership_Divestiture()
 {
+       this->name = "NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE";
+       this->type = NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE;
+       /* specific field init */
+       //isLabelled = true;
+}
+NM_Negotiated_Attribute_Ownership_Divestiture::~NM_Negotiated_Attribute_Ownership_Divestiture()
 {
+}
+/*<END>---------- Negotiated_Attribute_Ownership_Divestiture 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Acquisition_Notification 
------------<BEGIN>*/
+NM_Attribute_Ownership_Acquisition_Notification::NM_Attribute_Ownership_Acquisition_Notification()
 {
+       this->name = "ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION";
+       this->type = 
NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION;
+       /* specific field init */
+}
+NM_Attribute_Ownership_Acquisition_Notification::~NM_Attribute_Ownership_Acquisition_Notification()
 {
+}
+/*<END>---------- Attribute_Ownership_Acquisition_Notification 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Divestiture_Notification 
------------<BEGIN>*/
+NM_Attribute_Ownership_Divestiture_Notification::NM_Attribute_Ownership_Divestiture_Notification()
 {
+       this->name = "ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION";
+       this->type = 
NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION;
+       /* specific field init */
+}
+NM_Attribute_Ownership_Divestiture_Notification::~NM_Attribute_Ownership_Divestiture_Notification()
 {
+}
+/*<END>---------- Attribute_Ownership_Divestiture_Notification 
------------<END>*/
+
+/*<BEGIN>---------- Request_Attribute_Ownership_Assumption 
------------<BEGIN>*/
+NM_Request_Attribute_Ownership_Assumption::NM_Request_Attribute_Ownership_Assumption()
 {
+       this->name = "REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION";
+       this->type = NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION;
+       /* specific field init */
+}
+NM_Request_Attribute_Ownership_Assumption::~NM_Request_Attribute_Ownership_Assumption()
 {
+}
+/*<END>---------- Request_Attribute_Ownership_Assumption ------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Unavailable ------------<BEGIN>*/
+NM_Attribute_Ownership_Unavailable::NM_Attribute_Ownership_Unavailable() {
+       this->name = "ATTRIBUTE_OWNERSHIP_UNAVAILABLE";
+       this->type = NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE;
+       /* specific field init */
+}
+NM_Attribute_Ownership_Unavailable::~NM_Attribute_Ownership_Unavailable() {
+}
+/*<END>---------- Attribute_Ownership_Unavailable ------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Acquisition_If_Available 
------------<BEGIN>*/
+NM_Attribute_Ownership_Acquisition_If_Available::NM_Attribute_Ownership_Acquisition_If_Available()
 {
+       this->name = "ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE";
+       this->type = 
NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE;
+       /* specific field init */
+}
+NM_Attribute_Ownership_Acquisition_If_Available::~NM_Attribute_Ownership_Acquisition_If_Available()
 {
+}
+/*<END>---------- Attribute_Ownership_Acquisition_If_Available 
------------<END>*/
+
+/*<BEGIN>---------- Unconditional_Attribute_Ownership_Divestiture 
------------<BEGIN>*/
+NM_Unconditional_Attribute_Ownership_Divestiture::NM_Unconditional_Attribute_Ownership_Divestiture()
 {
+       this->name = "UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE";
+       this->type = 
NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE;
+       /* specific field init */
+}
+NM_Unconditional_Attribute_Ownership_Divestiture::~NM_Unconditional_Attribute_Ownership_Divestiture()
 {
+}
+/*<END>---------- Unconditional_Attribute_Ownership_Divestiture 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Acquisition ------------<BEGIN>*/
+NM_Attribute_Ownership_Acquisition::NM_Attribute_Ownership_Acquisition() {
+       this->name = "ATTRIBUTE_OWNERSHIP_ACQUISITION";
+       this->type = NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION;
+       /* specific field init */
+}
+NM_Attribute_Ownership_Acquisition::~NM_Attribute_Ownership_Acquisition() {
+}
+/*<END>---------- Attribute_Ownership_Acquisition ------------<END>*/
+
+/*<BEGIN>---------- Request_Attribute_Ownership_Release ------------<BEGIN>*/
+NM_Request_Attribute_Ownership_Release::NM_Request_Attribute_Ownership_Release()
 {
+       this->name = "REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE";
+       this->type = NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE;
+       /* specific field init */
+}
+NM_Request_Attribute_Ownership_Release::~NM_Request_Attribute_Ownership_Release()
 {
+}
+/*<END>---------- Request_Attribute_Ownership_Release ------------<END>*/
+
+/*<BEGIN>---------- Cancel_Negotiated_Attribute_Ownership_Divestiture 
------------<BEGIN>*/
+NM_Cancel_Negotiated_Attribute_Ownership_Divestiture::NM_Cancel_Negotiated_Attribute_Ownership_Divestiture()
 {
+       this->name = "CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE";
+       this->type = 
NetworkMessage::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE;
+       /* specific field init */
+}
+NM_Cancel_Negotiated_Attribute_Ownership_Divestiture::~NM_Cancel_Negotiated_Attribute_Ownership_Divestiture()
 {
+}
+/*<END>---------- Cancel_Negotiated_Attribute_Ownership_Divestiture 
------------<END>*/
+
+/*<BEGIN>---------- Attribute_Ownership_Release_Response ------------<BEGIN>*/
+NM_Attribute_Ownership_Release_Response::NM_Attribute_Ownership_Release_Response()
 {
+       this->name = "ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE";
+       this->type = NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE;
+       /* specific field init */
+}
+NM_Attribute_Ownership_Release_Response::~NM_Attribute_Ownership_Release_Response()
 {
+}
+/*<END>---------- Attribute_Ownership_Release_Response ------------<END>*/
+
+/*<BEGIN>---------- Cancel_Attribute_Ownership_Acquisition 
------------<BEGIN>*/
+NM_Cancel_Attribute_Ownership_Acquisition::NM_Cancel_Attribute_Ownership_Acquisition()
 {
+       this->name = "CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION";
+       this->type = NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION;
+       /* specific field init */
+}
+NM_Cancel_Attribute_Ownership_Acquisition::~NM_Cancel_Attribute_Ownership_Acquisition()
 {
+}
+/*<END>---------- Cancel_Attribute_Ownership_Acquisition ------------<END>*/
+
+/*<BEGIN>---------- Confirm_Attribute_Ownership_Acquisition_Cancellation 
------------<BEGIN>*/
+NM_Confirm_Attribute_Ownership_Acquisition_Cancellation::NM_Confirm_Attribute_Ownership_Acquisition_Cancellation()
 {
+       this->name = "CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION";
+       this->type = 
NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION;
+       /* specific field init */
+}
+NM_Confirm_Attribute_Ownership_Acquisition_Cancellation::~NM_Confirm_Attribute_Ownership_Acquisition_Cancellation()
 {
+}
+/*<END>---------- Confirm_Attribute_Ownership_Acquisition_Cancellation 
------------<END>*/
+
+/*<BEGIN>---------- DDM_Create_Region ------------<BEGIN>*/
+NM_DDM_Create_Region::NM_DDM_Create_Region() {
+       this->name = "DDM_CREATE_REGION";
+       this->type = NetworkMessage::DDM_CREATE_REGION;
+       /* specific field init */
+}
+NM_DDM_Create_Region::~NM_DDM_Create_Region() {
+}
+void NM_DDM_Create_Region::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(space);
+       msgBuffer.write_int32(nbExtents);
+       msgBuffer.write_int32(region);
+} /* end of serialize */ 
+void NM_DDM_Create_Region::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       space     = msgBuffer.read_int32();
+       nbExtents = msgBuffer.read_int32();
+       region    = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- DDM_Create_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Modify_Region ------------<BEGIN>*/
+NM_DDM_Modify_Region::NM_DDM_Modify_Region() {
+       this->name = "DDM_MODIFY_REGION";
+       this->type = NetworkMessage::DDM_MODIFY_REGION;
+       /* specific field init */
+}
+NM_DDM_Modify_Region::~NM_DDM_Modify_Region() {
+}
+void NM_DDM_Modify_Region::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::serialize(msgBuffer);   
+       /* specific code (if any) goes here */
+       BasicMessage::serialize(msgBuffer);
+} /* end of serialize */ 
+void NM_DDM_Modify_Region::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       BasicMessage::deserialize(msgBuffer);   
+} /* end of deserialize */
+/*<END>---------- DDM_Modify_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Delete_Region ------------<BEGIN>*/
+NM_DDM_Delete_Region::NM_DDM_Delete_Region() {
+       this->name = "DDM_DELETE_REGION";
+       this->type = NetworkMessage::DDM_DELETE_REGION;
+       /* specific field init */
+}
+NM_DDM_Delete_Region::~NM_DDM_Delete_Region() {
+}
+void NM_DDM_Delete_Region::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       BasicMessage::serialize(msgBuffer);     
+} /* end of serialize */ 
+void NM_DDM_Delete_Region::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       BasicMessage::deserialize(msgBuffer);
+} /* end of deserialize */
+/*<END>---------- DDM_Delete_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Associate_Region ------------<BEGIN>*/
+NM_DDM_Associate_Region::NM_DDM_Associate_Region() {
+       this->name = "DDM_ASSOCIATE_REGION";
+       this->type = NetworkMessage::DDM_ASSOCIATE_REGION;
+       /* specific field init */
+}
+NM_DDM_Associate_Region::~NM_DDM_Associate_Region() {
+}
+void NM_DDM_Associate_Region::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NM_WithHandleArray::serialize(msgBuffer);
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(object);
+       msgBuffer.write_int32(region);
+       msgBuffer.write_int32(boolean);
+} /* end of serialize */ 
+void NM_DDM_Associate_Region::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NM_WithHandleArray::deserialize(msgBuffer);
+       /* specific code (if any) goes here */
+       object  = msgBuffer.read_int32();
+       region  = msgBuffer.read_int32();
+       boolean = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- DDM_Associate_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Register_Object ------------<BEGIN>*/
+NM_DDM_Register_Object::NM_DDM_Register_Object() {
+       this->name = "DDM_REGISTER_OBJECT";
+       this->type = NetworkMessage::DDM_REGISTER_OBJECT;
+       /* specific field init */
+       //isTagged = true;
+}
+NM_DDM_Register_Object::~NM_DDM_Register_Object() {
+}
+void NM_DDM_Register_Object::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NM_WithHandleArray::serialize(msgBuffer);
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(object);
+       msgBuffer.write_int32(objectClass);
+       msgBuffer.write_int32(region);
+       msgBuffer.write_int32(boolean);
+} /* end of serialize */ 
+void NM_DDM_Register_Object::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NM_WithHandleArray::deserialize(msgBuffer);
+       /* specific code (if any) goes here */
+       object      = msgBuffer.read_int32();
+       objectClass = msgBuffer.read_int32();
+       region      = msgBuffer.read_int32();
+       boolean     = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- DDM_Register_Object ------------<END>*/
+
+/*<BEGIN>---------- DDM_Unassociate_Region ------------<BEGIN>*/
+NM_DDM_Unassociate_Region::NM_DDM_Unassociate_Region() {
+       this->name = "DDM_UNASSOCIATE_REGION";
+       this->type = NetworkMessage::DDM_UNASSOCIATE_REGION;
+       /* specific field init */
+}
+NM_DDM_Unassociate_Region::~NM_DDM_Unassociate_Region() {
+}
+void NM_DDM_Unassociate_Region::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::serialize(msgBuffer);
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(object);
+       msgBuffer.write_int32(region);
+} /* end of serialize */ 
+void NM_DDM_Unassociate_Region::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */         
+       NetworkMessage::deserialize(msgBuffer);
+       /* specific code (if any) goes here */
+       object = msgBuffer.read_int32();
+       region = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- DDM_Unassociate_Region ------------<END>*/
+
+/*<BEGIN>---------- DDM_Subscribe_Attributes ------------<BEGIN>*/
+NM_DDM_Subscribe_Attributes::NM_DDM_Subscribe_Attributes() {
+       this->name = "DDM_SUBSCRIBE_ATTRIBUTES";
+       this->type = NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES;
+       /* specific field init */
+}
+NM_DDM_Subscribe_Attributes::~NM_DDM_Subscribe_Attributes() {
+}
+void NM_DDM_Subscribe_Attributes::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NM_WithHandleArray::serialize(msgBuffer);
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(objectClass);
+       msgBuffer.write_int32(region);
+       msgBuffer.write_int32(boolean);
+} /* end of serialize */ 
+void NM_DDM_Subscribe_Attributes::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NM_WithHandleArray::deserialize(msgBuffer);
+       /* specific code (if any) goes here */
+       objectClass = msgBuffer.read_int32();
+       region      = msgBuffer.read_int32();
+       boolean     = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- DDM_Subscribe_Attributes ------------<END>*/
+
+/*<BEGIN>---------- DDM_Unsubscribe_Attributes ------------<BEGIN>*/
+NM_DDM_Unsubscribe_Attributes::NM_DDM_Unsubscribe_Attributes() {
+       this->name = "DDM_UNSUBSCRIBE_ATTRIBUTES";
+       this->type = NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES;
+       /* specific field init */
+}
+NM_DDM_Unsubscribe_Attributes::~NM_DDM_Unsubscribe_Attributes() {
+}
+void NM_DDM_Unsubscribe_Attributes::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::serialize(msgBuffer);
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(objectClass);
+       msgBuffer.write_int32(region);
+} /* end of serialize */ 
+void NM_DDM_Unsubscribe_Attributes::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::deserialize(msgBuffer);
+       /* specific code (if any) goes here */
+       objectClass = msgBuffer.read_int32();
+       region = msgBuffer.read_int32();
+} /* end of deserialize */
+/*<END>---------- DDM_Unsubscribe_Attributes ------------<END>*/
+
+/*<BEGIN>---------- DDM_Subscribe_Interaction ------------<BEGIN>*/
+NM_DDM_Subscribe_Interaction::NM_DDM_Subscribe_Interaction() {
+       this->name = "DDM_SUBSCRIBE_INTERACTION";
+       this->type = NetworkMessage::DDM_SUBSCRIBE_INTERACTION;
+       /* specific field init */
+}
+NM_DDM_Subscribe_Interaction::~NM_DDM_Subscribe_Interaction() {
+}
+void NM_DDM_Subscribe_Interaction::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::serialize(msgBuffer);
+       /* specific code (if any) goes here */
+       msgBuffer.write_int32(interactionClass);
+       msgBuffer.write_int32(region);
+       msgBuffer.write_bool(boolean);
+} /* end of serialize */ 
+void NM_DDM_Subscribe_Interaction::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       NetworkMessage::deserialize(msgBuffer);
+       /* specific code (if any) goes here */
+       interactionClass = msgBuffer.read_int32();
+       region           = msgBuffer.read_int32();
+       boolean           = msgBuffer.read_bool();
+} /* end of deserialize */
+/*<END>---------- DDM_Subscribe_Interaction ------------<END>*/
+
+/*<BEGIN>---------- DDM_Unsubscribe_Interaction ------------<BEGIN>*/
+NM_DDM_Unsubscribe_Interaction::NM_DDM_Unsubscribe_Interaction() {
+       this->name = "DDM_UNSUBSCRIBE_INTERACTION";
+       this->type = NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION;
+       /* specific field init */
+}
+NM_DDM_Unsubscribe_Interaction::~NM_DDM_Unsubscribe_Interaction() {
+}
+/*<END>---------- DDM_Unsubscribe_Interaction ------------<END>*/
+
+/*<BEGIN>---------- Provide_Attribute_Value_Update ------------<BEGIN>*/
+NM_Provide_Attribute_Value_Update::NM_Provide_Attribute_Value_Update() {
+       this->name = "PROVIDE_ATTRIBUTE_VALUE_UPDATE";
+       this->type = NetworkMessage::PROVIDE_ATTRIBUTE_VALUE_UPDATE;
+       /* specific field init */
+}
+NM_Provide_Attribute_Value_Update::~NM_Provide_Attribute_Value_Update() {
+}
+/*<END>---------- Provide_Attribute_Value_Update ------------<END>*/
+
+/*<BEGIN>---------- Get_FED_File ------------<BEGIN>*/
+NM_Get_FED_File::NM_Get_FED_File() {
+       this->name = "GET_FED_FILE";
+       this->type = NetworkMessage::GET_FED_FILE;
+       /* specific field init */
+}
+NM_Get_FED_File::~NM_Get_FED_File() {
+}
+void NM_Get_FED_File::serialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::serialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       msgBuffer.write_string(FEDid);
+       msgBuffer.write_int16(number);  
+       if (number) {
+               msgBuffer.write_string(line);
+       }
+} /* end of serialize */ 
+void NM_Get_FED_File::deserialize(MessageBuffer& msgBuffer) {
+       /* call mother class */      
+       Super::deserialize(msgBuffer); 
+       /* specific code (if any) goes here */
+       FEDid       = msgBuffer.read_string();
+       number      = msgBuffer.read_int16();
+       if (number) {
+               line = msgBuffer.read_string();
+       }
+} /* end of deserialize */
+/*<END>---------- Get_FED_File ------------<END>*/
+
+/*<BEGIN>---------- Last ------------<BEGIN>*/
+NM_Last::NM_Last() {
+       this->name = "LAST";
+       this->type = NetworkMessage::LAST;
+       /* specific field init */
+}
+NM_Last::~NM_Last() {
+}
+/*<END>---------- Last ------------<END>*/
+
+} /* end of certi namespace */

Index: scripts/NW_MessageType.ods
===================================================================
RCS file: scripts/NW_MessageType.ods
diff -N scripts/NW_MessageType.ods
Binary files /dev/null and /tmp/cvsONmbCC differ




reply via email to

[Prev in Thread] Current Thread [Next in Thread]