Commit Graph

12 Commits

Author SHA1 Message Date
Matteo Cypriani a9a2331cfa [Positioning] Finish unit tests for Area & Point3D
Area:
- Unit test: test inversion of points.
- Add reorder_coordinates().
- Remove all set_{x,y,z}_{min,max}() accessors.
- Remove set_p_min() and set_p_max().
- Add set_coordinates().
- The constructor now takes 2 Point3D instead of 6 float coordinates.

Point3D:
- Unit test: finish to test distances, test new cast operator.
- Add a cast to string operator.

Unit tests:
- Add valuetraits.hh with class to display correctly a Point3D in a
  wrong assertion.
2011-03-16 14:36:19 +01:00
Matteo Cypriani 1ddebc9cf4 [Positioning] Area: Suppress debug cout
Suppress the last preprocessor-controlled debug display in Area.
2011-03-16 14:36:19 +01:00
Matteo Cypriani f4c825c2d9 [Positioning] const_cast & other minor enhancements
- In all classes where we used a C-style cast to suppress const, we now
  use a const_cast.
- Area: Add operator=().
- InputCSV:
	- Document get_next_request().
	- Handle exception when using Stock::get_{ap,mobile}().
	- In constructor, throw an exception in case of error when opening the
	  input file.
- CalibrationMeasurement: Remove operator<<() which is useless (it is a
  simple call to Measurement operator<<()).
- Makefile: Add target 'check'.
2011-03-16 14:36:10 +01:00
Matteo Cypriani 1f1d7de4f5 [Positioning] Doxygen comments + fixes
- Add/update comments to be Doxygen compliant. Translate existing
  comments in English.
- Various fixes (more or less importants):
	- NULL pointer verification when adding an element to a vector of
	  pointers.
	- Add some missing accessors.
	- Add some more error handling with exceptions. Class Stock: correct
	  accessors (pure read accessors do not create a missing element any
		more, but throw an exception).
- Makefile: Add 'doc' target.
- Update TODO (some things noticed when reviewing the code for
  comments).
2011-03-16 14:36:10 +01:00
Matteo Cypriani d156e91379 [Positioning] Inline short functions
Short functions (accessors and simple operators) are declared inline and
moved in header files, after the class definition.
2011-03-16 14:07:24 +01:00
Matteo Cypriani 96023d8285 [Positioning] Suppress "using" directives in *.hh
(and add .gitignore)
2011-03-16 14:07:24 +01:00
Matteo Cypriani 326f1245ed [Positioning] AccessPoint, Mobile, Measurement, ReferencePoint
- Adding WifiDevice and Mobile. AccessPoint and Mobile are sub-classes
  of WifiDevice.
- Measurement: link to Mobile and AccessPoint.
- Adding CalibrationMeasurement.
- ReferencePoint: add_measurement() and operators, link to
  CalibrationMeasurement (not Measurement).
- Area and Waypoint : using pointers (not references) for attribute
  setting.
- Deleted class ClientInfo (replaced by Mobile).
2011-03-16 14:07:24 +01:00
Matteo Cypriani 85cca4debd [Positioning] Rewriting begins
/!\ This branch does not compile! (But some single files can.)
/!\ All the following commits are broken code. (Hopefully it will work
/!\ in a few days.)

Backup commit. Beginning of the rewriting work on OWLPS Positioning,
following the new class diagram.
2011-03-16 14:07:23 +01:00
Matteo Cypriani d35e0dd5e5 [Positioning] Reindent with astyle 1.24 2011-03-16 14:07:23 +01:00
Julien Graeffly b9bdb9400a Incorporation de la dernière version de Julien
Extrait de son courriel :
  « Par rapport à la précédente j'ai surtout corrigé des bugs. »

Note : la version du listener portable sur Fonera, envoyée en même temps
par Julien, viendra plus tard (le temps que je l'incorpore).

Détail des changements après analyse du code :

aggregator : correction de bogues.

positioning :
* Ajout d'un fichier de config format boost (cfg/config.cfg).
* Makefile : implantation des cibles "install" et "uninstall" ; la cible
  "astyle" devient "style".
* accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc},
  referencepoint.{hh,cc} : cosmétique.
* owlps-positioning.c : correction de la lecture du fichier de config
  (ajout d'une option permettant de spécifier un fichier alternatif).
* server.cc : essentiellement correction des requêtes.
* libowlps-positioning.{hh,cc} : passage de "unsigned long long" à
  "uint64_t" comme type de retour de timeval_to_ms().

writeInDb :
* Ajout de la gestion d'un fichier de config.
* Ajout de deux scripts pour la BDD.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +01:00
Matteo Cypriani 4784fb00df Reconstitution du dépôt, étape 0
Backup du 15-05-2009, restauré pour effacer les mauvais commits de
Julien (mauvaise compréhension de SVN -> mauvaises utilisation).

Du coup j'en profite pour préparer le terrain : un petit coup de astyle
sur chaque fichier, pour que les diffs soient intéressants.
DÉSORMAIS, ASTYLE DEVRA ÊTRE UTILISÉ AVANT CHAQUE COMMIT !

Pour ce faire :
  astyle --style=gnu *.cc *.hh

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@89 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +01:00
Matteo Cypriani 2c30b04a49 Migration vers le nouveau nom OWLPS
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@71 785a6c6c-259e-4ff1-8b91-dc31627914f0

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@73 785a6c6c-259e-4ff1-8b91-dc31627914f0

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@74 785a6c6c-259e-4ff1-8b91-dc31627914f0

  Renommage des fichiers et adaptation des makefiles.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@75 785a6c6c-259e-4ff1-8b91-dc31627914f0

  Adaptation des #include, fin d'adaptation des makefiles.

  Reste à faire : renommage des fichiers de GuiNuMo, adaptation dans le
  code, amélioration du makefile (cible d'installation).
2011-03-16 13:52:45 +01:00