Browse Source

Code stable, serveur included in binary

Sébastien DI MERCURIO 5 years ago
parent
commit
0cdea959df
18 changed files with 1117 additions and 10 deletions
  1. 1
    0
      software/raspberry/superviseur-robot/superviseur/.gitignore
  2. 2
    0
      software/raspberry/superviseur-robot/superviseur/gdbsudo.sh
  3. 119
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug.mk
  4. 119
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Release.mk
  5. 133
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-impl.mk
  6. 35
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-variables.mk
  7. 76
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/Package-Debug.bash
  8. 76
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/Package-Release.bash
  9. 156
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/configurations.xml
  10. 7
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/private/Makefile-variables.mk
  11. 75
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/private/c_standard_headers_indexer.c
  12. 78
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/private/configurations.xml
  13. 135
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/private/cpp_standard_headers_indexer.cpp
  14. 42
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/private/launcher.properties
  15. 13
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/private/private.xml
  16. 28
    0
      software/raspberry/superviseur-robot/superviseur/nbproject/project.xml
  17. 21
    10
      software/raspberry/superviseur-robot/superviseur/src/functions.cpp
  18. 1
    0
      software/raspberry/superviseur-robot/superviseur/src/functions.h

+ 1
- 0
software/raspberry/superviseur-robot/superviseur/.gitignore View File

@@ -1,6 +1,7 @@
1 1
 bin/
2 2
 build/
3 3
 CMakeFiles/
4
+dist/
4 5
 
5 6
 .dep.inc
6 7
 Makefile

+ 2
- 0
software/raspberry/superviseur-robot/superviseur/gdbsudo.sh View File

@@ -0,0 +1,2 @@
1
+#!/bin/bash
2
+pkexec /usr/bin/gdb $*

+ 119
- 0
software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug.mk View File

