From 269594c26eef550f97f575e23c53d8b3c10567c9 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Wed, 18 Jun 2008 11:51:09 +0000 Subject: [PATCH] Constante pour les algos dans monitorClient() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit server.{cc,hh} : * Ajout d'un type "ALGORITHM" pour utiliser des noms compréhensibles plutôt que des entiers pour désigner les différents algorithmes utilisables dans la fonction monitorClient(). git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@45 785a6c6c-259e-4ff1-8b91-dc31627914f0 --- GuiNuMo-server/guinumo.cc | 2 +- GuiNuMo-server/server.cc | 32 ++++++++++++++++++-------------- GuiNuMo-server/server.hh | 6 ++++-- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/GuiNuMo-server/guinumo.cc b/GuiNuMo-server/guinumo.cc index 8095791..1f2a9e2 100644 --- a/GuiNuMo-server/guinumo.cc +++ b/GuiNuMo-server/guinumo.cc @@ -19,7 +19,7 @@ int main(int argc, char ** argv) Server server ; server.createClient() ; - server.monitorClient(0,2) ; + server.monitorClient(0, ALGO_BASIC_FRBHM) ; cout << argv[0] << " : fin." << endl ; fflush(stdout) ; diff --git a/GuiNuMo-server/server.cc b/GuiNuMo-server/server.cc index 5a146a3..66dfe93 100644 --- a/GuiNuMo-server/server.cc +++ b/GuiNuMo-server/server.cc @@ -1228,7 +1228,7 @@ ClientInfo& Server::createClient() /* Localise le client d'identifiant "client_id" en appliquant l'algorithme voulu. */ -void Server::monitorClient(const unsigned int &client_id, int algo) +void Server::monitorClient(const unsigned int &client_id, ALGORITHM algo) { Point pointFastViterbi; vector friisFromList; @@ -1294,20 +1294,24 @@ void Server::monitorClient(const unsigned int &client_id, int algo) #ifdef DEBUG cout << "Point courant : " << peregrination_point_list[pt] ; #endif // DEBUG - switch(algo) + + switch (algo) { - case 1:/* Application de l'algorithme Viterbi */ - fastViterbiLike(client_id, NULL) ; - break; - case 2 :/*Application de l'algorithme FRBHM basique*/ - cout<<"-------FRBHM---------"<