certi-cvs
[Top][All Lists]
Advanced

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

[certi-cvs] certi include/RTI/Exception.h include/RTI/Feder... [br_CERTI


From: certi-cvs
Subject: [certi-cvs] certi include/RTI/Exception.h include/RTI/Feder... [br_CERTI_SHM_NEWGEN_dev]
Date: Tue, 22 Sep 2009 09:56:46 +0000

CVSROOT:        /sources/certi
Module name:    certi
Branch:         br_CERTI_SHM_NEWGEN_dev
Changes by:     Adelantado <adele>      09/09/22 09:56:46

Modified files:
        include/RTI    : Exception.h FederateAmbassador.h LogicalTime.h 
                         LogicalTimeFactory.h NullFederateAmbassador.h 
                         Typedefs.h 
        libCERTI       : CMakeLists.txt SHM.hh SecurityLevel.hh 
                         Semaphore.hh SocketSHM.hh SocketUDP.hh 
                         SocketUN.hh 
        libRTI         : RTIambPrivateRefs.hh 
        test/utility   : CMakeLists.txt Main_SocketSHM.cc 

Log message:
        Shared memory Communication like Sockets

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI/Exception.h?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1&r2=1.1.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI/FederateAmbassador.h?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1&r2=1.1.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI/LogicalTime.h?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1&r2=1.1.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI/LogicalTimeFactory.h?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1&r2=1.1.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI/NullFederateAmbassador.h?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1&r2=1.1.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI/Typedefs.h?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1&r2=1.1.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/CMakeLists.txt?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.25.4.5&r2=1.25.4.6
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SHM.hh?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1.2.5&r2=1.1.2.6
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SecurityLevel.hh?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=3.11&r2=3.11.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Semaphore.hh?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1.2.4&r2=1.1.2.5
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketSHM.hh?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1.4.3&r2=1.1.4.4
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUDP.hh?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=3.13&r2=3.13.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUN.hh?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=3.17&r2=3.17.8.1
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambPrivateRefs.hh?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=3.8&r2=3.8.4.1
http://cvs.savannah.gnu.org/viewcvs/certi/test/utility/CMakeLists.txt?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.4.8.3&r2=1.4.8.4
http://cvs.savannah.gnu.org/viewcvs/certi/test/utility/Main_SocketSHM.cc?cvsroot=certi&only_with_tag=br_CERTI_SHM_NEWGEN_dev&r1=1.1.2.2&r2=1.1.2.3

Patches:
Index: include/RTI/Exception.h
===================================================================
RCS file: /sources/certi/certi/include/RTI/Exception.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -b -r1.1 -r1.1.8.1

Index: include/RTI/FederateAmbassador.h
===================================================================
RCS file: /sources/certi/certi/include/RTI/FederateAmbassador.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -b -r1.1 -r1.1.8.1

Index: include/RTI/LogicalTime.h
===================================================================
RCS file: /sources/certi/certi/include/RTI/LogicalTime.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -b -r1.1 -r1.1.8.1

Index: include/RTI/LogicalTimeFactory.h
===================================================================
RCS file: /sources/certi/certi/include/RTI/LogicalTimeFactory.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -b -r1.1 -r1.1.8.1

Index: include/RTI/NullFederateAmbassador.h
===================================================================
RCS file: /sources/certi/certi/include/RTI/NullFederateAmbassador.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -b -r1.1 -r1.1.8.1

Index: include/RTI/Typedefs.h
===================================================================
RCS file: /sources/certi/certi/include/RTI/Typedefs.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -b -r1.1 -r1.1.8.1

Index: libCERTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libCERTI/CMakeLists.txt,v
retrieving revision 1.25.4.5
retrieving revision 1.25.4.6
diff -u -b -r1.25.4.5 -r1.25.4.6
--- libCERTI/CMakeLists.txt     16 Sep 2009 14:31:24 -0000      1.25.4.5
+++ libCERTI/CMakeLists.txt     22 Sep 2009 09:56:45 -0000      1.25.4.6
@@ -123,13 +123,15 @@
     include_directories(${CERTI_SOURCE_DIR}/libHLA)
     ADD_DEFINITIONS(-DDEBUG)
     SET(CERTI_SHM_SRCS
-        SHM.hh)
+        SHM.hh SHMWin32.hh SHMWin32.cc)
 
     SET(CERTI_SEMAPHORE_SRCS
-        Semaphore.hh)
+        Semaphore.hh SemaphoreWin32.hh SemaphoreWin32.cc)
 
     SET(CERTI_SOCKET_SHM_SRC
-        SocketSHM.cc SocketSHM.hh)
+        SocketSHM.cc SocketSHM.hh
+        SocketSHMWin32.cc SocketSHMWin32.hh
+        )
 
     LIST(APPEND CERTI_SOCKET_SRCS ${CERTI_SHM_SRCS} ${CERTI_SEMAPHORE_SRCS} 
${CERTI_SOCKET_SHM_SRC})
 else(WIN32)