@@ -0,0 +1,119 @@
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}/_ext/a59f760b/image.o \
39
+	${OBJECTDIR}/_ext/a59f760b/message.o \
40
+	${OBJECTDIR}/_ext/a59f760b/monitor.o \
41
+	${OBJECTDIR}/_ext/a59f760b/robot.o \
42
+	${OBJECTDIR}/_ext/a59f760b/server.o \
43
+	${OBJECTDIR}/src/functions.o \
44
+	${OBJECTDIR}/src/main.o
45
+
46
+
47
+# C Compiler Flags
48
+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
49
+
50
+# CC Compiler Flags
51
+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
52
+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
53
+
54
+# Fortran Compiler Flags
55
+FFLAGS=
56
+
57
+# Assembler Flags
58
+ASFLAGS=
59
+
60
+# Link Libraries and Options
61
+LDLIBSOPTIONS=`pkg-config --libs opencv`  
62
+
63
+# Build Targets
64
+.build-conf: ${BUILD_SUBPROJECTS}
65
+	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur
66
+
67
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur: ${OBJECTFILES}
68
+	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
69
+	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur ${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
+
71
+${OBJECTDIR}/_ext/a59f760b/image.o: ../lib/src/image.cpp
72
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
73
+	${RM} "$@.d"
74
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -Isrc -I../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/image.o ../lib/src/image.cpp
75
+
76
+${OBJECTDIR}/_ext/a59f760b/message.o: ../lib/src/message.cpp
77
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
78
+	${RM} "$@.d"
79
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -Isrc -I../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/message.o ../lib/src/message.cpp
80
+
81
+${OBJECTDIR}/_ext/a59f760b/monitor.o: ../lib/src/monitor.cpp
82
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
83
+	${RM} "$@.d"
84
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -Isrc -I../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/monitor.o ../lib/src/monitor.cpp
85
+
86
+${OBJECTDIR}/_ext/a59f760b/robot.o: ../lib/src/robot.cpp
87
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
88
+	${RM} "$@.d"
89
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -Isrc -I../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/robot.o ../lib/src/robot.cpp
90
+
91
+${OBJECTDIR}/_ext/a59f760b/server.o: ../lib/src/server.cpp
92
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
93
+	${RM} "$@.d"
94
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -Isrc -I../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/server.o ../lib/src/server.cpp
95
+
96
+${OBJECTDIR}/src/functions.o: src/functions.cpp
97
+	${MKDIR} -p ${OBJECTDIR}/src
98
+	${RM} "$@.d"
99
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -Isrc -I../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/functions.o src/functions.cpp
100
+
101
+${OBJECTDIR}/src/main.o: src/main.cpp
102
+	${MKDIR} -p ${OBJECTDIR}/src
103
+	${RM} "$@.d"
104
+	$(COMPILE.cc) -g -D_WITH_TRACE_ -Isrc -I../lib -I/usr/xenomai/include -I/usr/xenomai/include/mercury `pkg-config --cflags opencv`   -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/main.o src/main.cpp
105
+
106
+# Subprojects
107
+.build-subprojects:
108
+
109
+# Clean Targets
110
+.clean-conf: ${CLEAN_SUBPROJECTS}
111
+	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
112
+
113
+# Subprojects
114
+.clean-subprojects:
115
+
116
+# Enable dependency checking
117
+.dep.inc: .depcheck-impl
118
+
119
+include .dep.inc

+ 119
- 0
software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Release.mk View File

@@ -0,0 +1,119 @@
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}/_ext/a59f760b/image.o \
39
+	${OBJECTDIR}/_ext/a59f760b/message.o \
40
+	${OBJECTDIR}/_ext/a59f760b/monitor.o \
41
+	${OBJECTDIR}/_ext/a59f760b/robot.o \
42
+	${OBJECTDIR}/_ext/a59f760b/server.o \
43
+	${OBJECTDIR}/src/functions.o \
44
+	${OBJECTDIR}/src/main.o
45
+
46
+
47
+# C Compiler Flags
48
+CFLAGS=
49
+
50
+# CC Compiler Flags
51
+CCFLAGS=
52
+CXXFLAGS=
53
+
54
+# Fortran Compiler Flags
55
+FFLAGS=
56
+
57
+# Assembler Flags
58
+ASFLAGS=
59
+
60
+# Link Libraries and Options
61
+LDLIBSOPTIONS=
62
+
63
+# Build Targets
64
+.build-conf: ${BUILD_SUBPROJECTS}
65
+	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur
66
+
67
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur: ${OBJECTFILES}
68
+	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
69
+	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/superviseur ${OBJECTFILES} ${LDLIBSOPTIONS}
70
+
71
+${OBJECTDIR}/_ext/a59f760b/image.o: ../lib/src/image.cpp
72
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
73
+	${RM} "$@.d"
74
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/image.o ../lib/src/image.cpp
75
+
76
+${OBJECTDIR}/_ext/a59f760b/message.o: ../lib/src/message.cpp
77
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
78
+	${RM} "$@.d"
79
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/message.o ../lib/src/message.cpp
80
+
81
+${OBJECTDIR}/_ext/a59f760b/monitor.o: ../lib/src/monitor.cpp
82
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
83
+	${RM} "$@.d"
84
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/monitor.o ../lib/src/monitor.cpp
85
+
86
+${OBJECTDIR}/_ext/a59f760b/robot.o: ../lib/src/robot.cpp
87
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
88
+	${RM} "$@.d"
89
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/robot.o ../lib/src/robot.cpp
90
+
91
+${OBJECTDIR}/_ext/a59f760b/server.o: ../lib/src/server.cpp
92
+	${MKDIR} -p ${OBJECTDIR}/_ext/a59f760b
93
+	${RM} "$@.d"
94
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/a59f760b/server.o ../lib/src/server.cpp
95
+
96
+${OBJECTDIR}/src/functions.o: src/functions.cpp
97
+	${MKDIR} -p ${OBJECTDIR}/src
98
+	${RM} "$@.d"
99
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/functions.o src/functions.cpp
100
+
101
+${OBJECTDIR}/src/main.o: src/main.cpp
102
+	${MKDIR} -p ${OBJECTDIR}/src
103
+	${RM} "$@.d"
104
+	$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/src/main.o src/main.cpp
105
+
106
+# Subprojects
107
+.build-subprojects:
108
+
109
+# Clean Targets
110
+.clean-conf: ${CLEAN_SUBPROJECTS}
111
+	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
112
+
113
+# Subprojects
114
+.clean-subprojects:
115
+
116
+# Enable dependency checking
117
+.dep.inc: .depcheck-impl
118
+
119
+include .dep.inc

