Browse Source

add robot simulator

pehladik 4 years ago
parent
commit
a7eaa150df
32 changed files with 1202 additions and 268 deletions
  1. 3
    1
      .gitignore
  2. BIN
      software/raspberry/superviseur-robot/dist/Debug/GNU-Linux/superviseur
  3. BIN
      software/raspberry/superviseur-robot/dist/Debug/GNU-Linux/superviseur-robot
  4. BIN
      software/raspberry/superviseur-robot/dist/Debug__Pthread_/GNU-Linux/superviseur-robot
  5. BIN
      software/raspberry/superviseur-robot/dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot
  6. 46
    0
      software/raspberry/superviseur-robot/lib/comrobot.cpp
  7. 9
    9
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__PC_.mk
  8. 0
    125
      software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk
  9. 1
    1
      software/raspberry/superviseur-robot/nbproject/Makefile-impl.mk
  10. 0
    8
      software/raspberry/superviseur-robot/nbproject/Makefile-variables.mk
  11. 2
    72
      software/raspberry/superviseur-robot/nbproject/configurations.xml
  12. 0
    1
      software/raspberry/superviseur-robot/nbproject/private/Makefile-variables.mk
  13. 0
    33
      software/raspberry/superviseur-robot/nbproject/private/configurations.xml
  14. 6
    7
      software/raspberry/superviseur-robot/nbproject/private/private.xml
  15. 0
    4
      software/raspberry/superviseur-robot/nbproject/project.xml
  16. 5
    0
      software/simulateur/.dep.inc
  17. 128
    0
      software/simulateur/Makefile
  18. 147
    0
      software/simulateur/main.cpp
  19. 83
    0
      software/simulateur/nbproject/Makefile-Debug.mk
  20. 83
    0
      software/simulateur/nbproject/Makefile-Release.mk
  21. 133
    0
      software/simulateur/nbproject/Makefile-impl.mk
  22. 35
    0
      software/simulateur/nbproject/Makefile-variables.mk
  23. 7
    7
      software/simulateur/nbproject/Package-Debug.bash
  24. 76
    0
      software/simulateur/nbproject/Package-Release.bash
  25. 66
    0
      software/simulateur/nbproject/configurations.xml
  26. 7
    0
      software/simulateur/nbproject/private/Makefile-variables.mk
  27. 75
    0
      software/simulateur/nbproject/private/c_standard_headers_indexer.c
  28. 72
    0
      software/simulateur/nbproject/private/configurations.xml
  29. 135
    0
      software/simulateur/nbproject/private/cpp_standard_headers_indexer.cpp
  30. 42
    0
      software/simulateur/nbproject/private/launcher.properties
  31. 13
    0
      software/simulateur/nbproject/private/private.xml
  32. 28
    0
      software/simulateur/nbproject/project.xml

+ 3
- 1
.gitignore View File

@@ -64,4 +64,6 @@ GUI
64 64
 
65 65
 /software/raspberry/superviseur-robot/superviseur/dist/
66 66
 /software/raspberry/testeur/testeur/build/
67
-/software/raspberry/testeur/testeur/dist/
67
+/software/raspberry/testeur/testeur/dist/
68
+/software/simulateur/build/
69
+/software/simulateur/dist/

BIN
software/raspberry/superviseur-robot/dist/Debug/GNU-Linux/superviseur View File


BIN
software/raspberry/superviseur-robot/dist/Debug/GNU-Linux/superviseur-robot View File


BIN
software/raspberry/superviseur-robot/dist/Debug__Pthread_/GNU-Linux/superviseur-robot View File


BIN
software/raspberry/superviseur-robot/dist/Debug__Pthread__RPI/GNU-Linux/superviseur-robot View File


+ 46
- 0
software/raspberry/superviseur-robot/lib/comrobot.cpp View File

@@ -26,6 +26,14 @@
26 26
 #include <string>
27 27
 #include <stdexcept>
28 28
 
29
+#ifdef __SIMULATION__
30
+#include <sys/socket.h>
31
+#include <netinet/in.h>
32
+#include <arpa/inet.h>
33
+int sock = 0;
34
+#define PORT 6699
35
+#endif
36
+
29 37
 #ifdef __FOR_PC__
30 38
 #define USART_FILENAME "/dev/ttyUSB0"
31 39
 #else
