[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi libCERTI/NetworkMessage.hh libCERTI/NM_Cl... [br_DEV_H
From: |
certi-cvs |
Subject: |
[certi-cvs] certi libCERTI/NetworkMessage.hh libCERTI/NM_Cl... [br_DEV_HETEROGENEOUS] |
Date: |
Wed, 23 Apr 2008 06:23:24 +0000 |
CVSROOT: /sources/certi
Module name: certi
Branch: br_DEV_HETEROGENEOUS
Changes by: Eric NOULARD <erk> 08/04/23 06:23:24
Modified files:
libCERTI : NetworkMessage.hh NM_Classes.hh NM_Classes.cc
RTIG : RTIG_processing.cc RTIG.cc Federation.cc
RTIG.hh
RTIA : TimeManagement.cc RTIA_network.cc
Log message:
Use getter/setter for Time_Regulating and Time_Constrained NM
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NetworkMessage.hh?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=3.30.2.10&r2=3.30.2.11
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.hh?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=1.1.2.14&r2=1.1.2.15
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.cc?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=1.1.2.14&r2=1.1.2.15
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=3.56.2.9&r2=3.56.2.10
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=3.36.2.6&r2=3.36.2.7
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=3.80.2.4&r2=3.80.2.5
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.hh?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=3.23.2.1&r2=3.23.2.2
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/TimeManagement.cc?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=3.29.2.4&r2=3.29.2.5
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_network.cc?cvsroot=certi&only_with_tag=br_DEV_HETEROGENEOUS&r1=3.22.2.3&r2=3.22.2.4
Patches:
Index: libCERTI/NetworkMessage.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/NetworkMessage.hh,v
retrieving revision 3.30.2.10
retrieving revision 3.30.2.11
diff -u -b -r3.30.2.10 -r3.30.2.11
--- libCERTI/NetworkMessage.hh 21 Apr 2008 11:29:09 -0000 3.30.2.10
+++ libCERTI/NetworkMessage.hh 23 Apr 2008 06:23:21 -0000 3.30.2.11
@@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: NetworkMessage.hh,v 3.30.2.10 2008/04/21 11:29:09 erk Exp $
+// $Id: NetworkMessage.hh,v 3.30.2.11 2008/04/23 06:23:21 erk Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_NETWORK_MESSAGE_HH
@@ -218,16 +218,8 @@
int bestEffortPeer ;
unsigned long bestEffortAddress ;
- void setRegulator(bool newState) {this->regulator=newState;};
- bool isRegulator() {return regulator;};
-
-
int numberOfRegulators ;
- void setConstrained(bool newState) {this->constrained=newState;};
- bool isConstrained() {return constrained;};
-
-
/* NM_DDM_Base class fields */
SpaceHandle space;
int32_t nbExtents;
@@ -344,20 +336,6 @@
*/
std::string tag;
- /**
- * Toggle which indicates if federate
- * wants to become regulator or leave
- * its regulator state
- */
- bool regulator ;
-
- /**
- * Toggle which indicates if federate
- * wants to become constrained or leave
- * its constrained state
- */
- bool constrained ;
-
// ValueArray is now a ValueLengthPair
ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS] ;
@@ -372,4 +350,4 @@
#endif // CERTI_NETWORK_MESSAGE_HH
-// $Id: NetworkMessage.hh,v 3.30.2.10 2008/04/21 11:29:09 erk Exp $
+// $Id: NetworkMessage.hh,v 3.30.2.11 2008/04/23 06:23:21 erk Exp $
Index: libCERTI/NM_Classes.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Attic/NM_Classes.hh,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -b -r1.1.2.14 -r1.1.2.15
--- libCERTI/NM_Classes.hh 22 Apr 2008 12:07:03 -0000 1.1.2.14
+++ libCERTI/NM_Classes.hh 23 Apr 2008 06:23:22 -0000 1.1.2.15
@@ -133,8 +133,8 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// std::string federationName ;
-// std::string FEDid ;
+ // std::string federationName ;
+ // std::string FEDid ;
private:
};
@@ -151,7 +151,7 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// std::string federationName;
+ // std::string federationName;
private:
};
@@ -168,12 +168,12 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// int32_t numberOfRegulators;
-// uint32_t multicastAddress;
-// uint32_t bestEffortAddress;
-// uint32_t bestEffortPeer;
-// std::string federationName;
-// std::string federateName;
+ // int32_t numberOfRegulators;
+ // uint32_t multicastAddress;
+ // uint32_t bestEffortAddress;
+ // uint32_t bestEffortPeer;
+ // std::string federationName;
+ // std::string federateName;
private:
};
@@ -202,9 +202,17 @@
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 */
- //bool regulating;
+ /**
+ * Toggle which indicates if federate
+ * wants to become regulator or leave
+ * its regulator state
+ */
+ bool regulator ;
private:
};
@@ -219,9 +227,17 @@
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 */
- //bool constrained;
+ /**
+ * Toggle which indicates if federate
+ * wants to become constrained or leave
+ * its constrained state
+ */
+ bool constrained;
private:
};
@@ -552,7 +568,7 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// ObjectClassHandle objectClass;
+ // ObjectClassHandle objectClass;
private:
};
@@ -571,7 +587,7 @@
void setInteractionClassHandle(InteractionClassHandle interactionClass)
{this->interactionClass=interactionClass;};
protected:
/* specific field */
-// InteractionClassHandle interactionClass;
+ // InteractionClassHandle interactionClass;
private:
};
@@ -689,7 +705,7 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// ObjectHandle object;
+ // ObjectHandle object;
private:
};
@@ -720,8 +736,8 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// ObjectClassHandle objectClass;
-// ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS];
+ // ObjectClassHandle objectClass;
+ // ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS];
private:
};
@@ -752,8 +768,8 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// InteractionClassHandle interactionClass;
-// ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS];
+ // InteractionClassHandle interactionClass;
+ // ValueLengthPair ValueArray[MAX_ATTRIBUTES_PER_CLASS];
private:
};
@@ -911,8 +927,8 @@
/* specific Getter/Setter */
protected:
/* specific field */
-// ObjectHandle object;
-// AttributeHandle attribute;
+ // ObjectHandle object;
+ // AttributeHandle attribute;
private:
};
@@ -1157,9 +1173,9 @@
void setRegion(SpaceHandle region) {this->region=region;};
protected:
/* specific field */
-// SpaceHandle space;
-// int32_t nbExtents;
-// int32_t region;
+ // SpaceHandle space;
+ // int32_t nbExtents;
+ // int32_t region;
private:
};
@@ -1178,7 +1194,7 @@
void setRegion(SpaceHandle region) {this->region=region;};
protected:
/* specific field */
-// int32_t region;
+ // int32_t region;
private:
};
@@ -1197,7 +1213,7 @@
void setRegion(SpaceHandle region) {this->region=region;};
protected:
/* specific field */
-// int32_t region;
+ // int32_t region;
private:
};
@@ -1218,8 +1234,8 @@
void setObject(ObjectHandle object) {this->object=object;};
protected:
/* specific field */
-// int32_t region;
-// ObjectHandle object;
+ // int32_t region;
+ // ObjectHandle object;
private:
};
@@ -1344,15 +1360,15 @@
/* 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;};
+ // 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 FEDid;
+ // bool lineFollows;
std::string line;
private:
};
Index: libCERTI/NM_Classes.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Attic/NM_Classes.cc,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -b -r1.1.2.14 -r1.1.2.15
--- libCERTI/NM_Classes.cc 22 Apr 2008 08:41:08 -0000 1.1.2.14
+++ libCERTI/NM_Classes.cc 23 Apr 2008 06:23:22 -0000 1.1.2.15
@@ -488,7 +488,7 @@
this->name = "SET_TIME_REGULATING";
this->type = NetworkMessage::SET_TIME_REGULATING;
/* specific field init */
- //isDated =true;
+ regulator = false;
}
NM_Set_Time_Regulating::~NM_Set_Time_Regulating() {
}
@@ -511,7 +511,7 @@
this->name = "SET_TIME_CONSTRAINED";
this->type = NetworkMessage::SET_TIME_CONSTRAINED;
/* specific field init */
- //isDated =true;
+ constrained=false;
}
NM_Set_Time_Constrained::~NM_Set_Time_Constrained() {
}
Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.56.2.9
retrieving revision 3.56.2.10
diff -u -b -r3.56.2.9 -r3.56.2.10
--- RTIG/RTIG_processing.cc 22 Apr 2008 08:41:08 -0000 3.56.2.9
+++ RTIG/RTIG_processing.cc 23 Apr 2008 06:23:22 -0000 3.56.2.10
@@ -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_processing.cc,v 3.56.2.9 2008/04/22 08:41:08 erk Exp $
+// $Id: RTIG_processing.cc,v 3.56.2.10 2008/04/23 06:23:22 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -326,7 +326,7 @@
// ----------------------------------------------------------------------------
//! Put federate as time regulating.
void
-RTIG::processSetTimeRegulating(NetworkMessage *msg)
+RTIG::processSetTimeRegulating(NM_Set_Time_Regulating *msg)
{
if (msg->isRegulator()) {
auditServer << "ON at time " << msg->getDate();
@@ -350,8 +350,9 @@
// ----------------------------------------------------------------------------
//! Put federate as time constrained
void
-RTIG::processSetTimeConstrained(NetworkMessage *msg)
+RTIG::processSetTimeConstrained(NM_Set_Time_Constrained *msg)
{
+
if (msg->isConstrained()) {
auditServer << "ON at time " << msg->getDate();
@@ -1326,4 +1327,4 @@
}} // namespace certi/rtig
-// $Id: RTIG_processing.cc,v 3.56.2.9 2008/04/22 08:41:08 erk Exp $
+// $Id: RTIG_processing.cc,v 3.56.2.10 2008/04/23 06:23:22 erk Exp $
Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.36.2.6
retrieving revision 3.36.2.7
diff -u -b -r3.36.2.6 -r3.36.2.7
--- RTIG/RTIG.cc 20 Apr 2008 12:52:21 -0000 3.36.2.6
+++ RTIG/RTIG.cc 23 Apr 2008 06:23:23 -0000 3.36.2.7
@@ -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.cc,v 3.36.2.6 2008/04/20 12:52:21 erk Exp $
+// $Id: RTIG.cc,v 3.36.2.7 2008/04/23 06:23:23 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -204,13 +204,14 @@
D.Out(pdTrace, "SetTimeRegulating du federe %u(date=%f).",
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:
@@ -986,4 +987,4 @@
}} // namespace certi/rtig
-// $Id: RTIG.cc,v 3.36.2.6 2008/04/20 12:52:21 erk Exp $
+// $Id: RTIG.cc,v 3.36.2.7 2008/04/23 06:23:23 erk Exp $
Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.80.2.4
retrieving revision 3.80.2.5
diff -u -b -r3.80.2.4 -r3.80.2.5
--- RTIG/Federation.cc 20 Apr 2008 12:52:21 -0000 3.80.2.4
+++ RTIG/Federation.cc 23 Apr 2008 06:23:23 -0000 3.80.2.5
@@ -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: Federation.cc,v 3.80.2.4 2008/04/20 12:52:21 erk Exp $
+// $Id: Federation.cc,v 3.80.2.5 2008/04/23 06:23:23 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -532,7 +532,7 @@
msg.exception = e_NO_EXCEPTION ;
msg.federation = handle ;
msg.federate = federate_handle ;
- msg.setRegulator(true);
+ msg.regulatorOn();
msg.setDate(time);
this->broadcastAnyMessage(&msg, 0);
@@ -1482,7 +1482,7 @@
NM_Set_Time_Regulating msg ;
msg.federation = handle ;
msg.federate = federate_handle ;
- msg.setRegulator(false);
+ msg.regulatorOff();
broadcastAnyMessage(&msg, 0);
}
@@ -2281,5 +2281,5 @@
}} // namespace certi/rtig
-// $Id: Federation.cc,v 3.80.2.4 2008/04/20 12:52:21 erk Exp $
+// $Id: Federation.cc,v 3.80.2.5 2008/04/23 06:23:23 erk Exp $
Index: RTIG/RTIG.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.hh,v
retrieving revision 3.23.2.1
retrieving revision 3.23.2.2
diff -u -b -r3.23.2.1 -r3.23.2.2
--- RTIG/RTIG.hh 20 Apr 2008 12:52:21 -0000 3.23.2.1
+++ RTIG/RTIG.hh 23 Apr 2008 06:23:23 -0000 3.23.2.2
@@ -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.23.2.1 2008/04/20 12:52:21 erk Exp $
+// $Id: RTIG.hh,v 3.23.2.2 2008/04/23 06:23:23 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"
@@ -71,8 +72,8 @@
void processJoinFederation(Socket*, NetworkMessage*);
void processResignFederation(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.23.2.1 2008/04/20 12:52:21 erk Exp $
+// $Id: RTIG.hh,v 3.23.2.2 2008/04/23 06:23:23 erk Exp $
Index: RTIA/TimeManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/TimeManagement.cc,v
retrieving revision 3.29.2.4
retrieving revision 3.29.2.5
diff -u -b -r3.29.2.4 -r3.29.2.5
--- RTIA/TimeManagement.cc 20 Apr 2008 12:52:21 -0000 3.29.2.4
+++ RTIA/TimeManagement.cc 23 Apr 2008 06:23:23 -0000 3.29.2.5
@@ -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: TimeManagement.cc,v 3.29.2.4 2008/04/20 12:52:21 erk Exp $
+// $Id: TimeManagement.cc,v 3.29.2.5 2008/04/23 06:23:23 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -570,7 +570,11 @@
msg.federation = fm->_numero_federation ;
msg.federate = fm->federate ;
- msg.setConstrained(etat);
+ if (etat) {
+ msg.constrainedOn();
+ } else {
+ msg.constrainedOff();
+ }
comm->sendMessage(&msg);
@@ -609,7 +613,11 @@
msg.federation = fm->_numero_federation ;
msg.federate = fm->federate ;
- msg.setRegulator(etat);
+ if (etat) {
+ msg.regulatorOn();
+ } else {
+ msg.regulatorOff();
+ }
msg.setDate(_heure_courante + _lookahead_courant);
comm->sendMessage(&msg);
@@ -798,4 +806,4 @@
}} // namespaces
-// $Id: TimeManagement.cc,v 3.29.2.4 2008/04/20 12:52:21 erk Exp $
+// $Id: TimeManagement.cc,v 3.29.2.5 2008/04/23 06:23:23 erk Exp $
Index: RTIA/RTIA_network.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_network.cc,v
retrieving revision 3.22.2.3
retrieving revision 3.22.2.4
diff -u -b -r3.22.2.3 -r3.22.2.4
--- RTIA/RTIA_network.cc 20 Apr 2008 12:52:20 -0000 3.22.2.3
+++ RTIA/RTIA_network.cc 23 Apr 2008 06:23:24 -0000 3.22.2.4
@@ -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.2.3 2008/04/20 12:52:20 erk Exp $
+// $Id: RTIA_network.cc,v 3.22.2.4 2008/04/23 06:23:24 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
+#include "NM_Classes.hh"
#include "RTIA.hh"
#include "ObjectClassAttribute.hh"
#include "Interaction.hh"
@@ -64,7 +65,7 @@
D.Out(pdTrace,
"Receving Message from RTIG, type
NetworkMessage::SET_TIME_REGULATING.");
- if (msg->isRegulator())
+ if (static_cast<NM_Set_Time_Regulating*>(msg)->isRegulator())
tm->insert(msg->federate, msg->getDate());
else
tm->remove(msg->federate);
@@ -344,4 +345,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_network.cc,v 3.22.2.3 2008/04/20 12:52:20 erk Exp $
+// $Id: RTIA_network.cc,v 3.22.2.4 2008/04/23 06:23:24 erk Exp $