+ 133
- 0
software/raspberry/superviseur-robot/superviseur/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=superviseur
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/raspberry/superviseur-robot/superviseur/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=superviseur
13
+CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux/superviseur
14
+CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux/package
15
+CND_PACKAGE_NAME_Debug=superviseur.tar
16
+CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux/package/superviseur.tar
17
+# Release configuration
18
+CND_PLATFORM_Release=GNU-Linux
19
+CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux
20
+CND_ARTIFACT_NAME_Release=superviseur
21
+CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux/superviseur
22
+CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux/package
23
+CND_PACKAGE_NAME_Release=superviseur.tar
24
+CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux/package/superviseur.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

+ 76
- 0
software/raspberry/superviseur-robot/superviseur/nbproject/Package-Debug.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=Debug
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}/superviseur
17
+OUTPUT_BASENAME=superviseur
18
+PACKAGE_TOP_DIR=superviseur/
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}/superviseur/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/superviseur.tar
70
+cd ${NBTMPDIR}
71
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/superviseur.tar *
72
+checkReturnCode
73
+
74
+# Cleanup
75
+cd "${TOP}"
76
+rm -rf ${NBTMPDIR}

+ 76
- 0
software/raspberry/superviseur-robot/superviseur/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}/superviseur
17
+OUTPUT_BASENAME=superviseur
18
+PACKAGE_TOP_DIR=superviseur/
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}/superviseur/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/superviseur.tar
70
+cd ${NBTMPDIR}
71
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/superviseur.tar *
72
+checkReturnCode
73
+
74
+# Cleanup
75
+cd "${TOP}"
76
+rm -rf ${NBTMPDIR}

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

