summaryrefslogtreecommitdiff
path: root/i/simulotron
diff options
context:
space:
mode:
authorhaller2005-12-12 19:40:07 +0000
committerhaller2005-12-12 19:40:07 +0000
commitad8b9998a75c09dcfae0ac77bfd244e7ae58da1f (patch)
treedf81c1a4e8128fc934fdc88a3546f406c2a165dc /i/simulotron
parent0ed8ece5e2a75f0782dc5286feea11388b6c9696 (diff)
Quelques hh
Diffstat (limited to 'i/simulotron')
-rw-r--r--i/simulotron/src/aiguillage/aiguillage.hh40
-rw-r--r--i/simulotron/src/comc/comc.hh40
-rw-r--r--i/simulotron/src/hub/hub.hh41
3 files changed, 121 insertions, 0 deletions
diff --git a/i/simulotron/src/aiguillage/aiguillage.hh b/i/simulotron/src/aiguillage/aiguillage.hh
new file mode 100644
index 0000000..3c68e66
--- /dev/null
+++ b/i/simulotron/src/aiguillage/aiguillage.hh
@@ -0,0 +1,40 @@
+#ifndef AIGUILLAGE_HH
+#define AIGUILLAGE_HH
+/* aiguillage.hh - Classe rajoutant les info de la source et de la dest d'un packet */
+/* Simulotron - Programme de simulation de robot {{{
+ *
+ * Copyright (C) 2005 Nicolas Haller
+ *
+ * Robot APB Team/Efrei 2006.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+class Aiguillage
+{
+ private:
+ GSTransmitter gqt_;
+ public:
+ /// Constructeur
+ Aiguillage(void);
+ /// Envoie un paquet en rajoutant les infos de sources et de provenance
+ void send(GSMessage & gsm, const std::string & source, const std::string & dest);
+ /// Reçoie un paquet du réseau et supprime les infos src et dest du GSM
+ int receive(GSMessage & gsm, std::string & source, const std::string & dest);
+};
+#endif //AIGUILLAGE_HH
diff --git a/i/simulotron/src/comc/comc.hh b/i/simulotron/src/comc/comc.hh
new file mode 100644
index 0000000..f77aadb
--- /dev/null
+++ b/i/simulotron/src/comc/comc.hh
@@ -0,0 +1,40 @@
+#ifndef COMC_HH
+#define COMC_HH
+/* comc.hh - Classe la plus haute dans la transmission par socket */
+/* Simulotron - Programme de simulation de robot {{{
+ *
+ * Copyright (C) 2006 Nicolas Haller
+ *
+ * Robot APB Team/Efrei 2006.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+template <class C>
+class ComC : public C
+{
+ /// Constructeur
+ ComC(const Address & adr, const std::string & name);
+ /// Envoie un truc dans le réseau
+ template <class T>
+ void send(const T & message, const std::string & destname);
+ /// Recoie quelque chose et appelle une fonction callback
+ void receive(void);
+};
+
+#endif //COMC_HH
diff --git a/i/simulotron/src/hub/hub.hh b/i/simulotron/src/hub/hub.hh
new file mode 100644
index 0000000..40ddc62
--- /dev/null
+++ b/i/simulotron/src/hub/hub.hh
@@ -0,0 +1,41 @@
+#ifndef HUB_HH
+#define HUB_HH
+/* hub.hh - Classe la plus haute dans la transmission par socket */
+/* Simulotron - Programme de simulation de robot {{{
+ *
+ * Copyright (C) 2006 Nicolas Haller
+ *
+ * Robot APB Team/Efrei 2006.
+ * Web: http://assos.efrei.fr/robot/
+ * Email: robot AT efrei DOT fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+class Hub
+{
+ private:
+ TimeH timeh_;
+ Orders ordres_;
+ SocketServer socket_;
+ public:
+ /// Constructeur
+ Hub(void);
+ /// Initialisation
+ Init(void);
+};
+
+#endif //HUB_HH