diff --git a/software/monitor/monitor/monitor b/software/monitor/monitor/monitor index 918885c..f916d3a 100755 Binary files a/software/monitor/monitor/monitor and b/software/monitor/monitor/monitor differ diff --git a/software/monitor/monitor/monitor.csproj b/software/monitor/monitor/monitor.csproj index 91f5ba0..34f79ce 100644 --- a/software/monitor/monitor/monitor.csproj +++ b/software/monitor/monitor/monitor.csproj @@ -46,8 +46,6 @@ - - diff --git a/software/raspberry/superviseur-robot/lib/commonitor.cpp b/software/raspberry/superviseur-robot/lib/commonitor.cpp index e5bdd60..bb64388 100644 --- a/software/raspberry/superviseur-robot/lib/commonitor.cpp +++ b/software/raspberry/superviseur-robot/lib/commonitor.cpp @@ -178,10 +178,16 @@ Message *ComMonitor::Read() { if (clientID > 0) { while (!endReception) { if ((length = recv(clientID, (void*) &data, 1, MSG_WAITALL)) > 0) { + //cout << "length = " << to_string(length) << endl << flush; if (data != '\n') { s += data; } else endReception = true; } + else { + endReception = true; + } + + //cout << "2- length = " << to_string(length) << endl << flush; } if (length <= 0) msg = new Message(MESSAGE_MONITOR_LOST); diff --git a/software/raspberry/superviseur-robot/main.cpp b/software/raspberry/superviseur-robot/main.cpp index fd44ad2..f2679c3 100644 --- a/software/raspberry/superviseur-robot/main.cpp +++ b/software/raspberry/superviseur-robot/main.cpp @@ -37,13 +37,15 @@ int main(int argc, char **argv) { cout<<"#################################"< 1 - 0 + 1 - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks.cpp - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.h - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.cpp - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/main.cpp - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks.h + file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/main.cpp + file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/tasks.h + file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/tasks.cpp + file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/comrobot.h + file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/messages.h + file:/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/commonitor.h diff --git a/software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.13-pi-22 b/software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.13-pi-22 index a4a139d..05a3280 100644 --- a/software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.13-pi-22 +++ b/software/raspberry/superviseur-robot/nbproject/private/timestamps-10.105.1.13-pi-22 @@ -1,4 +1,4 @@ -#Thu Jan 17 13:32:55 CET 2019 +#Fri Feb 08 17:01:19 CET 2019 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enumvalues_3.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/camera_8h_source.html=c1547565563000 @@ -19,6 +19,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/nomatches.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_com_robot.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_string-members.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/base64/test.cpp=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_5.map=c1547564949000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/messages_8h__dep__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp=c1542105130000 @@ -35,15 +36,18 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/gdbsudo.sh=c1542120848000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_d.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_b.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/src/uiExample.cpp=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug__RPI_.mk=c1542104029000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_4.md5=c1547563913000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/.dep.inc=c1547717148000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_3.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/navtreedata.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int__coll__graph.map=c1547560340000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_c.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_arena.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_7.js=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/src/rtvideoExample.cpp=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/server.cpp=c1544778298000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherits.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/CMakeLists.txt=c1542120848000 @@ -74,6 +78,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/files.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_1.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/messages_8h__dep__incl.pdf=c1547560339000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/.gitignore=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/private/Makefile-variables.mk=c1542029322000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_13.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enums_1.html=c1547565563000 @@ -111,6 +116,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message__inherit__graph.pdf=c1547564949000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/files_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_position__inherit__graph.pdf=c1547560340000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/commonitor.h=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_a.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_string.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_c.html=c1547565563000 @@ -120,9 +126,13 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp=c1547728285000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/nav_g.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_2.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/commonitor.cpp=c1549622533000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_9.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.cpp=c1547728293000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/img.h=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int-members.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug__PC_.bash=c1548424346000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/src/serialTest.cpp=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/camera_8h__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img-members.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/files_0.html=c1547565563000 @@ -131,6 +141,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img__inherit__graph.map=c1547560340000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_8.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_img__coll__graph.md5=c1547563913000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-variables.mk=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/files_2.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message__inherit__graph.md5=c1547564949000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_2.map=c1547560340000 @@ -155,13 +166,16 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/hierarchy.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/nav_f.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/.gitignore=c1547565649000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/CMakeLists.txt=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_2.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/img_8h__dep__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_img__inherit__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_string__coll__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_14.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/close.png=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/project.properties=c1548424347000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enumvalues_1.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/comrobot.h=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message__inherit__graph.map=c1547564949000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h=c1518398687000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_6.html=c1547565563000 @@ -171,9 +185,11 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/server.h=c1544778298000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_com_monitor.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/img_8h__dep__incl.pdf=c1547560339000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/private/Makefile-variables.mk=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.h=c1544797217000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug.bash=c1544780526000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Release.mk=c1542104029000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/tasks.h=c1549641678000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/Makefile=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/classes_4.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_2.js=c1547565563000 @@ -191,6 +207,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/.gitignore=c1541685829000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_b.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Debug__RPI_.bash=c1542029322000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/messages.cpp=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/messages_8h__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_1.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/tab_h.png=c1547565563000 @@ -198,16 +215,21 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/files_1.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enums_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_arena-members.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/project.xml=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Package-Release.bash=c1541685829000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_f.js=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/superviseur.doxygen=c1548424347000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_camera.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/classes_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/globals.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_13.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/pthread_version/tasks_pthread.h=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_string__inherit__graph.md5=c1547560339000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/img.cpp=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_battery-members.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/base64_8h.tex=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug.mk=c1547717055000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_battery__inherit__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_0.map=c1547564862000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_9.js=c1547565563000 @@ -243,6 +265,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_battery__coll__graph.png=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_3.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/img_8h__incl.map=c1547560339000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/pthread_version/tasks_pthread.cpp=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks.cpp=c1547728371000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/img.h=c1547565126000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/project.properties=c1544778298000 @@ -252,6 +275,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_string__coll__graph.pdf=c1547560340000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/commonitor_8h.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/ProjDestijl.cbp=c1542120848000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/camera.cpp=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/doc.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.digi.xctung.prefs=c1547722800000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_3.js=c1547565563000 @@ -272,6 +296,7 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/commonitor.h=c1546527039000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__RPI_.mk=c1547717999000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/files.js=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/main.cpp=c1549276684000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/menu.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/globals_type.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/messages_8h__incl.pdf=c1547560339000 @@ -280,44 +305,51 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_battery__inherit__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_string__coll__graph.map=c1547560340000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/messages_8h_source.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug__RPI_.bash=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/dir_96aba1edb3024c67427e5e41410f3c29.tex=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/annotated.tex=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_c.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/monitor.cpp=c1544778298000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/messages_8h__incl.map=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/comrobot_8h__incl.md5=c1547560339000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/.gitignore=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug__Pthread__RPI.bash=c1546855871000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/message.cpp=c1542105181000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/struct_position.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_a.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_5.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/comrobot_8h__incl.pdf=c1547560339000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_4.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_2.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_4.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/serialTest.cpp=c1542120848000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/base64_8h.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enumvalues_2.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/base64_8h.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_9.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/comrobot.cpp=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_arena.tex=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/dir_97aefd0d527b934f1d99a682da8fe6a9.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_f.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_int__inherit__graph.pdf=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_battery.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_int__inherit__graph.pdf=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/tab_s.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/base64_8h_source.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/comrobot_8h__incl.map=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_img.tex=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_4.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/comrobot_8h__incl.map=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/robot-icon.resized.png=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/compile-and-run-test=c1518398687000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_4.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/sync_on.png=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/compile-and-run-test=c1518398687000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/gdbsudo.sh=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/classes_2.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/src/serialExample.cpp=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/typedefs_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_string.js=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/base64/base64.h=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/compile_commands.json=c1542120848000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_battery__coll__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int__inherit__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/doxygen.sty=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/src/videoExample.cpp=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Debug__Pthread_.bash=c1545062469000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/src/image.cpp=c1542104053000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/camera_8h__incl.png=c1547560339000 @@ -330,11 +362,12 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.h=c1547564899000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/globals_enum.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/messages.cpp=c1546526752000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int__inherit__graph.map=c1547560340000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_string.tex=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/base64_8h__incl.png=c1547560339000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int__inherit__graph.map=c1547560340000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_battery__coll__graph.md5=c1547560339000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/base64_8h__incl.png=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/search_m.png=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-impl.mk=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/globals_func.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/jquery.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/files_3.js=c1547565563000 @@ -342,25 +375,30 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enums_2.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/camera.h=c1547564761000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_com_monitor.js=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/base64/README.md=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/classes_2.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_b.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/not_for_students/examples/src/serverTest.cpp=c1548953827000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/globals_defs.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_6.png=c1547564862000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/search.css=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_camera.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/search.css=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__PC_.mk=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_battery__inherit__graph.pdf=c1547560339000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_battery__coll__graph.map=c1547560339000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/monitor.h=c1544778298000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/classes.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/monitor.h=c1544778298000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/test.cpp=c1518398687000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_3.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/.dep.inc=c1548953904000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_1.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_8.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_3.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_b.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_8.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_6.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position__coll__graph.md5=c1547564861000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/tabs.css=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position__coll__graph.md5=c1547564861000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/README.md=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position-members.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/search_l.png=c1547565563000 @@ -368,86 +406,88 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enumvalues_3.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/classes_1.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/serverTest.cpp=c1542120848000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/folderopen.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/folderopen.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/typedefs_1.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.h=c1546961074000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/dir_97aefd0d527b934f1d99a682da8fe6a9.tex=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/struct_position-members.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_a.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/messages_8h.tex=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_a.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_5.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/typedefs_1.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_5.png=c1547564949000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/.dep.inc=c1542102478000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/tab_b.png=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/.dep.inc=c1542102478000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_5.png=c1547564949000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/img_8h_source.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_f.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position__coll__graph.map=c1547564862000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/annotated.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position__coll__graph.map=c1547564862000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position__inherit__graph.png=c1547560340000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_5.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_com_monitor.tex=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/globals_eval.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/mag_sel.png=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-impl.mk=c1542029322000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/globals_eval.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_a.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-impl.mk=c1542029322000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_5.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_10.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/bdwn.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_battery__coll__graph.pdf=c1547560339000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/bdwn.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int__coll__graph.png=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs=c1547721237000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/resize.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/functions_func.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_11.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/resize.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/open.png=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/messages_8h__dep__incl.png=c1547560339000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_11.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_camera-members.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/messages_8h__dep__incl.png=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/serialExample.cpp=c1542120848000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/CMakeLists.txt=c1542120848000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/functions_vars.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/gdbsudo.sh=c1541685829000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/img_8h.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_com_robot.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/gdbsudo.sh=c1541685829000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/rtvideoExample.cpp=c1542120848000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_com_robot.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_com_monitor-members.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks.h=c1547716000000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_a.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks.h=c1547716000000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/base64/base64.cpp=c1518398687000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_4.png=c1547563913000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/tab_a.png=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_4.png=c1547563913000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Package-Release.bash=c1544780526000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/classes_3.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img__coll__graph.png=c1547563913000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.h=c1542117699000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/base64/LICENSE=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/struct_position.tex=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.h=c1542117699000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img__coll__graph.png=c1547563913000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.cpp=c1544778298000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/camera_8h__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enumvalues_4.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_0.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/uiExample.cpp=c1542120848000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/camera_8h__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_2.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/uiExample.cpp=c1542120848000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_0.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/graph_legend.md5=c1547560339000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_9.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_7.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_9.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/main.cpp=c1542105162000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/tasks_pthread.cpp=c1547195899000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_int__coll__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/doxygen.png=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_int__coll__graph.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/commonitor_8h__incl.png=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Debug__Pthread_.mk=c1547649766000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug.mk=c1542104029000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/project.properties=c1542103467000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_c.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/nbproject/Makefile-Debug.mk=c1542104029000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/classes_0.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi=c1547722800000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_c.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_7.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi=c1547722800000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-variables.mk=c1546855871000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/typedefs_0.html=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/camera.h=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_com_robot.tex=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/base64_8h__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/dir_96aba1edb3024c67427e5e41410f3c29.html=c1547565563000 @@ -457,48 +497,54 @@ /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/camera_8h__incl.map=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_3.png=c1547560340000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/class_message_battery.tex=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/tasks.cpp=c1549641580000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/messages.h=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_b.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_6.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/commonitor_8h__incl.md5=c1547560339000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_c.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_e.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_c.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/commonitor_8h__incl.md5=c1547560339000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/closed.png=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/private/Makefile-variables.mk=c1546855871000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Release.mk=c1547649766000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_int.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/Makefile-Release.mk=c1547649766000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/nbproject/private/Makefile-variables.mk=c1546855871000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/index.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_4.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/message.cpp=c1544778298000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_6.md5=c1547564861000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/refman.tex=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/functions_1.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/menudata.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_position.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/menudata.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_arena.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/.gitignore=c1542120848000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_com_robot-members.html=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/.gitignore=c1542120848000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/base64_8h__incl.map=c1547560339000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/base64/.gitignore=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/messages_8h__dep__incl.md5=c1547560339000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/Makefile=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/doxygen.css=c1547565563000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/base64/compile-and-run-test=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_b.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_6.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/struct_position.html=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/examples/src/videoExample.cpp=c1542120848000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_img__inherit__graph.png=c1547560339000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_message_battery.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_12.js=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_img.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/variables_0.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/bc_s.png=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/class_img.js=c1547565563000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/all_12.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_6.map=c1547564862000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/README.md=c1541685829000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_2.png=c1547560340000 +/home_pers/pehladik/dumber/software/raspberry/superviseur-robot/lib/.gitignore=c1548424346000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/search/enums_2.html=c1547565563000 VERSION=1.3 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/latex/robot-icon.resized.png=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs=c1547722800000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/hierarchy.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/img_8h.html=c1547565563000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_5.md5=c1547564949000 -/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/robot.h=c1544778298000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/hierarchy.js=c1547565563000 /home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/Makefile=c1542100687000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/robot.h=c1544778298000 +/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/doc/html/inherit_graph_5.md5=c1547564949000 diff --git a/software/raspberry/superviseur-robot/tasks.cpp b/software/raspberry/superviseur-robot/tasks.cpp index 0e543ec..eacc86c 100644 --- a/software/raspberry/superviseur-robot/tasks.cpp +++ b/software/raspberry/superviseur-robot/tasks.cpp @@ -21,7 +21,7 @@ // Déclaration des priorités des taches #define PRIORITY_TSERVER 30 #define PRIORITY_TOPENCOMROBOT 20 -#define PRIORITY_TMOVE 10 +#define PRIORITY_TMOVE 20 #define PRIORITY_TSENDTOMON 22 #define PRIORITY_TRECEIVEFROMMON 25 #define PRIORITY_TSTARTROBOT 20 @@ -57,6 +57,14 @@ void Tasks::Init() { /**************************************************************************************/ /* Mutex creation */ /**************************************************************************************/ + if (err = rt_mutex_create(&mutex_monitor, NULL)) { + cerr << "Error mutex create: " << strerror(-err) << endl << flush; + exit(EXIT_FAILURE); + } + if (err = rt_mutex_create(&mutex_robot, NULL)) { + cerr << "Error mutex create: " << strerror(-err) << endl << flush; + exit(EXIT_FAILURE); + } if (err = rt_mutex_create(&mutex_robotStarted, NULL)) { cerr << "Error mutex create: " << strerror(-err) << endl << flush; exit(EXIT_FAILURE); @@ -95,11 +103,11 @@ void Tasks::Init() { cerr << "Error task create: " << strerror(-err) << endl << flush; exit(EXIT_FAILURE); } - if (err = rt_task_create(&th_receiveFromMon, "th_receiveFromMon", 0, PRIORITY_TRECEIVEFROMMON, 0)) { + if (err = rt_task_create(&th_sendToMon, "th_sendToMon", 0, PRIORITY_TSENDTOMON, 0)) { cerr << "Error task create: " << strerror(-err) << endl << flush; exit(EXIT_FAILURE); } - if (err = rt_task_create(&th_sendToMon, "th_sendToMon", 0, PRIORITY_TSENDTOMON, 0)) { + if (err = rt_task_create(&th_receiveFromMon, "th_receiveFromMon", 0, PRIORITY_TRECEIVEFROMMON, 0)) { cerr << "Error task create: " << strerror(-err) << endl << flush; exit(EXIT_FAILURE); } @@ -115,10 +123,6 @@ void Tasks::Init() { cerr << "Error task create: " << strerror(-err) << endl << flush; exit(EXIT_FAILURE); } - if (err = rt_task_create(&th_camera, "th_camera", 0, PRIORITY_TCAMERA, 0)) { - cerr << "Error task create: " << strerror(-err) << endl << flush; - exit(EXIT_FAILURE); - } cout << "Tasks created successfully" << endl << flush; /**************************************************************************************/ @@ -130,47 +134,39 @@ void Tasks::Init() { } cout << "Queues created successfully" << endl << flush; - /* Open com port with STM32 */ - cout << "Open serial com ("; - status = robot.Open(); - cout << status; - cout << ")" << endl; - - if (status >= 0) { - // Open server - - status = monitor.Open(SERVER_PORT); - cout << "Open server on port " << (SERVER_PORT) << " (" << status << ")" << endl; - - if (status < 0) throw std::runtime_error { - "Unable to start server on port " + std::to_string(SERVER_PORT) - }; - } else - throw std::runtime_error { - "Unable to open serial port /dev/ttyS0 " - }; } /** * @brief Démarrage des tâches */ void Tasks::Run() { + rt_task_set_priority(NULL, T_LOPRIO); int err; - if (err = rt_task_start(&th_receiveFromMon, (void(*)(void*)) & Tasks::ReceiveFromMonTask, this)) { + if (err = rt_task_start(&th_server, (void(*)(void*)) & Tasks::ServerTask, this)) { cerr << "Error task start: " << strerror(-err) << endl << flush; exit(EXIT_FAILURE); } - - if (err = rt_task_start(&th_camera, (void(*)(void*)) & Tasks::CameraTask, this)) { + /**/if (err = rt_task_start(&th_sendToMon, (void(*)(void*)) & Tasks::SendToMonTask, this)) { + cerr << "Error task start: " << strerror(-err) << endl << flush; + exit(EXIT_FAILURE); + }/**/ + /**/if (err = rt_task_start(&th_receiveFromMon, (void(*)(void*)) & Tasks::ReceiveFromMonTask, this)) { + cerr << "Error task start: " << strerror(-err) << endl << flush; + exit(EXIT_FAILURE); + }/**/ + /**/if (err = rt_task_start(&th_openComRobot, (void(*)(void*)) & Tasks::OpenComRobot, this)) { + cerr << "Error task start: " << strerror(-err) << endl << flush; + exit(EXIT_FAILURE); + }/**/ + if (err = rt_task_start(&th_startRobot, (void(*)(void*)) & Tasks::StartRobotTask, this)) { + cerr << "Error task start: " << strerror(-err) << endl << flush; + exit(EXIT_FAILURE); + } + if (err = rt_task_start(&th_move, (void(*)(void*)) & Tasks::MoveTask, this)) { cerr << "Error task start: " << strerror(-err) << endl << flush; exit(EXIT_FAILURE); } - - // if (err = rt_task_start(&th_sendToMon, (void(*)(void*)) & Tasks::SendToMonTask, this)) { - // cerr << "Error task start: " << strerror(-err) << endl << flush; - // exit(EXIT_FAILURE); - // } cout << "Tasks launched" << endl << flush; } @@ -186,157 +182,31 @@ void Tasks::Stop() { /** */ void Tasks::Join() { + cout << "Tasks synchronized" << endl << flush; rt_sem_broadcast(&sem_barrier); pause(); } /** - * @brief Thread handling server communication. + * @brief Thread handling server communication with the monitor. */ - -void Tasks::ReceiveFromMonTask(void *arg) { - Message *msgRcv; - Message *msgSend; - bool isActive = true; - +void Tasks::ServerTask(void *arg) { cout << "Start " << __PRETTY_FUNCTION__ << endl << flush; + // Synchronization barrier (waiting that all tasks are started) + rt_sem_p(&sem_barrier, TM_INFINITE); - while (isActive) { - msgRcv = NULL; - msgSend = NULL; + rt_mutex_acquire(&mutex_monitor, TM_INFINITE); + int status = monitor.Open(SERVER_PORT); + rt_mutex_release(&mutex_monitor); - msgRcv = monitor.Read(); - cout << "Rcv <= " << msgRcv->ToString() << endl << flush; + cout << "Open server on port " << (SERVER_PORT) << " (" << status << ")" << endl; - if (msgRcv->CompareID(MESSAGE_ROBOT_COM_OPEN)) { - msgSend = new Message(MESSAGE_ANSWER_ACK); - isActive = true; - - delete(msgRcv); // mus be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_ROBOT_COM_CLOSE)) { - msgSend = new Message(MESSAGE_ANSWER_ACK); - cout << "isActive = false!" << msgRcv->ToString() << endl << flush; - isActive = false; - - delete(msgRcv); // mus be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_ROBOT_START_WITH_WD)) { - msgSend = robot.Write(msgRcv); - cout << "Start with wd answer: " << msgSend->ToString() << endl << flush; - } - - if (msgRcv->CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) { - msgSend = robot.Write(msgRcv); - cout << "Start without wd answer: " << msgSend->ToString() << endl << flush; - } - - if (msgRcv->CompareID(MESSAGE_ROBOT_RESET)) { - msgSend = robot.Write(msgRcv); - cout << "Reset answer: " << msgSend->ToString() << endl << flush; - } - - if (msgRcv->CompareID(MESSAGE_ROBOT_GO_FORWARD) || - msgRcv->CompareID(MESSAGE_ROBOT_GO_BACKWARD) || - msgRcv->CompareID(MESSAGE_ROBOT_GO_LEFT) || - msgRcv->CompareID(MESSAGE_ROBOT_GO_RIGHT) || - msgRcv->CompareID(MESSAGE_ROBOT_STOP)) { - msgSend = robot.Write(msgRcv); - - cout << "Movement answer: " << msgSend->ToString() << endl << flush; - - if (msgSend->CompareID(MESSAGE_ANSWER_ACK)) { - delete (msgSend); - msgSend = NULL; - } - } - - if (msgRcv->CompareID(MESSAGE_CAM_OPEN)) { - sendImage = true; - msgSend = new Message(MESSAGE_ANSWER_ACK); - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_CAM_CLOSE)) { - sendImage = false; - msgSend = new Message(MESSAGE_ANSWER_ACK); - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_CAM_POSITION_COMPUTE_START)) { - sendPosition = true; - msgSend = new Message(MESSAGE_ANSWER_ACK); - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_CAM_POSITION_COMPUTE_STOP)) { - sendPosition = false; - msgSend = new Message(MESSAGE_ANSWER_ACK); - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_ROBOT_BATTERY_GET)) { - msgSend = new MessageBattery(MESSAGE_ROBOT_BATTERY_LEVEL, BATTERY_FULL); - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_CAM_ASK_ARENA)) { - showArena = true; - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_CAM_ARENA_CONFIRM)) { - showArena = false; - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgRcv->CompareID(MESSAGE_CAM_ARENA_INFIRM)) { - showArena = false; - - delete(msgRcv); // must be deleted manually, no consumer - } - - if (msgSend != NULL) monitor.Write(msgSend); - } -} - -/** - * @brief Thread handling periodic image capture. - */ -void Tasks::CameraTask(void* arg) { - struct timespec tim, tim2; - Message *msgSend; - int counter; - int cntFrame = 0; - Position pos; - Arena arena; - - tim.tv_sec = 0; - tim.tv_nsec = 50000000; // 50ms (20fps) - - cout << "Start " << __PRETTY_FUNCTION__ << endl << flush; - - Camera camera = Camera(sm, 20); - cout << "Try opening camera" << endl << flush; - if (camera.Open()) cout << "Camera opened successfully" << endl << flush; - else { - cout << "Failed to open camera" << endl << flush; - - exit(0); - } - - while (1) { - - } + if (status < 0) throw std::runtime_error { + "Unable to start server on port " + std::to_string(SERVER_PORT) + }; + monitor.AcceptClient(); // Wait the monitor client + cout << "Rock'n'Roll baby, client accepted!" << endl << flush; + rt_sem_broadcast(&sem_serverOk); } /** @@ -344,9 +214,147 @@ void Tasks::CameraTask(void* arg) { */ void Tasks::SendToMonTask(void* arg) { cout << "Start " << __PRETTY_FUNCTION__ << endl << flush; + // Synchronization barrier (waiting that all tasks are starting) + rt_sem_p(&sem_barrier, TM_INFINITE); + + rt_sem_p(&sem_serverOk, TM_INFINITE); + + while (1) { + cout << "wait msg to send" << endl << flush; + Message *msg = ReadInQueue(&q_messageToMon); + cout << "Send msg to mon: " << msg->ToString() << endl << flush; + rt_mutex_acquire(&mutex_monitor, TM_INFINITE); + monitor.Write(msg); + rt_mutex_release(&mutex_monitor); + } +} + +/** + * @brief Thread receiving data from monitor. + */ +void Tasks::ReceiveFromMonTask(void *arg) { + cout << "Start " << __PRETTY_FUNCTION__ << endl << flush; + // Synchronization barrier (waiting that all tasks are starting) + rt_sem_p(&sem_barrier, TM_INFINITE); + + rt_sem_p(&sem_serverOk, TM_INFINITE); + cout << "Received message from monitor activated" << endl << flush; + + while (1) { + Message *msgRcv; + msgRcv = monitor.Read(); + cout << "Rcv <= " << msgRcv->ToString() << endl << flush; + + if (msgRcv->CompareID(MESSAGE_MONITOR_LOST)) { + delete(msgRcv); + exit(-1); + } else if (msgRcv->CompareID(MESSAGE_ROBOT_COM_OPEN)) { + rt_sem_v(&sem_openComRobot); + } else if (msgRcv->CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) { + rt_sem_v(&sem_startRobot); + } else if (msgRcv->CompareID(MESSAGE_ROBOT_GO_FORWARD) || + msgRcv->CompareID(MESSAGE_ROBOT_GO_BACKWARD) || + msgRcv->CompareID(MESSAGE_ROBOT_GO_LEFT) || + msgRcv->CompareID(MESSAGE_ROBOT_GO_RIGHT) || + msgRcv->CompareID(MESSAGE_ROBOT_STOP)) { + + rt_mutex_acquire(&mutex_move, TM_INFINITE); + move = msgRcv->GetID(); + rt_mutex_release(&mutex_move); + } + delete msgRcv; // mus be deleted manually, no consumer + } +} + +/** + * @brief Thread opening communication with the robot. + */ +void Tasks::OpenComRobot(void *arg) { + int status; + int err; + + cout << "Start " << __PRETTY_FUNCTION__ << endl << flush; + // Synchronization barrier (waiting that all tasks are starting) + rt_sem_p(&sem_barrier, TM_INFINITE); + + while (1) { + rt_sem_p(&sem_openComRobot, TM_INFINITE); + cout << "Open serial com ("; + rt_mutex_acquire(&mutex_robot, TM_INFINITE); + status = robot.Open(); + rt_mutex_release(&mutex_robot); + cout << status; + cout << ")" << endl << flush; + + Message * msgSend; + if (status < 0) { + msgSend = new Message(MESSAGE_ANSWER_NACK); + } else { + msgSend = new Message(MESSAGE_ANSWER_ACK); + } + WriteInQueue(&q_messageToMon, msgSend); + } +} + +/** + * @brief Thread starting the communication with the robot. + */ +void Tasks::StartRobotTask(void *arg) { + cout << "Start " << __PRETTY_FUNCTION__ << endl << flush; + // Synchronization barrier (waiting that all tasks are starting) + rt_sem_p(&sem_barrier, TM_INFINITE); while (1) { + Message * msgSend; + rt_sem_p(&sem_startRobot, TM_INFINITE); + cout << "Start robot without watchdog ("; + rt_mutex_acquire(&mutex_robot, TM_INFINITE); + msgSend = robot.Write(robot.StartWithoutWD()); + rt_mutex_release(&mutex_robot); + cout << msgSend->GetID(); + cout << ")" << endl; + + cout << "Movement answer: " << msgSend->ToString() << endl << flush; + WriteInQueue(&q_messageToMon, msgSend); + + if (msgSend->GetID() == MESSAGE_ANSWER_ACK) { + rt_mutex_acquire(&mutex_robotStarted, TM_INFINITE); + robotStarted = 1; + rt_mutex_release(&mutex_robotStarted); + } + } +} + +/** + * @brief Thread handling control of the robot. + */ +void Tasks::MoveTask(void *arg) { + int rs; + int cpMove; + cout << "Start " << __PRETTY_FUNCTION__ << endl << flush; + // Synchronization barrier (waiting that all tasks are starting) + rt_sem_p(&sem_barrier, TM_INFINITE); + rt_task_set_periodic(NULL, TM_NOW, 1000000000); + + while (1) { + rt_task_wait_period(NULL); + cout << "Periodic movement update"; + rt_mutex_acquire(&mutex_robotStarted, TM_INFINITE); + rs = robotStarted; + rt_mutex_release(&mutex_robotStarted); + if (rs == 1) { + rt_mutex_acquire(&mutex_move, TM_INFINITE); + cpMove = move; + rt_mutex_release(&mutex_move); + + cout << " move: " << cpMove; + + rt_mutex_acquire(&mutex_robot, TM_INFINITE); + robot.Write(new Message((MessageID)cpMove)); + rt_mutex_release(&mutex_robot); + } + cout << endl << flush; } } @@ -355,10 +363,9 @@ void Tasks::SendToMonTask(void* arg) { * @param queue Queue identifier * @param msg Message to be stored */ -void WriteInQueue(RT_QUEUE &queue, Message *msg) { +void Tasks::WriteInQueue(RT_QUEUE *queue, Message *msg) { int err; - - if ((err = rt_queue_send(&queue, (const void *) msg, sizeof ((const void *) msg), Q_NORMAL)) < 0) { + if ((err = rt_queue_write(queue, (const void *) &msg, sizeof ((const void *) &msg), Q_NORMAL)) < 0) { cerr << "Write in queue failed: " << strerror(-err) << endl << flush; throw std::runtime_error{"Error in write in queue"}; } @@ -369,14 +376,16 @@ void WriteInQueue(RT_QUEUE &queue, Message *msg) { * @param queue Queue identifier * @return Message read */ -Message *ReadInQueue(RT_QUEUE &queue) { +Message *Tasks::ReadInQueue(RT_QUEUE *queue) { int err; Message *msg; - if ((err = rt_queue_read(&queue, (void*) msg, sizeof ((void*) msg), TM_INFINITE)) < 0) { - cerr << "Write in queue failed: " << strerror(-err) << endl << flush; - throw std::runtime_error{"Error in write in queue"}; - } + if ((err = rt_queue_read(queue, &msg, sizeof ((void*) &msg), TM_INFINITE)) < 0) { + cout << "Read in queue failed: " << strerror(-err) << endl << flush; + throw std::runtime_error{"Error in read in queue"}; + }/** else { + cout << "@msg :" << msg << endl << flush; + } /**/ return msg; } diff --git a/software/raspberry/superviseur-robot/tasks.h b/software/raspberry/superviseur-robot/tasks.h index c2b3263..42eaa89 100644 --- a/software/raspberry/superviseur-robot/tasks.h +++ b/software/raspberry/superviseur-robot/tasks.h @@ -58,32 +58,23 @@ public: */ void Join(); - /** - */ - bool AcceptClient() { - return monitor.AcceptClient(); - } + private: ComMonitor monitor; ComRobot robot; - - bool sendImage=false; - bool sendPosition=false; - - int counter; - bool flag; - - bool showArena=false; - + int robotStarted; + int move = MESSAGE_ROBOT_STOP; + RT_TASK th_server; RT_TASK th_sendToMon; RT_TASK th_receiveFromMon; RT_TASK th_openComRobot; RT_TASK th_startRobot; RT_TASK th_move; - RT_TASK th_camera; - + + RT_MUTEX mutex_monitor; + RT_MUTEX mutex_robot; RT_MUTEX mutex_robotStarted; RT_MUTEX mutex_move; @@ -94,10 +85,6 @@ private: RT_QUEUE q_messageToMon; - int etatCommMoniteur; - int robotStarted; - char robotMove; - int MSG_QUEUE_SIZE; char mode_start; @@ -115,50 +102,39 @@ private: * @return Message read */ Message *ReadInQueue(RT_QUEUE *queue); - - /** - * @brief Thread handling server communication. - */ - void ReceiveFromMonTask(void *arg); /** - * @brief Thread handling periodic image capture. + * @brief Thread handling server communication with the monitor. */ - void CameraTask(void *arg); - + void ServerTask(void *arg); + /** * @brief Thread sending data to monitor. */ void SendToMonTask(void *arg); -// /** -// * \brief Thread handling server communication. -// */ -// void f_server(void *arg); -// -// /** -// * \brief Thread handling communication to monitor. -// */ -// void f_sendToMon(void *arg); -// -// /** -// * \brief Thread handling communication from monitor. -// */ -// void f_receiveFromMon(void *arg); -// -// /** -// * \brief Thread handling opening of robot communication. -// */ -// void f_openComRobot(void * arg); -// -// /** -// * \brief Thread handling robot mouvements. -// */ -// void f_move(void *arg); -// -// /** -// * \brief Thread handling robot activation. -// */ -// void f_startRobot(void *arg); + + /** + * @brief Thread receiving data from monitor. + */ + void ReceiveFromMonTask(void *arg); + + /** + * @brief Thread opening communication with the robot. + */ + void OpenComRobot(void *arg); + + + /** + * @brief Thread starting the communication with the robot. + */ + void StartRobotTask(void *arg); + + + /** + * @brief Thread handling control of the robot. + */ + void MoveTask(void *arg); + }; #endif // __TASKS_H__