Index: libCERTI/SHM.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Attic/SHM.hh,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -b -r1.1.2.5 -r1.1.2.6
--- libCERTI/SHM.hh     4 Sep 2009 08:00:19 -0000       1.1.2.5
+++ libCERTI/SHM.hh     22 Sep 2009 09:56:45 -0000      1.1.2.6
@@ -2,6 +2,7 @@
 #define SHM_H
 
 #include <string>
+#include "certi.hh"
 
 /**
  * A Shared Memory class.
@@ -9,7 +10,7 @@
  * segment. A shared memory segment is identified by its name and
  * has a size and a creator process.
  */
-class SHM {
+class CERTI_EXPORT SHM {
 protected :
        std::string _Name ;
        int  _Size ;

Index: libCERTI/SecurityLevel.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SecurityLevel.hh,v
retrieving revision 3.11
retrieving revision 3.11.8.1
diff -u -b -r3.11 -r3.11.8.1
--- libCERTI/SecurityLevel.hh   7 Dec 2008 20:16:15 -0000       3.11
+++ libCERTI/SecurityLevel.hh   22 Sep 2009 09:56:45 -0000      3.11.8.1
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: SecurityLevel.hh,v 3.11 2008/12/07 20:16:15 gotthardp Exp $
+// $Id: SecurityLevel.hh,v 3.11.8.1 2009/09/22 09:56:45 adele Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_SECURITY_LEVEL_HH
@@ -69,4 +69,4 @@
 
 #endif // _CERTI_SECURITY_LEVEL_HH
 
-// $Id: SecurityLevel.hh,v 3.11 2008/12/07 20:16:15 gotthardp Exp $
+// $Id: SecurityLevel.hh,v 3.11.8.1 2009/09/22 09:56:45 adele Exp $

Index: libCERTI/Semaphore.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Attic/Semaphore.hh,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -b -r1.1.2.4 -r1.1.2.5
--- libCERTI/Semaphore.hh       4 Sep 2009 08:00:19 -0000       1.1.2.4
+++ libCERTI/Semaphore.hh       22 Sep 2009 09:56:45 -0000      1.1.2.5
@@ -1,10 +1,11 @@
 #ifndef SEMAPHORE_H
 #define SEMAPHORE_H
 
+#include "certi.hh"
 // Systems includes
 #include <string>
 
-class Semaphore {
+class CERTI_EXPORT Semaphore {
 
 protected:
 

Index: libCERTI/SocketSHM.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Attic/SocketSHM.hh,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -b -r1.1.4.3 -r1.1.4.4
--- libCERTI/SocketSHM.hh       4 Sep 2009 08:53:23 -0000       1.1.4.3
+++ libCERTI/SocketSHM.hh       22 Sep 2009 09:56:45 -0000      1.1.4.4
@@ -4,10 +4,11 @@
 #include <iostream>
 
 // Specifics includes
+#include "certi.hh"
 #include "Semaphore.hh"
 #include "SHM.hh"
 
-class SocketSHM {
+class CERTI_EXPORT SocketSHM {
 public :
     // Typedef Side
     typedef enum{SHM_SC,SHM_CS} SHM_SIDE_t ; 

Index: libCERTI/SocketUDP.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUDP.hh,v
retrieving revision 3.13
retrieving revision 3.13.8.1
diff -u -b -r3.13 -r3.13.8.1

Index: libCERTI/SocketUN.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUN.hh,v
retrieving revision 3.17
retrieving revision 3.17.8.1
diff -u -b -r3.17 -r3.17.8.1

Index: libRTI/RTIambPrivateRefs.hh
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambPrivateRefs.hh,v
retrieving revision 3.8
retrieving revision 3.8.4.1
diff -u -b -r3.8 -r3.8.4.1
--- libRTI/RTIambPrivateRefs.hh 2 Apr 2009 19:58:07 -0000       3.8
+++ libRTI/RTIambPrivateRefs.hh 22 Sep 2009 09:56:45 -0000      3.8.4.1
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: RTIambPrivateRefs.hh,v 3.8 2009/04/02 19:58:07 erk Exp $
+// $Id: RTIambPrivateRefs.hh,v 3.8.4.1 2009/09/22 09:56:45 adele Exp $
 // ----------------------------------------------------------------------------
 
 #include "RTI.hh"
@@ -60,4 +60,4 @@
     MessageBuffer msgBufSend,msgBufReceive ;
 };
 
-// $Id: RTIambPrivateRefs.hh,v 3.8 2009/04/02 19:58:07 erk Exp $
+// $Id: RTIambPrivateRefs.hh,v 3.8.4.1 2009/09/22 09:56:45 adele Exp $

Index: test/utility/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/test/utility/CMakeLists.txt,v
retrieving revision 1.4.8.3
retrieving revision 1.4.8.4
diff -u -b -r1.4.8.3 -r1.4.8.4
--- test/utility/CMakeLists.txt 16 Sep 2009 14:31:24 -0000      1.4.8.3
+++ test/utility/CMakeLists.txt 22 Sep 2009 09:56:46 -0000      1.4.8.4
@@ -34,6 +34,8 @@
     TARGET_LINK_LIBRARIES(CertiProcessus_B CERTI rt)
 ENDIF(WIN32)
 
+SET_TARGET_PROPERTIES(CertiProcessus_B PROPERTIES COMPILE_FLAGS -DSIDE_CS)
+
 INSTALL(TARGETS CertiProcessus_A CertiProcessus_B
     RUNTIME DESTINATION bin
     LIBRARY DESTINATION lib

Index: test/utility/Main_SocketSHM.cc
===================================================================
RCS file: /sources/certi/certi/test/utility/Attic/Main_SocketSHM.cc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- test/utility/Main_SocketSHM.cc      16 Sep 2009 14:31:24 -0000      1.1.2.2
+++ test/utility/Main_SocketSHM.cc      22 Sep 2009 09:56:46 -0000      1.1.2.3
@@ -1,6 +1,6 @@
 // 
*****************************************************************************
 // To Compile without cmake :
-// g++ Main_SocketSHM_A.cc SocketSHMPosix.cc SemaphorePosix.cc 
SocketSHMSysV.cc SHMSysV.cc SemaphoreSysV.cc -o Processus_A -lrt
+// g++ Main_SocketSHM_A.cc SocketSHMPosix.cc SemaphorePosix.cc 
SemaphoreWin32.cc SocketSHMSysV.cc SocketSHMWin32.cc SHMSysV.cc 
SemaphoreSysV.cc SemaphoreWin32.cc -o Processus_A -lrt
 // 
*****************************************************************************
 // For SysV use :
 // Before Use : --> #ipcs
@@ -10,18 +10,18 @@
 
 // Systems includes
 #include <limits>
-
+#include "SocketSHM.hh"
 // Specifics includes
+
 #ifdef _WIN32
-// FIXME Martin code win32
-//#include "SocketSHMWin32.hh"
-#include "SocketSHM.hh"
-#include <windows.h>
-#include <process.h>
+  #include <windows.h>
+  #include <process.h>
+  #include "SocketSHMWin32.hh"
 #else
-#include "SocketSHMPosix.hh"
-#include "SocketSHMSysV.hh"
+  #include "SocketSHMPosix.hh"
+  #include "SocketSHMSysV.hh"
 #endif
+
 #include "SharedStruct.hh"
 
 
@@ -43,8 +43,10 @@
 
 #ifdef SIDE_SC
 SocketSHM::SHM_SIDE_t Socket_Side = SocketSHM::SHM_SC ; // which side am I?
+std::cout << "I am side : " << Socket_Side << std::endl ;
 #else
 SocketSHM::SHM_SIDE_t Socket_Side = SocketSHM::SHM_CS ; // which side am I?
+std::cout << "I am side : " << Socket_Side << std::endl ;
 #endif
 
 std::string command;
@@ -62,8 +64,7 @@
 // ************
 
 #ifdef _WIN32
-// FIXME Martin code win32
-//SocketSHMWin32 Socket_Win32(NAME_AB,Socket_Side,size) ;
+SocketSHMWin32 Socket_Win32_AB(NAME_AB,Socket_Side,size) ;
 #else
 // Posix Socket SHM
 SocketSHMPosix Socket_Posix_AB(NAME_AB,Socket_Side,size) ;
@@ -84,12 +85,12 @@
 std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
 
 #ifdef _WIN32
-//Socket_Win32.connect();
+Socket_Win32_AB.Connect();
 #else
 Socket_Posix_AB.Connect() ; // Connect to created Semaphores
 Socket_SysV_AB.Connect() ; // Connect to created Semaphores
 #endif
-
+#ifndef _WIN32
 // Wainting for User Command n2
 std::cout << "*******************************************************" << 
std::endl ;
 std::cout << "*********** END OF INITIALIZATION PHASE 2 : ***********" << 
std::endl ;
@@ -98,9 +99,10 @@
 std::cout << "*******************************************************" << 
std::endl ;
 std::cin >> command;
 std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
+#endif
 
 #ifdef _WIN32
-//Socket_Win32.Open() ;
+Socket_Win32_AB.Open() ;
 #else
 // Open the Socket
 if (command=="Posix") Socket_Posix_AB.Open() ;
@@ -109,17 +111,20 @@
 
 // Wainting for User Command n3
 std::cout << "************************************************************" << 
std::endl ;
+#ifdef _WIN32
+std::cout << "******* END OF INITIALIZATION PHASE 2 : ********************" << 
std::endl ;
+#else
 std::cout << "******* END OF INITIALIZATION PHASE 3 : ********************" << 
std::endl ;
+#endif
 std::cout << "****** Click \"ENTER\" to RunInter Process Exchange... *****" << 
std::endl ;
 std::cout << "************************************************************" << 
std::endl ;
 std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
 
-
 #ifdef SIDE_SC
 // Send to B For the First Time (INITIALIZE)
 // Send to B
 #ifdef _WIN32
-//Socket_Win32.Send(&Data_Write);
+Socket_Win32_AB.Send(&Data_Write);
 #else
 if (command=="Posix") Socket_Posix_AB.Send(&Data_Write) ;
 if (command=="SysV") Socket_SysV_AB.Send(&Data_Write) ;
@@ -133,7 +138,7 @@
     /************* RECEIVING **************/
     /**************************************/
     #ifdef _WIN32
-    // Socket_Win32.Receive(&Data_Read) ;
+     Socket_Win32_AB.Receive(&Data_Read) ;
     #else
     // Read from B
     if (command=="Posix") Socket_Posix_AB.Receive(&Data_Read) ;
@@ -164,7 +169,7 @@
     /**************************************/
     // Send to B
     #ifdef _WIN32
-    // Socket_Win32.Send(&Data_Write) ;
+     Socket_Win32_AB.Send(&Data_Write) ;
     #else
     if (command=="Posix") Socket_Posix_AB.Send(&Data_Write) ;
     if (command=="SysV") Socket_SysV_AB.Send(&Data_Write) ;
@@ -184,10 +189,9 @@
 
 // Close the socket
 #ifdef _WIN32
-// Socket_Win32.Close();
+Socket_Win32_AB.Close();
 #else
 if (command=="Posix") Socket_Posix_AB.Close() ;
 if (command=="SysV") Socket_SysV_AB.Close() ;
 #endif
-
 } // End of Main Program




reply via email to

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