@@ -0,0 +1,156 @@
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
+      <itemPath>./src/functions.h</itemPath>
8
+      <itemPath>../lib/image.h</itemPath>
9
+      <itemPath>../lib/message.h</itemPath>
10
+      <itemPath>../lib/monitor.h</itemPath>
11
+      <itemPath>../lib/robot.h</itemPath>
12
+      <itemPath>../lib/server.h</itemPath>
13
+    </logicalFolder>
14
+    <logicalFolder name="ResourceFiles"
15
+                   displayName="Resource Files"
16
+                   projectFiles="true">
17
+      <itemPath>gdbsudo.sh</itemPath>
18
+    </logicalFolder>
19
+    <logicalFolder name="SourceFiles"
20
+                   displayName="Source Files"
21
+                   projectFiles="true">
22
+      <itemPath>./src/functions.cpp</itemPath>
23
+      <itemPath>../lib/src/image.cpp</itemPath>
24
+      <itemPath>./src/main.cpp</itemPath>
25
+      <itemPath>../lib/src/message.cpp</itemPath>
26
+      <itemPath>../lib/src/monitor.cpp</itemPath>
27
+      <itemPath>../lib/src/robot.cpp</itemPath>
28
+      <itemPath>../lib/src/server.cpp</itemPath>
29
+    </logicalFolder>
30
+    <logicalFolder name="TestFiles"
31
+                   displayName="Test Files"
32
+                   projectFiles="false"
33
+                   kind="TEST_LOGICAL_FOLDER">
34
+    </logicalFolder>
35
+    <logicalFolder name="ExternalFiles"
36
+                   displayName="Important Files"
37
+                   projectFiles="false"
38
+                   kind="IMPORTANT_FILES_FOLDER">
39
+      <itemPath>Makefile</itemPath>
40
+    </logicalFolder>
41
+  </logicalFolder>
42
+  <projectmakefile>Makefile</projectmakefile>
43
+  <confs>
44
+    <conf name="Debug" type="1">
45
+      <toolsSet>
46
+        <compilerSet>default</compilerSet>
47
+        <dependencyChecking>true</dependencyChecking>
48
+        <rebuildPropChanged>false</rebuildPropChanged>
49
+      </toolsSet>
50
+      <compileType>
51
+        <cTool>
52
+          <incDir>
53
+            <pElem>src</pElem>
54
+            <pElem>../lib</pElem>
55
+          </incDir>
56
+          <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>
57
+        </cTool>
58
+        <ccTool>
59
+          <incDir>
60
+            <pElem>src</pElem>
61
+            <pElem>../lib</pElem>
62
+            <pElem>/usr/xenomai/include</pElem>
63
+            <pElem>/usr/xenomai/include/mercury</pElem>
64
+          </incDir>
65
+          <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>
66
+          <preprocessorList>
67
+            <Elem>_WITH_TRACE_</Elem>
68
+          </preprocessorList>
69
+        </ccTool>
70
+        <linkerTool>
71
+          <linkerLibItems>
72
+            <linkerOptionItem>`pkg-config --libs opencv`</linkerOptionItem>
73
+          </linkerLibItems>
74
+          <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>
75
+        </linkerTool>
76
+      </compileType>
77
+      <item path="../lib/image.h" ex="false" tool="3" flavor2="0">
78
+      </item>
79
+      <item path="../lib/message.h" ex="false" tool="3" flavor2="0">
80
+      </item>
81
+      <item path="../lib/monitor.h" ex="false" tool="3" flavor2="0">
82
+      </item>
83
+      <item path="../lib/robot.h" ex="false" tool="3" flavor2="0">
84
+      </item>
85
+      <item path="../lib/server.h" ex="false" tool="3" flavor2="0">
86
+      </item>
87
+      <item path="../lib/src/image.cpp" ex="false" tool="1" flavor2="0">
88
+      </item>
89
+      <item path="../lib/src/message.cpp" ex="false" tool="1" flavor2="0">
90
+      </item>
91
+      <item path="../lib/src/monitor.cpp" ex="false" tool="1" flavor2="0">
92
+      </item>
93
+      <item path="../lib/src/robot.cpp" ex="false" tool="1" flavor2="0">
94
+      </item>
95
+      <item path="../lib/src/server.cpp" ex="false" tool="1" flavor2="0">
96
+      </item>
97
+      <item path="./src/functions.cpp" ex="false" tool="1" flavor2="0">
98
+      </item>
99
+      <item path="./src/functions.h" ex="false" tool="3" flavor2="0">
100
+      </item>
101
+      <item path="./src/main.cpp" ex="false" tool="1" flavor2="0">
102
+      </item>
103
+      <item path="gdbsudo.sh" ex="false" tool="3" flavor2="0">
104
+      </item>
105
+    </conf>
106
+    <conf name="Release" type="1">
107
+      <toolsSet>
108
+        <compilerSet>default</compilerSet>
109
+        <dependencyChecking>true</dependencyChecking>
110
+        <rebuildPropChanged>false</rebuildPropChanged>
111
+      </toolsSet>
112
+      <compileType>
113
+        <cTool>
114
+          <developmentMode>5</developmentMode>
115
+        </cTool>
116
+        <ccTool>
117
+          <developmentMode>5</developmentMode>
118
+        </ccTool>
119
+        <fortranCompilerTool>
120
+          <developmentMode>5</developmentMode>
121
+        </fortranCompilerTool>
122
+        <asmTool>
123
+          <developmentMode>5</developmentMode>
124
+        </asmTool>
125
+      </compileType>
126
+      <item path="../lib/image.h" ex="false" tool="3" flavor2="0">
127
+      </item>
128
+      <item path="../lib/message.h" ex="false" tool="3" flavor2="0">
129
+      </item>
130
+      <item path="../lib/monitor.h" ex="false" tool="3" flavor2="0">
131
+      </item>
132
+      <item path="../lib/robot.h" ex="false" tool="3" flavor2="0">
133
+      </item>
134
+      <item path="../lib/server.h" ex="false" tool="3" flavor2="0">
135
+      </item>
136
+      <item path="../lib/src/image.cpp" ex="false" tool="1" flavor2="0">
137
+      </item>
138
+      <item path="../lib/src/message.cpp" ex="false" tool="1" flavor2="0">
139
+      </item>
140
+      <item path="../lib/src/monitor.cpp" ex="false" tool="1" flavor2="0">
141
+      </item>
142
+      <item path="../lib/src/robot.cpp" ex="false" tool="1" flavor2="0">
143
+      </item>
144
+      <item path="../lib/src/server.cpp" ex="false" tool="1" flavor2="0">
145
+      </item>
146
+      <item path="./src/functions.cpp" ex="false" tool="1" flavor2="0">
147
+      </item>
148
+      <item path="./src/functions.h" ex="false" tool="3" flavor2="0">
149
+      </item>
150
+      <item path="./src/main.cpp" ex="false" tool="1" flavor2="0">
151
+      </item>
152
+      <item path="gdbsudo.sh" ex="false" tool="3" flavor2="0">
153
+      </item>
154
+    </conf>
155
+  </confs>
156
+</configurationDescriptor>