@@ -71,6 +79,33 @@ int ComRobot::Open() {
71 79
 int ComRobot::Open(string usart) {
72 80
     struct termios options;
73 81
 
82
+#ifdef __SIMULATION__
83
+    
84
+    struct sockaddr_in serv_addr;
85
+    if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
86
+        printf("\n Socket creation error \n");
87
+        return -1;
88
+    }
89
+
90
+    serv_addr.sin_family = AF_INET;
91
+    serv_addr.sin_port = htons(PORT);
92
+
93
+    // Convert IPv4 and IPv6 addresses from text to binary form 
94
+    if (inet_pton(AF_INET, "127.0.0.1", &serv_addr.sin_addr) <= 0) {
95
+        printf("\nInvalid address/ Address not supported \n");
96
+        return -1;
97
+    }
98
+
99
+    if (connect(sock, (struct sockaddr *) &serv_addr, sizeof (serv_addr)) < 0) {
100
+        return -1;
101
+    }
102
+    /*send(sock , hello , strlen(hello) , 0 ); 
103
+    printf("Hello message sent\n"); 
104
+    valread = read( sock , buffer, 1024); 
105
+    printf("%s\n",buffer ); */
106
+    return 1;
107
+#else
108
+
74 109
     fd = open(usart.c_str(), O_RDWR | O_NOCTTY /*| O_NDELAY*/); //Open in blocking read/write mode
75 110
     if (fd == -1) {
76 111
         cerr << "[" << __PRETTY_FUNCTION__ << "] Unable to open UART (" << usart << "). Ensure it is not in use by another application" << endl << flush;
@@ -88,6 +123,7 @@ int ComRobot::Open(string usart) {
88 123
     }
89 124
 
90 125
     return fd;
126
+#endif
91 127
 }
92 128
 
93 129
 /**
@@ -115,6 +151,15 @@ Message *ComRobot::Write(Message* msg) {
115 151
         Write_Pre();
116 152
 
117 153
         s = MessageToString(msg);
154
+#ifdef __SIMULATION__
155
+
156
+        char buffer[1024] = {0};
157
+        cout << "[" <<__PRETTY_FUNCTION__<<"] Send command: "<<s<<endl<<flush;
158
+        send(sock, s.c_str(), s.length(), 0);
159
+        int valread = read(sock, buffer, 1024);
160
+        msgAnswer = new Message(MESSAGE_ANSWER_ACK);
161
+        printf("%s\n", buffer);
162
+#else       
118 163
         AddChecksum(s);
119 164
 
120 165
         //cout << "[" <<__PRETTY_FUNCTION__<<"] Send command: "<<s<<endl<<flush;
@@ -143,6 +188,7 @@ Message *ComRobot::Write(Message* msg) {
143 188
                 }
144 189
             }
145 190
         }
191
+#endif
146 192
     } else {
147 193
         cerr << __PRETTY_FUNCTION__ << ": Com port not open" << endl << flush;
148 194
         throw std::runtime_error{"Com port not open"};

+ 9
- 9
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__PC_.mk View File

@@ -67,47 +67,47 @@ LDLIBSOPTIONS=`pkg-config --libs opencv`
67 67
 
68 68
 ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
69 69
 	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
70
-	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt
70
+	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt -Wl,--rpath /usr/xenomai/lib
71 71
 
72 72
 ${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
73 73
 	${MKDIR} -p ${OBJECTDIR}/lib/base64
74 74
 	${RM} "$@.d"
75
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
75
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
76 76
 
77 77
 ${OBJECTDIR}/lib/camera.o: lib/camera.cpp
78 78
 	${MKDIR} -p ${OBJECTDIR}/lib
79 79
 	${RM} "$@.d"
80
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
80
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
81 81
 
82 82
 ${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
83 83
 	${MKDIR} -p ${OBJECTDIR}/lib
84 84
 	${RM} "$@.d"
85
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
85
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
86 86
 
87 87
 ${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
88 88
 	${MKDIR} -p ${OBJECTDIR}/lib
89 89
 	${RM} "$@.d"
90
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
90
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
91 91
 
92 92
 ${OBJECTDIR}/lib/img.o: lib/img.cpp
93 93
 	${MKDIR} -p ${OBJECTDIR}/lib
94 94
 	${RM} "$@.d"
95
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
95
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
96 96
 
97 97
 ${OBJECTDIR}/lib/messages.o: lib/messages.cpp
98 98
 	${MKDIR} -p ${OBJECTDIR}/lib
99 99
 	${RM} "$@.d"
100
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
100
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
101 101
 
102 102
 ${OBJECTDIR}/main.o: main.cpp
103 103
 	${MKDIR} -p ${OBJECTDIR}
104 104
 	${RM} "$@.d"
105
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
105
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
106 106
 
107 107
 ${OBJECTDIR}/tasks.o: tasks.cpp
108 108
 	${MKDIR} -p ${OBJECTDIR}
109 109
 	${RM} "$@.d"
110
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
110
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__FOR_PC__ -D__SIMULATION__ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
111 111
 
112 112
 # Subprojects
113 113
 .build-subprojects:

+ 0
- 125
software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk View File

@@ -1,125 +0,0 @@
1
-#
2
-# Generated Makefile - do not edit!
3
-#
4
-# Edit the Makefile in the project folder instead (../Makefile). Each target
5
-# has a -pre and a -post target defined where you can add customized code.
6
-#
7
-# This makefile implements configuration specific macros and targets.
8
-
9
-
10
-# Environment
11
-MKDIR=mkdir
12
-CP=cp
13
-GREP=grep
14
-NM=nm
15
-CCADMIN=CCadmin
16
-RANLIB=ranlib
17
-CC=gcc
18
-CCC=g++
19
-CXX=g++
20
-FC=gfortran
21
-AS=as
22
-
23
-# Macros
24
-CND_PLATFORM=GNU-Linux
25
-CND_DLIB_EXT=so
26
-CND_CONF=Debug__RPI_
27
-CND_DISTDIR=dist
28
-CND_BUILDDIR=build
29
-
30
-# Include project Makefile
31
-include ./Makefile
32
-
33
-# Object Directory
34
-OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35
-
36
-# Object Files
37
-OBJECTFILES= \
38
-	${OBJECTDIR}/lib/base64/base64.o \
39
-	${OBJECTDIR}/lib/camera.o \
40
-	${OBJECTDIR}/lib/commonitor.o \
41
-	${OBJECTDIR}/lib/comrobot.o \
42
-	${OBJECTDIR}/lib/img.o \
43
-	${OBJECTDIR}/lib/messages.o \
44
-	${OBJECTDIR}/main.o \
45
-	${OBJECTDIR}/tasks.o
46
-
47
-
48
-# C Compiler Flags
49
-CFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy
50
-
51
-# CC Compiler Flags
52
-CCFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -Wno-pmf-conversions -std=gnu++11
53
-CXXFLAGS=-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -Wno-pmf-conversions -std=gnu++11
54
-
55
-# Fortran Compiler Flags
56
-FFLAGS=
57
-
58
-# Assembler Flags
59
-ASFLAGS=
60
-
61
-# Link Libraries and Options
62
-LDLIBSOPTIONS=`pkg-config --libs opencv` -lraspicam_cv -lraspicam  
63
-
64
-# Build Targets
65
-.build-conf: ${BUILD_SUBPROJECTS}
66
-	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
67
-
68
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot: ${OBJECTFILES}
69
-	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
70
-	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot ${OBJECTFILES} ${LDLIBSOPTIONS} -Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt
71
-
72
-${OBJECTDIR}/lib/base64/base64.o: lib/base64/base64.cpp
73
-	${MKDIR} -p ${OBJECTDIR}/lib/base64
74
-	${RM} "$@.d"
75
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/base64/base64.o lib/base64/base64.cpp
76
-
77
-${OBJECTDIR}/lib/camera.o: lib/camera.cpp
78
-	${MKDIR} -p ${OBJECTDIR}/lib
79
-	${RM} "$@.d"
80
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/camera.o lib/camera.cpp
81
-
82
-${OBJECTDIR}/lib/commonitor.o: lib/commonitor.cpp
83
-	${MKDIR} -p ${OBJECTDIR}/lib
84
-	${RM} "$@.d"
85
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/commonitor.o lib/commonitor.cpp
86
-
87
-${OBJECTDIR}/lib/comrobot.o: lib/comrobot.cpp
88
-	${MKDIR} -p ${OBJECTDIR}/lib
89
-	${RM} "$@.d"
90
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/comrobot.o lib/comrobot.cpp
91
-
92
-${OBJECTDIR}/lib/img.o: lib/img.cpp
93
-	${MKDIR} -p ${OBJECTDIR}/lib
94
-	${RM} "$@.d"
95
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/img.o lib/img.cpp
96
-
97
-${OBJECTDIR}/lib/messages.o: lib/messages.cpp
98
-	${MKDIR} -p ${OBJECTDIR}/lib
99
-	${RM} "$@.d"
100
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/lib/messages.o lib/messages.cpp
101
-
102
-${OBJECTDIR}/main.o: main.cpp
103
-	${MKDIR} -p ${OBJECTDIR}
104
-	${RM} "$@.d"
105
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
106
-
107
-${OBJECTDIR}/tasks.o: tasks.cpp
108
-	${MKDIR} -p ${OBJECTDIR}
109
-	${RM} "$@.d"
110
-	$(COMPILE.cc) -g -D_WITH_TRACE_ -D__WITH_ARUCO__ -I./ -I./lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/tasks.o tasks.cpp
111
-
112
-# Subprojects
113
-.build-subprojects:
114
-
115
-# Clean Targets
116
-.clean-conf: ${CLEAN_SUBPROJECTS}
117
-	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
118
-
119
-# Subprojects
120
-.clean-subprojects:
121
-
122
-# Enable dependency checking
123
-.dep.inc: .depcheck-impl
124
-
125
-include .dep.inc

+ 1
- 1
software/raspberry/superviseur-robot/nbproject/Makefile-impl.mk View File

@@ -31,7 +31,7 @@ DEFAULTCONF=Debug__PC_
31 31
 CONF=${DEFAULTCONF}
32 32
 
33 33
 # All Configurations
34
-ALLCONFS=Debug__PC_ Debug__RPI_ 
34
+ALLCONFS=Debug__PC_ 
35 35
 
36 36
 
37 37
 # build

+ 0
- 8
software/raspberry/superviseur-robot/nbproject/Makefile-variables.mk View File

@@ -14,14 +14,6 @@ CND_ARTIFACT_PATH_Debug__PC_=dist/Debug__PC_/GNU-Linux/superviseur-robot
14 14
 CND_PACKAGE_DIR_Debug__PC_=dist/Debug__PC_/GNU-Linux/package
15 15
 CND_PACKAGE_NAME_Debug__PC_=superviseur-robot.tar
16 16
 CND_PACKAGE_PATH_Debug__PC_=dist/Debug__PC_/GNU-Linux/package/superviseur-robot.tar
17
-# Debug__RPI_ configuration
18
-CND_PLATFORM_Debug__RPI_=GNU-Linux
19
-CND_ARTIFACT_DIR_Debug__RPI_=dist/Debug__RPI_/GNU-Linux
20
-CND_ARTIFACT_NAME_Debug__RPI_=superviseur-robot
21
-CND_ARTIFACT_PATH_Debug__RPI_=dist/Debug__RPI_/GNU-Linux/superviseur-robot
22
-CND_PACKAGE_DIR_Debug__RPI_=dist/Debug__RPI_/GNU-Linux/package
23
-CND_PACKAGE_NAME_Debug__RPI_=superviseur-robot.tar
24
-CND_PACKAGE_PATH_Debug__RPI_=dist/Debug__RPI_/GNU-Linux/package/superviseur-robot.tar
25 17
 #
26 18
 # include compiler specific variables
27 19
 #

+ 2
- 72
software/raspberry/superviseur-robot/nbproject/configurations.xml View File

@@ -71,6 +71,7 @@
71 71
           <preprocessorList>
72 72
             <Elem>_WITH_TRACE_</Elem>
73 73
             <Elem>__FOR_PC__</Elem>
74
+            <Elem>__SIMULATION__</Elem>
74 75
             <Elem>__WITH_ARUCO__</Elem>
75 76
           </preprocessorList>
76 77
         </ccTool>
@@ -78,78 +79,7 @@
78 79
           <linkerLibItems>
79 80
             <linkerOptionItem>`pkg-config --libs opencv`</linkerOptionItem>
80 81
           </linkerLibItems>
81
-          <commandLine>-Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt</commandLine>
82
-        </linkerTool>
83
-      </compileType>
84
-      <item path="./gdbsudo.sh" ex="false" tool="3" flavor2="0">
85
-      </item>
86
-      <item path="./lib/base64/base64.cpp" ex="false" tool="1" flavor2="0">
87
-      </item>
88
-      <item path="./lib/base64/base64.h" ex="false" tool="3" flavor2="0">
89
-      </item>
90
-      <item path="./lib/camera.cpp" ex="false" tool="1" flavor2="0">
91
-      </item>
92
-      <item path="./lib/camera.h" ex="false" tool="3" flavor2="0">
93
-      </item>
94
-      <item path="./lib/commonitor.cpp" ex="false" tool="1" flavor2="0">
95
-      </item>
96
-      <item path="./lib/commonitor.h" ex="false" tool="3" flavor2="0">
97
-      </item>
98
-      <item path="./lib/comrobot.cpp" ex="false" tool="1" flavor2="0">
99
-      </item>
100
-      <item path="./lib/comrobot.h" ex="false" tool="3" flavor2="0">
101
-      </item>
102
-      <item path="./lib/img.cpp" ex="false" tool="1" flavor2="0">
103
-      </item>
104
-      <item path="./lib/img.h" ex="false" tool="3" flavor2="0">
105
-      </item>
106
-      <item path="./lib/messages.cpp" ex="false" tool="1" flavor2="0">
107
-      </item>
108
-      <item path="./lib/messages.h" ex="false" tool="3" flavor2="0">
109
-      </item>
110
-      <item path="./main.cpp" ex="false" tool="1" flavor2="0">
111
-      </item>
112
-      <item path="./tasks.cpp" ex="false" tool="1" flavor2="0">
113
-      </item>
114
-      <item path="./tasks.h" ex="false" tool="3" flavor2="0">
115
-      </item>
116
-    </conf>
117
-    <conf name="Debug__RPI_" type="1">
118
-      <toolsSet>
119
-        <compilerSet>GNU|GNU</compilerSet>
120
-        <dependencyChecking>true</dependencyChecking>
121
-        <rebuildPropChanged>false</rebuildPropChanged>
122
-      </toolsSet>
123
-      <compileType>
124
-        <cTool>
125
-          <incDir>
126
-            <pElem>./</pElem>
127
-            <pElem>./lib</pElem>
128
-            <pElem>/usr/xenomai/include</pElem>
129
-            <pElem>/usr/xenomai/include/mercury</pElem>
130
-          </incDir>
131
-          <commandLine>-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy</commandLine>
132
-        </cTool>
133
-        <ccTool>
134
-          <incDir>
135
-            <pElem>./</pElem>
136
-            <pElem>./lib</pElem>
137
-            <pElem>/usr/xenomai/include</pElem>
138
-            <pElem>/usr/xenomai/include/mercury</pElem>
139
-          </incDir>
140
-          <commandLine>-I/usr/xenomai/include/mercury -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__MERCURY__ -I/usr/xenomai/include/alchemy -Wno-pmf-conversions -std=gnu++11</commandLine>
141
-          <preprocessorList>
142
-            <Elem>_WITH_TRACE_</Elem>
143
-            <Elem>__WITH_ARUCO__</Elem>
144
-          </preprocessorList>
145
-        </ccTool>
146
-        <linkerTool>
147
-          <linkerLibItems>
148
-            <linkerOptionItem>`pkg-config --libs opencv`</linkerOptionItem>
149
-            <linkerLibLibItem>raspicam_cv</linkerLibLibItem>
150
-            <linkerLibLibItem>raspicam</linkerLibLibItem>
151
-          </linkerLibItems>
152
-          <commandLine>-Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt</commandLine>
82
+          <commandLine>-Wl,--no-as-needed -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lmercury -lpthread -lrt -Wl,--rpath /usr/xenomai/lib</commandLine>
153 83
         </linkerTool>
154 84
       </compileType>
155 85
       <item path="./gdbsudo.sh" ex="false" tool="3" flavor2="0">

+ 0
- 1
software/raspberry/superviseur-robot/nbproject/private/Makefile-variables.mk View File

@@ -4,4 +4,3 @@
4 4
 # NOCDDL
5 5
 #
6 6
 # Debug__PC_ configuration
7
-# Debug__RPI_ configuration

+ 0
- 33
software/raspberry/superviseur-robot/nbproject/private/configurations.xml View File

@@ -39,38 +39,5 @@
39 39
         </environment>
40 40
       </runprofile>
41 41
     </conf>
42
-    <conf name="Debug__RPI_" type="1">
43
-      <toolsSet>
44
-        <developmentServer>pi@10.105.1.08:22</developmentServer>
45
-        <platform>2</platform>
46
-      </toolsSet>
47
-      <dbx_gdbdebugger version="1">
48
-        <gdb_pathmaps>
49
-        </gdb_pathmaps>
50
-        <gdb_interceptlist>
51
-          <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
52
-        </gdb_interceptlist>
53
-        <gdb_options>
54
-          <DebugOptions>
55
-          </DebugOptions>
56
-        </gdb_options>
57
-        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
58
-      </dbx_gdbdebugger>
59
-      <nativedebugger version="1">
60
-        <engine>gdb</engine>
61
-      </nativedebugger>
62
-      <runprofile version="9">
63
-        <runcommandpicklist>
64
-          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
65
-        </runcommandpicklist>
66
-        <runcommand>"${OUTPUT_PATH}"</runcommand>
67
-        <rundir></rundir>
68
-        <buildfirst>true</buildfirst>
69
-        <terminal-type>0</terminal-type>
70
-        <remove-instrumentation>0</remove-instrumentation>
71
-        <environment>
72
-        </environment>
73
-      </runprofile>
74
-    </conf>
75 42
   </confs>
76 43
 </configurationDescriptor>

+ 6
- 7
software/raspberry/superviseur-robot/nbproject/private/private.xml View File

@@ -2,17 +2,16 @@
2 2
 <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3 3
     <data xmlns="http://www.netbeans.org/ns/make-project-private/1">
4 4
         <activeConfTypeElem>1</activeConfTypeElem>
5
-        <activeConfIndexElem>1</activeConfIndexElem>
5
+        <activeConfIndexElem>0</activeConfIndexElem>
6 6
     </data>
7 7
     <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
8 8
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
9 9
         <group>
10
-            <file>file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/camera.h</file>
11
-            <file>file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/messages.cpp</file>
12
-            <file>file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/tasks.h</file>
13
-            <file>file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/camera.cpp</file>
14
-            <file>file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/tasks.cpp</file>
15
-            <file>file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/messages.h</file>
10
+            <file>file:/home/etud/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp</file>
11
+            <file>file:/home/etud/dumber/software/raspberry/superviseur-robot/lib/messages.cpp</file>
12
+            <file>file:/home/etud/dumber/software/raspberry/superviseur-robot/tasks.cpp</file>
13
+            <file>file:/home/etud/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp</file>
14
+            <file>file:/home/etud/dumber/software/raspberry/superviseur-robot/lib/commonitor.h</file>
16 15
         </group>
17 16
     </open-files>
18 17
 </project-private>

+ 0
- 4
software/raspberry/superviseur-robot/nbproject/project.xml View File

@@ -17,10 +17,6 @@
17 17
                     <name>Debug__PC_</name>
18 18
                     <type>1</type>
19 19
                 </confElem>
20
-                <confElem>
21
-                    <name>Debug__RPI_</name>
22
-                    <type>1</type>
23
-                </confElem>
24 20
             </confList>
25 21
             <formatting>
26 22
                 <project-formatting-style>false</project-formatting-style>

+ 5
- 0
software/simulateur/.dep.inc View File

@@ -0,0 +1,5 @@
1
+# This code depends on make tool being used
2
+DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
3
+ifneq (${DEPFILES},)
4
+include ${DEPFILES}
5
+endif

+ 128
- 0
software/simulateur/Makefile View File

@@ -0,0 +1,128 @@
1
+#
2
+#  There exist several targets which are by default empty and which can be 
3
+#  used for execution of your targets. These targets are usually executed 
4
+#  before and after some main targets. They are: 
5
+#
6
+#     .build-pre:              called before 'build' target
7
+#     .build-post:             called after 'build' target
8
+#     .clean-pre:              called before 'clean' target
9
+#     .clean-post:             called after 'clean' target
10
+#     .clobber-pre:            called before 'clobber' target
11
+#     .clobber-post:           called after 'clobber' target
12
+#     .all-pre:                called before 'all' target
13
+#     .all-post:               called after 'all' target
14
+#     .help-pre:               called before 'help' target
15
+#     .help-post:              called after 'help' target
16
+#
17
+#  Targets beginning with '.' are not intended to be called on their own.
18
+#
19
+#  Main targets can be executed directly, and they are:
20
+#  
21
+#     build                    build a specific configuration
22
+#     clean                    remove built files from a configuration
23
+#     clobber                  remove all built files
24
+#     all                      build all configurations
25
+#     help                     print help mesage
26
+#  
27
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
28
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
29
+#
30
+#  Available make variables:
31
+#
32
+#     CND_BASEDIR                base directory for relative paths
33
+#     CND_DISTDIR                default top distribution directory (build artifacts)
34
+#     CND_BUILDDIR               default top build directory (object files, ...)
35
+#     CONF                       name of current configuration
36
+#     CND_PLATFORM_${CONF}       platform name (current configuration)
37
+#     CND_ARTIFACT_DIR_${CONF}   directory of build artifact (current configuration)
38
+#     CND_ARTIFACT_NAME_${CONF}  name of build artifact (current configuration)
39
+#     CND_ARTIFACT_PATH_${CONF}  path to build artifact (current configuration)
40
+#     CND_PACKAGE_DIR_${CONF}    directory of package (current configuration)
41
+#     CND_PACKAGE_NAME_${CONF}   name of package (current configuration)
42
+#     CND_PACKAGE_PATH_${CONF}   path to package (current configuration)
43
+#
44
+# NOCDDL
45
+
46
+
47
+# Environment 
48
+MKDIR=mkdir
49
+CP=cp
50
+CCADMIN=CCadmin
51
+
52
+
53
+# build
54
+build: .build-post
55
+
56
+.build-pre:
57
+# Add your pre 'build' code here...
58
+
59
+.build-post: .build-impl
60
+# Add your post 'build' code here...
61
+
62
+
63
+# clean
64
+clean: .clean-post
65
+
66
+.clean-pre:
67
+# Add your pre 'clean' code here...
68
+
69
+.clean-post: .clean-impl
70
+# Add your post 'clean' code here...
71
+
72
+
73
+# clobber
74
+clobber: .clobber-post
75
+
76
+.clobber-pre:
77
+# Add your pre 'clobber' code here...
78
+
79
+.clobber-post: .clobber-impl
80
+# Add your post 'clobber' code here...
81
+
82
+
83
+# all
84
+all: .all-post
85
+
86
+.all-pre:
87
+# Add your pre 'all' code here...
88
+
89
+.all-post: .all-impl
90
+# Add your post 'all' code here...
91
+
92
+
93
+# build tests
94
+build-tests: .build-tests-post
95
+
96
+.build-tests-pre:
97
+# Add your pre 'build-tests' code here...
98
+
99
+.build-tests-post: .build-tests-impl
100
+# Add your post 'build-tests' code here...
101
+
102
+
103
+# run tests
104
+test: .test-post
105
+
106
+.test-pre: build-tests
107
+# Add your pre 'test' code here...
108
+
109
+.test-post: .test-impl
110
+# Add your post 'test' code here...
111
+
112
+
113
+# help
114
+help: .help-post
115
+
116
+.help-pre:
117
+# Add your pre 'help' code here...
118
+
119
+.help-post: .help-impl
120
+# Add your post 'help' code here...
121
+
122
+
123
+
124
+# include project implementation makefile
125
+include nbproject/Makefile-impl.mk
126
+
127
+# include project make variables
128
+include nbproject/Makefile-variables.mk

+ 147
- 0
software/simulateur/main.cpp View File

@@ -0,0 +1,147 @@
1
+#include <unistd.h> 
2
+#include <stdio.h> 
3
+#include <sys/socket.h> 
4
+#include <stdlib.h> 
5
+#include <netinet/in.h> 
6
+#include <string.h> 
7
+#include <iostream>
8
+using namespace std;
9
+
10
+const char LABEL_ROBOT_PING = 'p';
11
+const char LABEL_ROBOT_RESET = 'r';
12
+const char LABEL_ROBOT_START_WITH_WD = 'W';
13
+const char LABEL_ROBOT_START_WITHOUT_WD = 'u';
14
+const char LABEL_ROBOT_RELOAD_WD = 'w';
15
+const char LABEL_ROBOT_MOVE = 'M';
16
+const char LABEL_ROBOT_TURN = 'T';
17
+const char LABEL_ROBOT_GET_BATTERY = 'v';
18
+const char LABEL_ROBOT_GET_STATE = 'b';
19
+const char LABEL_ROBOT_POWEROFF = 'z';
20
+
21
+const char LABEL_ROBOT_OK = 'O';
22
+const char LABEL_ROBOT_ERROR = 'E';
23
+const char LABEL_ROBOT_UNKNOWN_COMMAND = 'C';
24
+
25
+const char LABEL_ROBOT_SEPARATOR_CHAR = '=';
26
+const char LABEL_ROBOT_ENDING_CHAR = 0x0D;
27
+
28
+#define PORT 6699
29
+
30
+int main(int argc, char const *argv[]) {
31
+    int server_fd, new_socket, valread;
32
+    struct sockaddr_in address;
33
+    int opt = 1;
34
+    int addrlen = sizeof (address);
35
+    char buffer[1024] = {0};
36
+
37
+    // Creating socket file descriptor 
38
+    if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) {
39
+        perror("socket failed");
40
+        exit(EXIT_FAILURE);
41
+    }
42
+
43
+    // Forcefully attaching socket to the port 8080 
44
+    if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT,
45
+            &opt, sizeof (opt))) {
46
+        perror("setsockopt");
47
+        exit(EXIT_FAILURE);
48
+    }
49
+    address.sin_family = AF_INET;
50
+    address.sin_addr.s_addr = INADDR_ANY;
51
+    address.sin_port = htons(PORT);
52
+
53
+    cout << "<<< simulator >>>" << endl;
54
+
55
+    // Forcefully attaching socket to the port 8080 
56
+    if (bind(server_fd, (struct sockaddr *) &address,
57
+            sizeof (address)) < 0) {
58
+        perror("bind failed");
59
+        exit(EXIT_FAILURE);
60
+    }
61
+    cout << ">>> waiting the opening" << endl;
62
+    if (listen(server_fd, 3) < 0) {
63
+        perror("listen");
64
+        exit(EXIT_FAILURE);
65
+    }
66
+    if ((new_socket = accept(server_fd, (struct sockaddr *) &address,
67
+            (socklen_t*) & addrlen)) < 0) {
68
+        perror("accept");
69
+        exit(EXIT_FAILURE);
70
+    }
71
+    cout << ">>> The robot is ready to receive something" << endl;
72
+    unsigned long starttime = (unsigned long) time(NULL);
73
+    while (1) {
74
+        valread = read(new_socket, buffer, 1024);
75
+        if (valread <= 0)
76
+            break;
77
+        printf(">>> I received : %s\n", buffer);
78
+        cout << (unsigned long) time(NULL) << ": ";
79
+        string s = "";
80
+        s += LABEL_ROBOT_OK;
81
+        switch (buffer[0]) {
82
+            case LABEL_ROBOT_START_WITHOUT_WD:
83
+                s += LABEL_ROBOT_OK;
84
+                break;
85
+            case LABEL_ROBOT_START_WITH_WD:
86
+                s += LABEL_ROBOT_OK;
87
+                break;
88
+            case LABEL_ROBOT_MOVE:
89
+                switch (buffer[2]) {
90
+                    case '0':
91
+                        cout << "oo I stop oo" << endl;
92
+                        break;
93
+                    case '-':
94
+                        cout << "\\/ I move backward \\/" << endl;
95
+                        break;
96
+                    default:
97
+                        cout << "/\\ I move forward /\\" << endl;
98
+                        break;
99
+                }
100
+                s += LABEL_ROBOT_OK;
101
+                break;
102
+            case LABEL_ROBOT_TURN:
103
+                switch (buffer[2]) {
104
+                    case '-':
105
+                        cout << "<< I turn to the left <<" << endl;
106
+                        break;
107
+                    default:
108
+                        cout << ">> I turn to the right >>" << endl;
109
+                        break;
110
+                }
111
+                s += LABEL_ROBOT_OK;
112
+                break;
113
+            case LABEL_ROBOT_GET_BATTERY:
114
+                if ((unsigned long) time(NULL) - starttime > 20) {
115
+                    s += '0';
116
+                } else {
117
+                    if ((unsigned long) time(NULL) - starttime > 10) {
118
+                        s += '1';
119
+                    } else {
120
+                        s += '2';
121
+                    }
122
+                }
123
+
124
+
125
+
126
+                break;
127
+            case '0':
128
+                //msg = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_EMPTY);
129
+                break;
130
+            case '1':
131
+                //msg = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_LOW);
132
+                break;
133
+            case '2':
134
+                //msg = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_FULL);
135
+                break;
136
+            default:
137
+                //msg = new Message(MESSAGE_ANSWER_ROBOT_ERROR);
138
+                cerr << "[" << __PRETTY_FUNCTION__ << "] Unknown message received from robot (" << buffer << ")" << endl << flush;
139
+        }
140
+
141
+        send(new_socket, s.c_str(), s.length(), 0);
142
+        //printf("%s sent\n", s);
143
+    }
144
+    cout << "The robot is dead. End of story " << endl;
145
+    cout << " /\\_/\\" << endl << "( o.o )" << endl << " > ^ <" << endl;
146
+    return 0;
147
+} 

+ 83
- 0
software/simulateur/nbproject/Makefile-Debug.mk View File

@@ -0,0 +1,83 @@
1
+#
2
+# Generated Makefile - do not edit!
3
+#
4
+# Edit the Makefile in the project folder instead (../Makefile). Each target
5
+# has a -pre and a -post target defined where you can add customized code.
6
+#
7
+# This makefile implements configuration specific macros and targets.
8
+
9
+
10
+# Environment
11
+MKDIR=mkdir
12
+CP=cp
13
+GREP=grep
14
+NM=nm
15
+CCADMIN=CCadmin
16
+RANLIB=ranlib
17
+CC=gcc
18
+CCC=g++
19
+CXX=g++
20
+FC=gfortran
21
+AS=as
22
+
23
+# Macros
24
+CND_PLATFORM=GNU-Linux
25
+CND_DLIB_EXT=so
26
+CND_CONF=Debug
27
+CND_DISTDIR=dist
28
+CND_BUILDDIR=build
29
+
30
+# Include project Makefile
31
+include Makefile
32
+
33
+# Object Directory
34
+OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35
+
36
+# Object Files
37
+OBJECTFILES= \
38
+	${OBJECTDIR}/main.o
39
+
40
+
41
+# C Compiler Flags
42
+CFLAGS=
43
+
44
+# CC Compiler Flags
45
+CCFLAGS=
46
+CXXFLAGS=
47
+
48
+# Fortran Compiler Flags
49
+FFLAGS=
50
+
51
+# Assembler Flags
52
+ASFLAGS=
53
+
54
+# Link Libraries and Options
55
+LDLIBSOPTIONS=
56
+
57
+# Build Targets
58
+.build-conf: ${BUILD_SUBPROJECTS}
59
+	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur
60
+
61
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur: ${OBJECTFILES}
62
+	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
63
+	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur ${OBJECTFILES} ${LDLIBSOPTIONS}
64
+
65
+${OBJECTDIR}/main.o: main.cpp
66
+	${MKDIR} -p ${OBJECTDIR}
67
+	${RM} "$@.d"
68
+	$(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
69
+
70
+# Subprojects
71
+.build-subprojects:
72
+
73
+# Clean Targets
74
+.clean-conf: ${CLEAN_SUBPROJECTS}
75
+	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
76
+
77
+# Subprojects
78
+.clean-subprojects:
79
+
80
+# Enable dependency checking
81
+.dep.inc: .depcheck-impl
82
+
83
+include .dep.inc

+ 83
- 0
software/simulateur/nbproject/Makefile-Release.mk View File

@@ -0,0 +1,83 @@
1
+#
2
+# Generated Makefile - do not edit!
3
+#
4
+# Edit the Makefile in the project folder instead (../Makefile). Each target
5
+# has a -pre and a -post target defined where you can add customized code.
6
+#
7
+# This makefile implements configuration specific macros and targets.
8
+
9
+
10
+# Environment
11
+MKDIR=mkdir
12
+CP=cp
13
+GREP=grep
14
+NM=nm
15
+CCADMIN=CCadmin
16
+RANLIB=ranlib
17
+CC=gcc
18
+CCC=g++
19
+CXX=g++
20
+FC=gfortran
21
+AS=as
22
+
23
+# Macros
24
+CND_PLATFORM=GNU-Linux
25
+CND_DLIB_EXT=so
26
+CND_CONF=Release
27
+CND_DISTDIR=dist
28
+CND_BUILDDIR=build
29
+
30
+# Include project Makefile
31
+include Makefile
32
+
33
+# Object Directory
34
+OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
35
+
36
+# Object Files
37
+OBJECTFILES= \
38
+	${OBJECTDIR}/main.o
39
+
40
+
41
+# C Compiler Flags
42
+CFLAGS=
43
+
44
+# CC Compiler Flags
45
+CCFLAGS=
46
+CXXFLAGS=
47
+
48
+# Fortran Compiler Flags
49
+FFLAGS=
50
+
51
+# Assembler Flags
52
+ASFLAGS=
53
+
54
+# Link Libraries and Options
55
+LDLIBSOPTIONS=
56
+
57
+# Build Targets
58
+.build-conf: ${BUILD_SUBPROJECTS}
59
+	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur
60
+
61
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur: ${OBJECTFILES}
62
+	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
63
+	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur ${OBJECTFILES} ${LDLIBSOPTIONS}
64
+
65
+${OBJECTDIR}/main.o: main.cpp
66
+	${MKDIR} -p ${OBJECTDIR}
67
+	${RM} "$@.d"
68
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
69
+
70
+# Subprojects
71
+.build-subprojects:
72
+
73
+# Clean Targets
74
+.clean-conf: ${CLEAN_SUBPROJECTS}
75
+	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
76
+
77
+# Subprojects
78
+.clean-subprojects:
79
+
80
+# Enable dependency checking
81
+.dep.inc: .depcheck-impl
82
+
83
+include .dep.inc

+ 133
- 0
software/simulateur/nbproject/Makefile-impl.mk View File

@@ -0,0 +1,133 @@
1
+# 
2
+# Generated Makefile - do not edit! 
3
+# 
4
+# Edit the Makefile in the project folder instead (../Makefile). Each target
5
+# has a pre- and a post- target defined where you can add customization code.
6
+#
7
+# This makefile implements macros and targets common to all configurations.
8
+#
9
+# NOCDDL
10
+
11
+
12
+# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
13
+# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
14
+# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
15
+# and .clean-reqprojects-conf unless SUB has the value 'no'
16
+SUB_no=NO
17
+SUBPROJECTS=${SUB_${SUB}}
18
+BUILD_SUBPROJECTS_=.build-subprojects
19
+BUILD_SUBPROJECTS_NO=
20
+BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
21
+CLEAN_SUBPROJECTS_=.clean-subprojects
22
+CLEAN_SUBPROJECTS_NO=
23
+CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
24
+
25
+
26
+# Project Name
27
+PROJECTNAME=simulateur
28
+
29
+# Active Configuration
30
+DEFAULTCONF=Debug
31
+CONF=${DEFAULTCONF}
32
+
33
+# All Configurations
34
+ALLCONFS=Debug Release 
35
+
36
+
37
+# build
38
+.build-impl: .build-pre .validate-impl .depcheck-impl
39
+	@#echo "=> Running $@... Configuration=$(CONF)"
40
+	"${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf
41
+
42
+
43
+# clean
44
+.clean-impl: .clean-pre .validate-impl .depcheck-impl
45
+	@#echo "=> Running $@... Configuration=$(CONF)"
46
+	"${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf
47
+
48
+
49
+# clobber 
50
+.clobber-impl: .clobber-pre .depcheck-impl
51
+	@#echo "=> Running $@..."
52
+	for CONF in ${ALLCONFS}; \
53
+	do \
54
+	    "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \
55
+	done
56
+
57
+# all 
58
+.all-impl: .all-pre .depcheck-impl
59
+	@#echo "=> Running $@..."
60
+	for CONF in ${ALLCONFS}; \
61
+	do \
62
+	    "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \
63
+	done
64
+
65
+# build tests
66
+.build-tests-impl: .build-impl .build-tests-pre
67
+	@#echo "=> Running $@... Configuration=$(CONF)"
68
+	"${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf
69
+
70
+# run tests
71
+.test-impl: .build-tests-impl .test-pre
72
+	@#echo "=> Running $@... Configuration=$(CONF)"
73
+	"${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf
74
+
75
+# dependency checking support
76
+.depcheck-impl:
77
+	@echo "# This code depends on make tool being used" >.dep.inc
78
+	@if [ -n "${MAKE_VERSION}" ]; then \
79
+	    echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES} \$${TESTOBJECTFILES}))" >>.dep.inc; \
80
+	    echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
81
+	    echo "include \$${DEPFILES}" >>.dep.inc; \
82
+	    echo "endif" >>.dep.inc; \
83
+	else \
84
+	    echo ".KEEP_STATE:" >>.dep.inc; \
85
+	    echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
86
+	fi
87
+
88
+# configuration validation
89
+.validate-impl:
90
+	@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
91
+	then \
92
+	    echo ""; \
93
+	    echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
94
+	    echo "See 'make help' for details."; \
95
+	    echo "Current directory: " `pwd`; \
96
+	    echo ""; \
97
+	fi
98
+	@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
99
+	then \
100
+	    exit 1; \
101
+	fi
102
+
103
+
104
+# help
105
+.help-impl: .help-pre
106
+	@echo "This makefile supports the following configurations:"
107
+	@echo "    ${ALLCONFS}"
108
+	@echo ""
109
+	@echo "and the following targets:"
110
+	@echo "    build  (default target)"
111
+	@echo "    clean"
112
+	@echo "    clobber"
113
+	@echo "    all"
114
+	@echo "    help"
115
+	@echo ""
116
+	@echo "Makefile Usage:"
117
+	@echo "    make [CONF=<CONFIGURATION>] [SUB=no] build"
118
+	@echo "    make [CONF=<CONFIGURATION>] [SUB=no] clean"
119
+	@echo "    make [SUB=no] clobber"
120
+	@echo "    make [SUB=no] all"
121
+	@echo "    make help"
122
+	@echo ""
123
+	@echo "Target 'build' will build a specific configuration and, unless 'SUB=no',"
124
+	@echo "    also build subprojects."
125
+	@echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no',"
126
+	@echo "    also clean subprojects."
127
+	@echo "Target 'clobber' will remove all built files from all configurations and,"
128
+	@echo "    unless 'SUB=no', also from subprojects."
129
+	@echo "Target 'all' will will build all configurations and, unless 'SUB=no',"
130
+	@echo "    also build subprojects."
131
+	@echo "Target 'help' prints this message."
132
+	@echo ""
133
+

+ 35
- 0
software/simulateur/nbproject/Makefile-variables.mk View File

@@ -0,0 +1,35 @@
1
+#
2
+# Generated - do not edit!
3
+#
4
+# NOCDDL
5
+#
6
+CND_BASEDIR=`pwd`
7
+CND_BUILDDIR=build
8
+CND_DISTDIR=dist
9
+# Debug configuration
10
+CND_PLATFORM_Debug=GNU-Linux
11
+CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux
12
+CND_ARTIFACT_NAME_Debug=simulateur
13
+CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux/simulateur
14
+CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux/package
15
+CND_PACKAGE_NAME_Debug=simulateur.tar
16
+CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux/package/simulateur.tar
17
+# Release configuration
18
+CND_PLATFORM_Release=GNU-Linux
19
+CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux
20
+CND_ARTIFACT_NAME_Release=simulateur
21
+CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux/simulateur
22
+CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux/package
23
+CND_PACKAGE_NAME_Release=simulateur.tar
24
+CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux/package/simulateur.tar
25
+#
26
+# include compiler specific variables
27
+#
28
+# dmake command
29
+ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \
30
+	(mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)
31
+#
32
+# gmake command
33
+.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk))
34
+#
35
+include nbproject/private/Makefile-variables.mk

software/raspberry/superviseur-robot/nbproject/Package-Debug__RPI_.bash → software/simulateur/nbproject/Package-Debug.bash View File

@@ -7,15 +7,15 @@
7 7
 # Macros
8 8
 TOP=`pwd`
9 9
 CND_PLATFORM=GNU-Linux
10
-CND_CONF=Debug__RPI_
10
+CND_CONF=Debug
11 11
 CND_DISTDIR=dist
12 12
 CND_BUILDDIR=build
13 13
 CND_DLIB_EXT=so
14 14
 NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
15 15
 TMPDIRNAME=tmp-packaging
16
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur-robot
17
-OUTPUT_BASENAME=superviseur-robot
18
-PACKAGE_TOP_DIR=superviseur-robot/
16
+OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur
17
+OUTPUT_BASENAME=simulateur
18
+PACKAGE_TOP_DIR=simulateur/
19 19
 
20 20
 # Functions
21 21
 function checkReturnCode
@@ -60,15 +60,15 @@ mkdir -p ${NBTMPDIR}
60 60
 
61 61
 # Copy files and create directories and links
62 62
 cd "${TOP}"
63
-makeDirectory "${NBTMPDIR}/superviseur-robot/bin"
63
+makeDirectory "${NBTMPDIR}/simulateur/bin"
64 64
 copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
65 65
 
66 66
 
67 67
 # Generate tar file
68 68
 cd "${TOP}"
69
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/superviseur-robot.tar
69
+rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/simulateur.tar
70 70
 cd ${NBTMPDIR}
71
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/superviseur-robot.tar *
71
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/simulateur.tar *
72 72
 checkReturnCode
73 73
 
74 74
 # Cleanup

+ 76
- 0
software/simulateur/nbproject/Package-Release.bash View File

@@ -0,0 +1,76 @@
1
+#!/bin/bash -x
2
+
3
+#
4
+# Generated - do not edit!
5
+#
6
+
7
+# Macros
8
+TOP=`pwd`
9
+CND_PLATFORM=GNU-Linux
10
+CND_CONF=Release
11
+CND_DISTDIR=dist
12
+CND_BUILDDIR=build
13
+CND_DLIB_EXT=so
14
+NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
15
+TMPDIRNAME=tmp-packaging
16
+OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/simulateur
17
+OUTPUT_BASENAME=simulateur
18
+PACKAGE_TOP_DIR=simulateur/
19
+
20
+# Functions
21
+function checkReturnCode
22
+{
23
+    rc=$?
24
+    if [ $rc != 0 ]
25
+    then
26
+        exit $rc
27
+    fi
28
+}
29
+function makeDirectory
30
+# $1 directory path
31
+# $2 permission (optional)
32
+{
33
+    mkdir -p "$1"
34
+    checkReturnCode
35
+    if [ "$2" != "" ]
36
+    then
37
+      chmod $2 "$1"
38
+      checkReturnCode
39
+    fi
40
+}
41
+function copyFileToTmpDir
42
+# $1 from-file path
43
+# $2 to-file path
44
+# $3 permission
45
+{
46
+    cp "$1" "$2"
47
+    checkReturnCode
48
+    if [ "$3" != "" ]
49
+    then
50
+        chmod $3 "$2"
51
+        checkReturnCode
52
+    fi
53
+}
54
+
55
+# Setup
56
+cd "${TOP}"
57
+mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
58
+rm -rf ${NBTMPDIR}
59
+mkdir -p ${NBTMPDIR}
60
+
61
+# Copy files and create directories and links
62
+cd "${TOP}"
63
+makeDirectory "${NBTMPDIR}/simulateur/bin"
64
+copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
65
+
66
+
67
+# Generate tar file
68
+cd "${TOP}"
69
+rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/simulateur.tar
70
+cd ${NBTMPDIR}
71
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/simulateur.tar *
72
+checkReturnCode
73
+
74
+# Cleanup
75
+cd "${TOP}"
76
+rm -rf ${NBTMPDIR}

+ 66
- 0
software/simulateur/nbproject/configurations.xml View File

@@ -0,0 +1,66 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<configurationDescriptor version="100">
3
+  <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
4
+    <logicalFolder name="HeaderFiles"
5
+                   displayName="Header Files"
6
+                   projectFiles="true">
7
+    </logicalFolder>
8
+    <logicalFolder name="ResourceFiles"
9
+                   displayName="Resource Files"
10
+                   projectFiles="true">
11
+    </logicalFolder>
12
+    <logicalFolder name="SourceFiles"
13
+                   displayName="Source Files"
14
+                   projectFiles="true">
15
+      <itemPath>main.cpp</itemPath>
16
+    </logicalFolder>
17
+    <logicalFolder name="TestFiles"
18
+                   displayName="Test Files"
19
+                   projectFiles="false"
20
+                   kind="TEST_LOGICAL_FOLDER">
21
+    </logicalFolder>
22
+    <logicalFolder name="ExternalFiles"
23
+                   displayName="Important Files"
24
+                   projectFiles="false"
25
+                   kind="IMPORTANT_FILES_FOLDER">
26
+      <itemPath>Makefile</itemPath>
27
+    </logicalFolder>
28
+  </logicalFolder>
29
+  <projectmakefile>Makefile</projectmakefile>
30
+  <confs>
31
+    <conf name="Debug" type="1">
32
+      <toolsSet>
33
+        <compilerSet>default</compilerSet>
34
+        <dependencyChecking>true</dependencyChecking>
35
+        <rebuildPropChanged>false</rebuildPropChanged>
36
+      </toolsSet>
37
+      <compileType>
38
+      </compileType>
39
+      <item path="main.cpp" ex="false" tool="1" flavor2="0">
40
+      </item>
41
+    </conf>
42
+    <conf name="Release" type="1">
43
+      <toolsSet>
44
+        <compilerSet>default</compilerSet>
45
+        <dependencyChecking>true</dependencyChecking>
46
+        <rebuildPropChanged>false</rebuildPropChanged>
47
+      </toolsSet>
48
+      <compileType>
49
+        <cTool>
50
+          <developmentMode>5</developmentMode>
51
+        </cTool>
52
+        <ccTool>
53
+          <developmentMode>5</developmentMode>
54
+        </ccTool>
55
+        <fortranCompilerTool>
56
+          <developmentMode>5</developmentMode>
57
+        </fortranCompilerTool>
58
+        <asmTool>
59
+          <developmentMode>5</developmentMode>
60
+        </asmTool>
61
+      </compileType>
62
+      <item path="main.cpp" ex="false" tool="1" flavor2="0">
63
+      </item>
64
+    </conf>
65
+  </confs>
66
+</configurationDescriptor>

+ 7
- 0
software/simulateur/nbproject/private/Makefile-variables.mk View File

@@ -0,0 +1,7 @@
1
+#
2
+# Generated - do not edit!
3
+#
4
+# NOCDDL
5
+#
6
+# Debug configuration
7
+# Release configuration

+ 75
- 0
software/simulateur/nbproject/private/c_standard_headers_indexer.c View File

@@ -0,0 +1,75 @@
1
+/*
2
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
+ *
4
+ * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
5
+ *
6
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
+ * Other names may be trademarks of their respective owners.
8
+ *
9
+ * The contents of this file are subject to the terms of either the GNU
10
+ * General Public License Version 2 only ("GPL") or the Common
11
+ * Development and Distribution License("CDDL") (collectively, the
12
+ * "License"). You may not use this file except in compliance with the
13
+ * License. You can obtain a copy of the License at
14
+ * http://www.netbeans.org/cddl-gplv2.html
15
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
+ * specific language governing permissions and limitations under the
17
+ * License.  When distributing the software, include this License Header
18
+ * Notice in each file and include the License file at
19
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
+ * particular file as subject to the "Classpath" exception as provided
21
+ * by Oracle in the GPL Version 2 section of the License file that
22
+ * accompanied this code. If applicable, add the following below the
23
+ * License Header, with the fields enclosed by brackets [] replaced by
24
+ * your own identifying information:
25
+ * "Portions Copyrighted [year] [name of copyright owner]"
26
+ *
27
+ * If you wish your version of this file to be governed by only the CDDL
28
+ * or only the GPL Version 2, indicate your decision by adding
29
+ * "[Contributor] elects to include this software in this distribution
30
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
+ * single choice of license, a recipient has the option to distribute
32
+ * your version of this file under either the CDDL, the GPL Version 2 or
33
+ * to extend the choice of license to its licensees as provided above.
34
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
35
+ * Version 2 license, then the option applies only if the new code is
36
+ * made subject to such option by the copyright holder.
37
+ *
38
+ * Contributor(s):
39
+ */
40
+
41
+// List of standard headers was taken in http://en.cppreference.com/w/c/header
42
+
43
+#include <assert.h> 	 // Conditionally compiled macro that compares its argument to zero
44
+#include <ctype.h> 	 // Functions to determine the type contained in character data
45
+#include <errno.h> 	 // Macros reporting error conditions
46
+#include <float.h> 	 // Limits of float types
47
+#include <limits.h> 	 // Sizes of basic types
48
+#include <locale.h> 	 // Localization utilities
49
+#include <math.h> 	 // Common mathematics functions
50
+#include <setjmp.h> 	 // Nonlocal jumps
51
+#include <signal.h> 	 // Signal handling
52
+#include <stdarg.h> 	 // Variable arguments
53
+#include <stddef.h> 	 // Common macro definitions
54
+#include <stdio.h> 	 // Input/output
55
+#include <string.h> 	 // String handling
56
+#include <stdlib.h> 	 // General utilities: memory management, program utilities, string conversions, random numbers
57
+#include <time.h> 	 // Time/date utilities
58
+#include <iso646.h>      // (since C95) Alternative operator spellings
59
+#include <wchar.h>       // (since C95) Extended multibyte and wide character utilities
60
+#include <wctype.h>      // (since C95) Wide character classification and mapping utilities
61
+#ifdef _STDC_C99
62
+#include <complex.h>     // (since C99) Complex number arithmetic
63
+#include <fenv.h>        // (since C99) Floating-point environment
64
+#include <inttypes.h>    // (since C99) Format conversion of integer types
65
+#include <stdbool.h>     // (since C99) Boolean type
66
+#include <stdint.h>      // (since C99) Fixed-width integer types
67
+#include <tgmath.h>      // (since C99) Type-generic math (macros wrapping math.h and complex.h)
68
+#endif
69
+#ifdef _STDC_C11
70
+#include <stdalign.h>    // (since C11) alignas and alignof convenience macros
71
+#include <stdatomic.h>   // (since C11) Atomic types
72
+#include <stdnoreturn.h> // (since C11) noreturn convenience macros
73
+#include <threads.h>     // (since C11) Thread library
74
+#include <uchar.h>       // (since C11) UTF-16 and UTF-32 character utilities
75
+#endif

+ 72
- 0
software/simulateur/nbproject/private/configurations.xml View File

@@ -0,0 +1,72 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<configurationDescriptor version="100">
3
+  <projectmakefile>Makefile</projectmakefile>
4
+  <confs>
5
+    <conf name="Debug" type="1">
6
+      <toolsSet>
7
+        <developmentServer>localhost</developmentServer>
8
+        <platform>2</platform>
9
+      </toolsSet>
10
+      <dbx_gdbdebugger version="1">
11
+        <gdb_pathmaps>
12
+        </gdb_pathmaps>
13
+        <gdb_interceptlist>
14
+          <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
15
+        </gdb_interceptlist>
16
+        <gdb_options>
17
+          <DebugOptions>
18
+          </DebugOptions>
19
+        </gdb_options>
20
+        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
21
+      </dbx_gdbdebugger>
22
+      <nativedebugger version="1">
23
+        <engine>gdb</engine>
24
+      </nativedebugger>
25
+      <runprofile version="9">
26
+        <runcommandpicklist>
27
+          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
28
+        </runcommandpicklist>
29
+        <runcommand>"${OUTPUT_PATH}"</runcommand>
30
+        <rundir></rundir>
31
+        <buildfirst>true</buildfirst>
32
+        <terminal-type>0</terminal-type>
33
+        <remove-instrumentation>0</remove-instrumentation>
34
+        <environment>
35
+        </environment>
36
+      </runprofile>
37
+    </conf>
38
+    <conf name="Release" type="1">
39
+      <toolsSet>
40
+        <developmentServer>localhost</developmentServer>
41
+        <platform>2</platform>
42
+      </toolsSet>
43
+      <dbx_gdbdebugger version="1">
44
+        <gdb_pathmaps>
45
+        </gdb_pathmaps>
46
+        <gdb_interceptlist>
47
+          <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
48
+        </gdb_interceptlist>
49
+        <gdb_options>
50
+          <DebugOptions>
51
+          </DebugOptions>
52
+        </gdb_options>
53
+        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
54
+      </dbx_gdbdebugger>
55
+      <nativedebugger version="1">
56
+        <engine>gdb</engine>
57
+      </nativedebugger>
58
+      <runprofile version="9">
59
+        <runcommandpicklist>
60
+          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
61
+        </runcommandpicklist>
62
+        <runcommand>"${OUTPUT_PATH}"</runcommand>
63
+        <rundir></rundir>
64
+        <buildfirst>true</buildfirst>
65
+        <terminal-type>0</terminal-type>
66
+        <remove-instrumentation>0</remove-instrumentation>
67
+        <environment>
68
+        </environment>
69
+      </runprofile>
70
+    </conf>
71
+  </confs>
72
+</configurationDescriptor>

+ 135
- 0
software/simulateur/nbproject/private/cpp_standard_headers_indexer.cpp View File

@@ -0,0 +1,135 @@
1
+/*
2
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
+ *
4
+ * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
5
+ *
6
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
+ * Other names may be trademarks of their respective owners.
8
+ *
9
+ * The contents of this file are subject to the terms of either the GNU
10
+ * General Public License Version 2 only ("GPL") or the Common
11
+ * Development and Distribution License("CDDL") (collectively, the
12
+ * "License"). You may not use this file except in compliance with the
13
+ * License. You can obtain a copy of the License at
14
+ * http://www.netbeans.org/cddl-gplv2.html
15
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
+ * specific language governing permissions and limitations under the
17
+ * License.  When distributing the software, include this License Header
18
+ * Notice in each file and include the License file at
19
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
+ * particular file as subject to the "Classpath" exception as provided
21
+ * by Oracle in the GPL Version 2 section of the License file that
22
+ * accompanied this code. If applicable, add the following below the
23
+ * License Header, with the fields enclosed by brackets [] replaced by
24
+ * your own identifying information:
25
+ * "Portions Copyrighted [year] [name of copyright owner]"
26
+ *
27
+ * If you wish your version of this file to be governed by only the CDDL
28
+ * or only the GPL Version 2, indicate your decision by adding
29
+ * "[Contributor] elects to include this software in this distribution
30
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
+ * single choice of license, a recipient has the option to distribute
32
+ * your version of this file under either the CDDL, the GPL Version 2 or
33
+ * to extend the choice of license to its licensees as provided above.
34
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
35
+ * Version 2 license, then the option applies only if the new code is
36
+ * made subject to such option by the copyright holder.
37
+ *
38
+ * Contributor(s):
39
+ */
40
+
41
+// List of standard headers was taken in http://en.cppreference.com/w/cpp/header
42
+
43
+#include <cstdlib> 	    // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search
44
+#include <csignal> 	    // Functions and macro constants for signal management
45
+#include <csetjmp> 	    // Macro (and function) that saves (and jumps) to an execution context
46
+#include <cstdarg> 	    // Handling of variable length argument lists
47
+#include <typeinfo> 	    // Runtime type information utilities
48
+#include <bitset> 	    // std::bitset class template
49
+#include <functional> 	    // Function objects, designed for use with the standard algorithms
50
+#include <utility> 	    // Various utility components
51
+#include <ctime> 	    // C-style time/date utilites
52
+#include <cstddef> 	    // typedefs for types such as size_t, NULL and others
53
+#include <new> 	            // Low-level memory management utilities
54
+#include <memory> 	    // Higher level memory management utilities
55
+#include <climits>          // limits of integral types
56
+#include <cfloat> 	    // limits of float types
57
+#include <limits> 	    // standardized way to query properties of arithmetic types
58
+#include <exception> 	    // Exception handling utilities
59
+#include <stdexcept> 	    // Standard exception objects
60
+#include <cassert> 	    // Conditionally compiled macro that compares its argument to zero
61
+#include <cerrno>           // Macro containing the last error number
62
+#include <cctype>           // functions to determine the type contained in character data
63
+#include <cwctype>          // functions for determining the type of wide character data
64
+#include <cstring> 	    // various narrow character string handling functions
65
+#include <cwchar> 	    // various wide and multibyte string handling functions
66
+#include <string> 	    // std::basic_string class template
67
+#include <vector> 	    // std::vector container
68
+#include <deque> 	    // std::deque container
69
+#include <list> 	    // std::list container
70
+#include <set> 	            // std::set and std::multiset associative containers
71
+#include <map> 	            // std::map and std::multimap associative containers
72
+#include <stack> 	    // std::stack container adaptor
73
+#include <queue> 	    // std::queue and std::priority_queue container adaptors
74
+#include <algorithm> 	    // Algorithms that operate on containers
75
+#include <iterator> 	    // Container iterators
76
+#include <cmath>            // Common mathematics functions
77
+#include <complex>          // Complex number type
78
+#include <valarray>         // Class for representing and manipulating arrays of values
79
+#include <numeric>          // Numeric operations on values in containers
80
+#include <iosfwd>           // forward declarations of all classes in the input/output library
81
+#include <ios>              // std::ios_base class, std::basic_ios class template and several typedefs
82
+#include <istream>          // std::basic_istream class template and several typedefs
83
+#include <ostream>          // std::basic_ostream, std::basic_iostream class templates and several typedefs
84
+#include <iostream>         // several standard stream objects
85
+#include <fstream>          // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs
86
+#include <sstream>          // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs
87
+#include <strstream>        // std::strstream, std::istrstream, std::ostrstream(deprecated)
88
+#include <iomanip>          // Helper functions to control the format or input and output
89
+#include <streambuf>        // std::basic_streambuf class template
90
+#include <cstdio>           // C-style input-output functions
91
+#include <locale>           // Localization utilities
92
+#include <clocale>          // C localization utilities
93
+#include <ciso646>          // empty header. The macros that appear in iso646.h in C are keywords in C++
94
+#if __cplusplus >= 201103L
95
+#include <typeindex>        // (since C++11) 	std::type_index
96
+#include <type_traits>      // (since C++11) 	Compile-time type information
97
+#include <chrono>           // (since C++11) 	C++ time utilites
98
+#include <initializer_list> // (since C++11) 	std::initializer_list class template
99
+#include <tuple>            // (since C++11) 	std::tuple class template
100
+#include <scoped_allocator> // (since C++11) 	Nested allocator class
101
+#include <cstdint>          // (since C++11) 	fixed-size types and limits of other types
102
+#include <cinttypes>        // (since C++11) 	formatting macros , intmax_t and uintmax_t math and conversions
103
+#include <system_error>     // (since C++11) 	defines std::error_code, a platform-dependent error code
104
+#include <cuchar>           // (since C++11) 	C-style Unicode character conversion functions
105
+#include <array>            // (since C++11) 	std::array container
106
+#include <forward_list>     // (since C++11) 	std::forward_list container
107
+#include <unordered_set>    // (since C++11) 	std::unordered_set and std::unordered_multiset unordered associative containers
108
+#include <unordered_map>    // (since C++11) 	std::unordered_map and std::unordered_multimap unordered associative containers
109
+#include <random>           // (since C++11) 	Random number generators and distributions
110
+#include <ratio>            // (since C++11) 	Compile-time rational arithmetic
111
+#include <cfenv>            // (since C++11) 	Floating-point environment access functions
112
+#include <codecvt>          // (since C++11) 	Unicode conversion facilities
113
+#include <regex>            // (since C++11) 	Classes, algorithms and iterators to support regular expression processing
114
+#include <atomic>           // (since C++11) 	Atomic operations library
115
+#include <ccomplex>         // (since C++11)(deprecated in C++17) 	simply includes the header <complex>
116
+#include <ctgmath>          // (since C++11)(deprecated in C++17) 	simply includes the headers <ccomplex> (until C++17)<complex> (since C++17) and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers
117
+#include <cstdalign>        // (since C++11)(deprecated in C++17) 	defines one compatibility macro constant
118
+#include <cstdbool>         // (since C++11)(deprecated in C++17) 	defines one compatibility macro constant
119
+#include <thread>           // (since C++11) 	std::thread class and supporting functions
120
+#include <mutex>            // (since C++11) 	mutual exclusion primitives
121
+#include <future>           // (since C++11) 	primitives for asynchronous computations
122
+#include <condition_variable> // (since C++11) 	thread waiting conditions
123
+#endif
124
+#if __cplusplus >= 201300L
125
+#include <shared_mutex>     // (since C++14) 	shared mutual exclusion primitives
126
+#endif
127
+#if __cplusplus >= 201500L
128
+#include <any>              // (since C++17) 	std::any class template
129
+#include <optional>         // (since C++17) 	std::optional class template
130
+#include <variant>          // (since C++17) 	std::variant class template
131
+#include <memory_resource>  // (since C++17) 	Polymorphic allocators and memory resources
132
+#include <string_view>      // (since C++17) 	std::basic_string_view class template
133
+#include <execution>        // (since C++17) 	Predefined execution policies for parallel versions of the algorithms
134
+#include <filesystem>       // (since C++17) 	std::path class and supporting functions
135
+#endif

+ 42
- 0
software/simulateur/nbproject/private/launcher.properties View File

@@ -0,0 +1,42 @@
1
+# Launchers File syntax:
2
+#
3
+# [Must-have property line] 
4
+# launcher1.runCommand=<Run Command>
5
+# [Optional extra properties] 
6
+# launcher1.displayName=<Display Name, runCommand by default>
7
+# launcher1.hide=<true if lancher is not visible in menu, false by default>
8
+# launcher1.buildCommand=<Build Command, Build Command specified in project properties by default>
9
+# launcher1.runDir=<Run Directory, ${PROJECT_DIR} by default>
10
+# launcher1.runInOwnTab=<false if launcher reuse common "Run" output tab, true by default>
11
+# launcher1.symbolFiles=<Symbol Files loaded by debugger, ${OUTPUT_PATH} by default>
12
+# launcher1.env.<Environment variable KEY>=<Environment variable VALUE>
13
+# (If this value is quoted with ` it is handled as a native command which execution result will become the value)
14
+# [Common launcher properties]
15
+# common.runDir=<Run Directory>
16
+# (This value is overwritten by a launcher specific runDir value if the latter exists)
17
+# common.env.<Environment variable KEY>=<Environment variable VALUE>
18
+# (Environment variables from common launcher are merged with launcher specific variables)
19
+# common.symbolFiles=<Symbol Files loaded by debugger>
20
+# (This value is overwritten by a launcher specific symbolFiles value if the latter exists)
21
+#
22
+# In runDir, symbolFiles and env fields you can use these macroses:
23
+# ${PROJECT_DIR}    -   project directory absolute path
24
+# ${OUTPUT_PATH}    -   linker output path (relative to project directory path)
25
+# ${OUTPUT_BASENAME}-   linker output filename
26
+# ${TESTDIR}        -   test files directory (relative to project directory path)
27
+# ${OBJECTDIR}      -   object files directory (relative to project directory path)
28
+# ${CND_DISTDIR}    -   distribution directory (relative to project directory path)
29
+# ${CND_BUILDDIR}   -   build directory (relative to project directory path)
30
+# ${CND_PLATFORM}   -   platform name
31
+# ${CND_CONF}       -   configuration name
32
+# ${CND_DLIB_EXT}   -   dynamic library extension
33
+#
34
+# All the project launchers must be listed in the file!
35
+#
36
+# launcher1.runCommand=...
37
+# launcher2.runCommand=...
38
+# ...
39
+# common.runDir=...
40
+# common.env.KEY=VALUE
41
+
42
+# launcher1.runCommand=<type your run command here>

+ 13
- 0
software/simulateur/nbproject/private/private.xml View File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3
+    <data xmlns="http://www.netbeans.org/ns/make-project-private/1">
4
+        <activeConfTypeElem>1</activeConfTypeElem>
5
+        <activeConfIndexElem>0</activeConfIndexElem>
6
+    </data>
7
+    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
8
+    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
9
+        <group>
10
+            <file>file:/home/etud/dumber/software/simulateur/main.cpp</file>
11
+        </group>
12
+    </open-files>
13
+</project-private>

+ 28
- 0
software/simulateur/nbproject/project.xml View File

@@ -0,0 +1,28 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://www.netbeans.org/ns/project/1">
3
+    <type>org.netbeans.modules.cnd.makeproject</type>
4
+    <configuration>
5
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
6
+            <name>simulateur</name>
7
+            <c-extensions/>
8
+            <cpp-extensions>cpp</cpp-extensions>
9
+            <header-extensions/>
10
+            <sourceEncoding>UTF-8</sourceEncoding>
11
+            <make-dep-projects/>
12
+            <sourceRootList/>
13
+            <confList>
14
+                <confElem>
15
+                    <name>Debug</name>
16
+                    <type>1</type>
17
+                </confElem>
18
+                <confElem>
19
+                    <name>Release</name>
20
+                    <type>1</type>
21
+                </confElem>
22
+            </confList>
23
+            <formatting>
24
+                <project-formatting-style>false</project-formatting-style>
25
+            </formatting>
26
+        </data>
27
+    </configuration>
28
+</project>

Loading…
Cancel
Save