diff --git a/GuiNuMo-server/cfg/topo.csv b/GuiNuMo-server/cfg/topo.csv index 70ee70e..d240bcc 100644 --- a/GuiNuMo-server/cfg/topo.csv +++ b/GuiNuMo-server/cfg/topo.csv @@ -1,4 +1,6 @@ -# nom_pièce;X1;Y1;X2;Y2;Z1;Z2 +# Liste des zones homogènes du bâtiment (pièces). +# Chaque ligne définit une zone, de la forme : +# Nom de la pièce;X1;Y1;X2;Y2;Z1;Z2 1100;1.00;7.28;6.05;3.70;3.00;6.00 0190;1.00;10.88;6.05;7.28;3.00;6.00 @@ -6,9 +8,9 @@ 1070;1.00;18.12;6.05;14.48;3.00;6.00 1060;1.00;25.32;6.05;18.12;3.00;6.00 1050;1.00;31.40;6.05;25.32;3.00;6.00 -CouloirN1;5.00;3.70;6.05;0.50;3.00;6.00 -CouloirN1;6.05;29.50;8.20;0.50;3.00;6.00 -CouloirN1;8.20;16.50;10.00;10.88;3.00;6.00 -WC;8.20;9.00;10.00;0.50;3.00;6.00 +WC N1;8.20;9.00;10.00;0.50;3.00;6.00 1105;8.20;10.88;10.00;9.00;3.00;6.00 1095;8.20;29.30;10.00;24.80;3.00;6.00 +Palier N1;5.00;3.70;8.20;0.50;3.00;6.00 +Couloir N1 A;6.05;29.50;8.20;3.70;3.00;6.00 +Couloir N1 B;8.20;16.50;10.00;10.88;3.00;6.00 diff --git a/GuiNuMo-server/cfg/waypoints.csv b/GuiNuMo-server/cfg/waypoints.csv new file mode 100644 index 0000000..d2755c8 --- /dev/null +++ b/GuiNuMo-server/cfg/waypoints.csv @@ -0,0 +1,39 @@ +# Liste des points de passage. +# Chaque ligne définit les trois coordonnées d'un point, de la forme : +# X;Y;Z + +# 1100 +6.05;6.50;3.00 + +# 0190 +6.05;7.50;3.00 + +# 0180 +6.05;13.50;3.00 + +# 1070 +6.05;14.50;3.00 + +# 1060 +6.05;21.00;3.00 + +# 1050 +6.05;27.75;3.00 + +# WC N1 +8.20;5.00;3.00 + +# 1105 +8.20;9.50;3.00 + +# 1095 +8.20;26.00;3.00 + +# Couloir N1 A / B +8.20;11.50;3.00 +8.20;13.00;3.00 +8.20;14.50;3.00 +8.20;16.00;3.00 + +# Palier N1 +7.50;3.70;3.00 diff --git a/GuiNuMo-server/guinumo.hh b/GuiNuMo-server/guinumo.hh index abc7192..0963ad6 100644 --- a/GuiNuMo-server/guinumo.hh +++ b/GuiNuMo-server/guinumo.hh @@ -2,10 +2,10 @@ #define _GUINUMO_HH_ -#define TEST // Décommenter si on teste le serveur avec des fichiers de mesures (commenter pour utiliser des mesures instantanées transmises par le réseau (NON-IMPLÉMENTÉ). -#define DEBUG // Décommenter pour avoir de l'affichage en plus. -//#define DEBUG_2 // Décommenter pour avoir encore plus d'affichage. -#define DEBUG_T // Décommenter pour afficher chaque entrée et sortie de méthode (trace). +#define TEST // Décommenter si on teste le serveur avec des fichiers de mesures (commenter pour utiliser des mesures instantanées transmises par le réseau (NON-IMPLÉMENTÉ). +#define DEBUG // Décommenter pour avoir de l'affichage en plus. +//#define DEBUG_2 // Décommenter pour avoir encore plus d'affichage. +//#define DEBUG_T // Décommenter pour afficher chaque entrée et sortie de méthode (trace). #endif // _GUINUMO_HH_ diff --git a/GuiNuMo-server/server.cc b/GuiNuMo-server/server.cc index 66dfe93..2fb7176 100644 --- a/GuiNuMo-server/server.cc +++ b/GuiNuMo-server/server.cc @@ -272,7 +272,17 @@ int Server::receive_data() * Recherche un point de coordonnées (x;y;z) dans la liste reference_point_list, retourne true s'il existe, false sinon. */ bool Server::pointExists(const float &x, const float &y, const float &z)const { - return pointExists(reference_point_list, Point(x, y, z)) ; +#ifdef DEBUG_T + cout << "//--> Server::pointExists(&float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + bool ret = pointExists(reference_point_list, Point(x, y, z)) ; + +#ifdef DEBUG_T + cout << "//<-- Server::pointExists(&float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return ret ; } @@ -281,7 +291,17 @@ bool Server::pointExists(const float &x, const float &y, const float &z)const * Recherche un Point dans la liste reference_point_list, retourne true s'il existe, false sinon. */ bool Server::pointExists(const Point &p)const { - return pointExists(reference_point_list, p) ; +#ifdef DEBUG_T + cout << "//--> Server::pointExists(&Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + bool ret = pointExists(reference_point_list, p) ; + +#ifdef DEBUG_T + cout << "//<-- Server::pointExists(&Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return ret ; } @@ -289,7 +309,17 @@ bool Server::pointExists(const Point &p)const /* Recherche un point de coordonnées (x;y;z) dans la liste "point_list", retourne true s'il existe, false sinon. */ bool Server::pointExists(const vector &point_list, const float &x, const float &y, const float &z) const { - return pointExists(point_list, Point(x, y, z)) ; +#ifdef DEBUG_T + cout << "//--> Server::pointExists(&vector, &float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + bool ret = pointExists(point_list, Point(x, y, z)) ; + +#ifdef DEBUG_T + cout << "//<-- Server::pointExists(&vector, &float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return ret ; } @@ -297,11 +327,24 @@ bool Server::pointExists(const vector &point_list, const float & /* Recherche un Point dans la liste "point_list", retourne true s'il existe, false sinon. */ bool Server::pointExists(const vector &point_list, const Point &p) const { +#ifdef DEBUG_T + cout << "//--> Server::pointExists(&vector, &Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + unsigned int i; for (i = 0 ; i < point_list.size() ; i++) if (p == point_list[i].getCoordinates()) - return true; + { +#ifdef DEBUG_T + cout << "//<-- Server::pointExists(&vector, &Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return true; + } + +#ifdef DEBUG_T + cout << "//<-- Server::pointExists(&vector, &Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T return false; } @@ -311,7 +354,17 @@ bool Server::pointExists(const vector &point_list, const Point & /* Do not forget to call pointExists() before this one */ unsigned int Server::pointIndex(const float &x, const float &y, const float &z)const { - return pointIndex(reference_point_list, Point(x, y, z)) ; +#ifdef DEBUG_T + cout << "//--> Server::pointIndex(&float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + unsigned int ret = pointIndex(reference_point_list, Point(x, y, z)) ; + +#ifdef DEBUG_T + cout << "//<-- Server::pointIndex(&float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return ret ; } @@ -319,25 +372,58 @@ unsigned int Server::pointIndex(const float &x, const float &y, const float &z)c /* Do not forget to call pointExists() before this one */ unsigned int Server::pointIndex(const Point &p)const { - return pointIndex(reference_point_list, p) ; +#ifdef DEBUG_T + cout << "//--> Server::pointIndex(&Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + unsigned int ret = pointIndex(reference_point_list, p) ; + +#ifdef DEBUG_T + cout << "//<-- Server::pointIndex(&Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return ret ; } unsigned int Server::pointIndex(const vector &point_list, const float &x, const float &y, const float &z) const { - return pointIndex(point_list, Point(x, y, z)) ; +#ifdef DEBUG_T + cout << "//--> Server::pointIndex(&vector, &float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + unsigned int ret = pointIndex(point_list, Point(x, y, z)) ; + +#ifdef DEBUG_T + cout << "//<-- Server::pointIndex(&vector, &float, &float, &float)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return ret ; } unsigned int Server::pointIndex(const vector &point_list, const Point &p) const { +#ifdef DEBUG_T + cout << "//--> Server::pointIndex(&vector, &Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + unsigned int i; for (i = 0 ; i < reference_point_list.size() ; i++) if (p == reference_point_list[i].getCoordinates()) - return i; + { +#ifdef DEBUG_T + cout << "//<-- Server::pointIndex(&vector, &Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return i ; + } + +#ifdef DEBUG_T + cout << "//<-- Server::pointIndex(&vector, &Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T return 0; // Should never happen } @@ -346,32 +432,57 @@ unsigned int Server::pointIndex(const vector &point_list, const bool Server::apExists(const string &ap_addr)const { - unsigned int i; +#ifdef DEBUG_T + cout << "//--> Server::apExists()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + string str; - for (i = 0 ; i < access_point_list.size() ; i++){ - str=access_point_list[i].getApAddr(); - const int length=str.length(); - for(int j=0; j < length; ++j) - { - str[j] = std::tolower(str[j]); - } - for (i = 0 ; i < access_point_list.size() ; i++) - if (str == ap_addr) - return true; - } - return false; + for (unsigned int i = 0 ; i < access_point_list.size() ; i++) + { + str = access_point_list[i].getApAddr() ; + const int length = str.length() ; + for (int j = 0 ; j < length ; ++j) + str[j] = std::tolower(str[j]) ; + for (i = 0 ; i < access_point_list.size() ; i++) + if (str == ap_addr) + { +#ifdef DEBUG_T + cout << "//<-- Server::apExists()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return true ; + } + } + +#ifdef DEBUG_T + cout << "//<-- Server::apExists()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return false ; } unsigned int Server::apIndex(const string &ap_addr)const { +#ifdef DEBUG_T + cout << "//--> Server::apIndex()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + unsigned int i; for (i = 0 ; i < access_point_list.size() ; i++) if (access_point_list[i].getApAddr() == ap_addr) - return i; + { +#ifdef DEBUG_T + cout << "//<-- Server::apIndex()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return i; + } + +#ifdef DEBUG_T + cout << "//<-- Server::apIndex()" << endl ; fflush(stdout) ; +#endif // DEBUG_T return 0; // Should never happen } @@ -383,6 +494,12 @@ unsigned int Server::apIndex(const string &ap_addr)const */ vector Server::getkClosestInSs(const vector &m, const unsigned int &k)const { +#ifdef DEBUG_T + cout << "//--> Server::getkClosestInSs(&vector, &unsigned int)" << endl ; + cout << "//<-- Server::getkClosestInSs(&vector, &unsigned int)" << endl ; + fflush(stdout) ; +#endif // DEBUG_T + return getkClosestInSs(m, k, NULL) ; } @@ -394,6 +511,10 @@ vector Server::getkClosestInSs(const vector &m, const unsign */ vector Server::getkClosestInSs(const vector &m, const unsigned int &k, const Point *point_ignored)const { +#ifdef DEBUG_T + cout << "//--> Server::getkClosestInSs(&vector, &unsigned int, *Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + unsigned int i, j, min_idx; vector distances_vector; vector points_vector; @@ -475,6 +596,10 @@ vector Server::getkClosestInSs(const vector &m, const unsign cout << distances_vector[i] << " : " << points_vector[i] << endl ; #endif // DEBUG +#ifdef DEBUG_T + cout << "//<-- Server::getkClosestInSs(&vector, &unsigned int, *Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return points_vector; } @@ -482,7 +607,17 @@ vector Server::getkClosestInSs(const vector &m, const unsign Point Server::getkWeightedInSs(const vector &m, const unsigned int &k)const { - return getkWeightedInSs(m, k, NULL) ; +#ifdef DEBUG_T + cout << "//--> Server::getkWeightedInSs(&vector, &unsigned int)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + Point ret = getkWeightedInSs(m, k, NULL) ; + +#ifdef DEBUG_T + cout << "//<-- Server::getkWeightedInSs(&vector, &unsigned int)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + + return ret ; } @@ -491,6 +626,10 @@ Point Server::getkWeightedInSs(const vector &m, const unsigned int */ Point Server::getkWeightedInSs(const vector &m, const unsigned int &k, const Point *point_ignored)const { +#ifdef DEBUG_T + cout << "//--> Server::getkWeightedInSs(&vector, &unsigned int, *Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + unsigned int i, j; vector distances_vector; vector points_vector; @@ -543,6 +682,10 @@ Point Server::getkWeightedInSs(const vector &m, const unsigned int ret.setY(y); ret.setZ(z); +#ifdef DEBUG_T + cout << "//<-- Server::getkWeightedInSs(&vector, &unsigned int, *Point)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return ret; } @@ -550,6 +693,10 @@ Point Server::getkWeightedInSs(const vector &m, const unsigned int Point Server::kPointsAverage(const vector &vp)const { +#ifdef DEBUG_T + cout << "//--> Server::kPointsAverage()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + unsigned int i; float x=0, y=0, z=0; Point p; @@ -564,6 +711,10 @@ Point Server::kPointsAverage(const vector &vp)const p.setY(y / (float) vp.size()); p.setZ(z / (float) vp.size()); +#ifdef DEBUG_T + cout << "//<-- Server::kPointsAverage()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return p; } @@ -571,6 +722,10 @@ Point Server::kPointsAverage(const vector &vp)const Point Server::fbcm(const vector &m, const int &client_idx)const { +#ifdef DEBUG_T + cout << "//--> Server::fbcm()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + Point ret(0, 0, 0); vector addr; vector dist_vect; @@ -619,6 +774,10 @@ Point Server::fbcm(const vector &m, const int &client_idx)const dist_vect.clear(); centres.clear(); +#ifdef DEBUG_T + cout << "//<-- Server::fbcm()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + /* Return position */ return ret; } @@ -626,6 +785,10 @@ Point Server::fbcm(const vector &m, const int &client_idx)const /*second version of fbcm with as parameter vector &m and a list of friis index*/ Point Server::fbcm_friis( const vector &m, const vector friis_idx_list)const { +#ifdef DEBUG_T + cout << "//--> Server::fbcm_friis()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + Point ret(0, 0, 0); vector addr; vector dist_vect; @@ -673,7 +836,12 @@ Point Server::fbcm_friis( const vector &m, const vector frii addr.clear(); dist_vect.clear(); centres.clear(); - cout<<"RESULTAT DU FRBHM ---> "< " << ret << endl ; + +#ifdef DEBUG_T + cout << "//<-- Server::fbcm_friis()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + /* Return position */ return ret; } @@ -681,6 +849,10 @@ Point Server::fbcm_friis( const vector &m, const vector frii Point Server::interlink(const vector &m, const int &client_idx)const { +#ifdef DEBUG_T + cout << "//--> Server::interlink()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + Point ret(0, 0, 0); vector addr; vector dist_vect; @@ -726,6 +898,10 @@ Point Server::interlink(const vector &m, const int &client_idx)cons /* Return position */ return ret; + +#ifdef DEBUG_T + cout << "//<-- Server::interlink()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } @@ -734,14 +910,30 @@ Point Server::interlink(const vector &m, const int &client_idx)cons * Crée la liste des points de référence dans la liste reference_point_list. */ void Server::makeReferencePointListFromFile(const string &filename) { +#ifdef DEBUG_T + cout << "//--> Server::makePointListFromFile(&string)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + makePointListFromFile(reference_point_list, filename, true) ; + +#ifdef DEBUG_T + cout << "//<-- Server::makePointListFromFile(&string)" << endl ; fflush(stdout) ; +#endif // DEBUG_T } void Server::makePointListFromFile(vector &dest_point_list, const string &filename) { +#ifdef DEBUG_T + cout << "//--> Server::makePointListFromFile(&vector, &string)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + makePointListFromFile(dest_point_list, filename, true) ; + +#ifdef DEBUG_T + cout << "//<-- Server::makePointListFromFile(&vector, &string)" << endl ; fflush(stdout) ; +#endif // DEBUG_T } @@ -752,6 +944,10 @@ void Server::makePointListFromFile(vector &dest_point_list, cons */ void Server::makePointListFromFile(vector &dest_point_list, const string &filename, const bool uniq_point) { +#ifdef DEBUG_T + cout << "//--> Server::makePointListFromFile(&vector, &string, bool)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + ifstream input_file ; // Flux d'entrée du fichier. char buffer[BUFFER_LENGTH]; // Buffer lu dans le fichier. string cpp_buffer ; // Buffer au format string. @@ -858,12 +1054,20 @@ void Server::makePointListFromFile(vector &dest_point_list, cons input_file.close(); infos.clear() ; + +#ifdef DEBUG_T + cout << "//<-- Server::makePointListFromFile(&vector, &string, bool)" << endl ; fflush(stdout) ; +#endif // DEBUG_T } void Server::makeApListFromFile(const string &filename) { +#ifdef DEBUG_T + cout << "//--> Server::makeApListFromFile()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + ifstream input_file; char buffer[BUFFER_LENGTH]; vector ap_infos; @@ -914,12 +1118,20 @@ void Server::makeApListFromFile(const string &filename) input_file.close(); + +#ifdef DEBUG_T + cout << "//<-- Server::makeApListFromFile()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } void Server::makeTopologyFromFile(const string &filename) { +#ifdef DEBUG_T + cout << "//--> Server::makeTopologyFromFile()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + ifstream input_file ; char buffer[BUFFER_LENGTH] ; vector infos ; @@ -967,12 +1179,20 @@ void Server::makeTopologyFromFile(const string &filename) #endif // DEBUG input_file.close() ; + +#ifdef DEBUG_T + cout << "//<-- Server::makeTopologyFromFile()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } void Server::makeWaypointDistancesFromFile(const string &filename) { +#ifdef DEBUG_T + cout << "//--> Server::makeWaypointDistancesFromFile()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + ifstream input_file ; char buffer[BUFFER_LENGTH] ; vector infos ; @@ -1103,6 +1323,11 @@ void Server::makeWaypointDistancesFromFile(const string &filename) cout << endl ; #endif // DEBUG + + +#ifdef DEBUG_T + cout << "//<-- Server::makeWaypointDistancesFromFile()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } @@ -1111,7 +1336,15 @@ void Server::makeWaypointDistancesFromFile(const string &filename) * Affiche la liste des points de référence (reference_point_list). */ void Server::printReferencePointList() { +#ifdef DEBUG_T + cout << "//--> Server::printReferencePointList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + printPointList(reference_point_list) ; + +#ifdef DEBUG_T + cout << "//<-- Server::printReferencePointList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } @@ -1119,22 +1352,42 @@ void Server::printReferencePointList() /* Affiche une liste de points (point_list). */ void Server::printPointList(vector &point_list) { +#ifdef DEBUG_T + cout << "//--> Server::printPointList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + for (unsigned int i = 0 ; i < point_list.size() ; i++) cout << point_list[i] << endl ; + +#ifdef DEBUG_T + cout << "//<-- Server::printPointList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } void Server::printAccessPointList() { +#ifdef DEBUG_T + cout << "//--> Server::printAccessPointList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + for (unsigned int i = 0 ; i < access_point_list.size() ; i++) cout << access_point_list[i] << endl; + +#ifdef DEBUG_T + cout << "//<-- Server::printAccessPointList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } void Server::computeFriisFromRefList() { +#ifdef DEBUG_T + cout << "//--> Server::computeFriisFromRefList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + vector friis_idx_list; Point pt_coords, ap_coords; float ap_power, ap_gain, calib_gain = 2, const_term, mes_power, friis_sum; @@ -1172,11 +1425,21 @@ void Server::computeFriisFromRefList() friis_idx_list.clear(); } + +#ifdef DEBUG_T + cout << "//<-- Server::computeFriisFromRefList()" << endl ; fflush(stdout) ; +#endif // DEBUG_T } + + /*Deuxième version de computeFriisFromRefList qui prend en entrée un point et retourne la liste d'index de friis équivalent*/ vector Server::computeFriisFromRefList(const Point &p, const vector &m) { +#ifdef DEBUG_T + cout << "//--> Server::computeFriisFromRefList(&Point, &vector)" << endl ; fflush(stdout) ; +#endif // DEBUG_T + vector friis_idx_list; Point pt_coords, ap_coords; float ap_power, ap_gain, calib_gain = 2, const_term, mes_power/*, friis_sum*/; @@ -1212,6 +1475,10 @@ vector Server::computeFriisFromRefList(const Point &p, const vector)" << endl ; fflush(stdout) ; +#endif // DEBUG_T return friis_idx_list; } @@ -1221,21 +1488,31 @@ vector Server::computeFriisFromRefList(const Point &p, const vector Server::createClient()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + client_list.push_back(ClientInfo()) ; + +#ifdef DEBUG_T + cout << "//<-- Server::createClient()" << endl ; fflush(stdout) ; +#endif // DEBUG_T + return client_list.back() ; } /* Localise le client d'identifiant "client_id" en appliquant l'algorithme voulu. */ -void Server::monitorClient(const unsigned int &client_id, ALGORITHM algo) +void Server::monitorClient(const unsigned int &client_id, const ALGORITHM &algo) { - Point pointFastViterbi; - vector friisFromList; #ifdef DEBUG_T cout << "//--> Server::monitorClient()" << endl ; fflush(stdout) ; #endif // DEBUG_T + Point pointFastViterbi; + vector friisFromList; + vector &E_current = client_list[client_id].getRef_viterbi_Ecurrent(), &E_previous = client_list[client_id].getRef_viterbi_Eprevious() ; @@ -1243,6 +1520,9 @@ void Server::monitorClient(const unsigned int &client_id, ALGORITHM algo) if (VITERBI_N < 2) { cerr << "monitorClient() : N ne peut être inférieur à 2 !" << endl ; +#ifdef DEBUG_T + cout << "//<-- Server::monitorClient()" << endl ; fflush(stdout) ; +#endif // DEBUG_T return ; } diff --git a/GuiNuMo-server/server.hh b/GuiNuMo-server/server.hh index 95e6f48..4dc2b65 100644 --- a/GuiNuMo-server/server.hh +++ b/GuiNuMo-server/server.hh @@ -112,7 +112,7 @@ public: unsigned int getNbReferencePoints()const { return reference_point_list.size(); }; - void monitorClient(const unsigned int &client_id, ALGORITHM algo) ; + void monitorClient(const unsigned int &client_id, const ALGORITHM &algo) ; Point fastViterbiLike(const unsigned int &id_client, float **distance_matrix) ; /* For experimentation purpose only ! */