+ 7
- 0
software/raspberry/superviseur-robot/superviseur/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/raspberry/superviseur-robot/superviseur/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

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

@@ -0,0 +1,78 @@
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_signals>
17
+        </gdb_signals>
18
+        <gdb_options>
19
+          <DebugOptions>
20
+          </DebugOptions>
21
+        </gdb_options>
22
+        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
23
+      </dbx_gdbdebugger>
24
+      <nativedebugger version="1">
25
+        <engine>gdb</engine>
26
+      </nativedebugger>
27
+      <runprofile version="9">
28
+        <runcommandpicklist>
29
+          <runcommandpicklistitem>sudo "${OUTPUT_PATH}"</runcommandpicklistitem>
30
+          <runcommandpicklistitem>sudo -E "${OUTPUT_PATH}"</runcommandpicklistitem>
31
+          <runcommandpicklistitem>pkexec "${OUTPUT_PATH}"</runcommandpicklistitem>
32
+          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
33
+        </runcommandpicklist>
34
+        <runcommand>"${OUTPUT_PATH}"</runcommand>
35
+        <rundir></rundir>
36
+        <buildfirst>true</buildfirst>
37
+        <console-type>1</console-type>
38
+        <terminal-type>0</terminal-type>
39
+        <remove-instrumentation>0</remove-instrumentation>
40
+        <environment>
41
+        </environment>
42
+      </runprofile>
43
+    </conf>
44
+    <conf name="Release" type="1">
45
+      <toolsSet>
46
+        <developmentServer>localhost</developmentServer>
47
+        <platform>2</platform>
48
+      </toolsSet>
49
+      <dbx_gdbdebugger version="1">
50
+        <gdb_pathmaps>
51
+        </gdb_pathmaps>
52
+        <gdb_interceptlist>
53
+          <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
54
+        </gdb_interceptlist>
55
+        <gdb_options>
56
+          <DebugOptions>
57
+          </DebugOptions>
58
+        </gdb_options>
59
+        <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
60
+      </dbx_gdbdebugger>
61
+      <nativedebugger version="1">
62
+        <engine>gdb</engine>
63
+      </nativedebugger>
64
+      <runprofile version="9">
65
+        <runcommandpicklist>
66
+          <runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
67
+        </runcommandpicklist>
68
+        <runcommand>"${OUTPUT_PATH}"</runcommand>
69
+        <rundir></rundir>
70
+        <buildfirst>true</buildfirst>
71
+        <terminal-type>0</terminal-type>
72
+        <remove-instrumentation>0</remove-instrumentation>
73
+        <environment>
74
+        </environment>
75
+      </runprofile>
76
+    </conf>
77
+  </confs>
78
+</configurationDescriptor>

+ 135
- 0
software/raspberry/superviseur-robot/superviseur/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/raspberry/superviseur-robot/superviseur/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/raspberry/superviseur-robot/superviseur/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/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp</file>
11
+        </group>
12
+    </open-files>
13
+</project-private>

+ 28
- 0
software/raspberry/superviseur-robot/superviseur/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>superviseur</name>
7
+            <c-extensions/>
8
+            <cpp-extensions>cpp</cpp-extensions>
9
+            <header-extensions>h</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>

+ 21
- 10
software/raspberry/superviseur-robot/superviseur/src/functions.cpp View File

@@ -12,16 +12,27 @@ void f_server(void *arg) {
12 12
     printf("Init %s\n", info.name);
13 13
     rt_sem_p(&sem_barrier, TM_INFINITE);
14 14
 
15
-    err = run_nodejs("/usr/local/bin/node", "/home/pi/Interface_Robot/server.js");
15
+    err=openServer(DEFAULT_SERVER_PORT);
16 16
 
17 17
     if (err < 0) {
18
-        printf("Failed to start nodejs: %s\n", strerror(-err));
18
+        printf("Failed to start server: %s\n", strerror(-err));
19 19
         exit(EXIT_FAILURE);
20 20
     } else {
21 21
 #ifdef _WITH_TRACE_
22
-        printf("%s: nodejs started\n", info.name);
22
+        printf("%s: server started\n", info.name);
23 23
 #endif
24
-        open_server();
24
+        //Waiting for a client to connect
25
+        err=acceptClient();
26
+        
27
+        if (err<0) {
28
+            printf("Client accept failed: %s\n", strerror(-err));
29
+            exit(EXIT_FAILURE);
30
+        }
31
+
32
+#ifdef _WITH_TRACE_
33
+        printf ("client connected: %d\n", err);
34
+        printf ("Rock'n'roll baby !\n");
35
+#endif        
25 36
         rt_sem_broadcast(&sem_serverOk);
26 37
     }
27 38
 }
@@ -105,7 +116,7 @@ void f_receiveFromMon(void *arg) {
105 116
                 robotMove = msg.data[0];
106 117
                 rt_mutex_release(&mutex_move);
107 118
 #ifdef _WITH_TRACE_
108
-                printf("%s: message update movement with %c\n", info.name, move);
119
+                printf("%s: message update movement with %c\n", info.name, robotMove);
109 120
 #endif
110 121
 
111 122
             }
@@ -191,18 +202,18 @@ void f_move(void *arg) {
191 202
     rt_sem_p(&sem_barrier, TM_INFINITE);
192 203
 
193 204
     /* PERIODIC START */
194
-#ifdef _WITH_TRACE_
205
+#ifdef _WITH_PERIODIC_TRACE_
195 206
     printf("%s: start period\n", info.name);
196 207
 #endif
197 208
     rt_task_set_periodic(NULL, TM_NOW, 100000000);
198 209
     while (1) {
199
-#ifdef _WITH_TRACE_
210
+#ifdef _WITH_PERIODIC_TRACE_
200 211
         printf("%s: Wait period \n", info.name);
201 212
 #endif
202 213
         rt_task_wait_period(NULL);
203
-#ifdef _WITH_TRACE_
214
+#ifdef _WITH_PERIODIC_TRACE_
204 215
         printf("%s: Periodic activation\n", info.name);
205
-        printf("%s: move equals %c\n", info.name, move);
216
+        printf("%s: move equals %c\n", info.name, robotMove);
206 217
 #endif
207 218
         rt_mutex_acquire(&mutex_robotStarted, TM_INFINITE);
208 219
         if (robotStarted) {
@@ -210,7 +221,7 @@ void f_move(void *arg) {
210 221
             send_command_to_robot(robotMove);
211 222
             rt_mutex_release(&mutex_move);
212 223
 #ifdef _WITH_TRACE_
213
-            printf("%s: the movement %c was sent\n", info.name, move);
224
+            printf("%s: the movement %c was sent\n", info.name, robotMove);
214 225
 #endif            
215 226
         }
216 227
         rt_mutex_release(&mutex_robotStarted);

+ 1
- 0
software/raspberry/superviseur-robot/superviseur/src/functions.h View File

@@ -29,6 +29,7 @@
29 29
 #include "robot.h"
30 30
 #include "image.h"
31 31
 #include "message.h"
32
+#include "server.h"
32 33
 
33 34
 extern RT_TASK th_server;
34 35
 extern RT_TASK th_sendToMon;

Loading…
Cancel
Save