On *BSD, usleep() does not accept an argument greater than 1'000'000 (1
second). owl_msleep() decomposes its arguments to use sleep() and
usleep() calls.
This new type of request will only be used in owlps-positioning, to
distinct the calibration requests that are issued from a real
measurement and those that are generated by the self-calibration
process.
Instead of #define DEBUG, we now prefer to use either verbose levels
or, when needed, NDEBUG. Each Makefile was modified to be able to pass
-D NDEBUG to the compiler (but the corresponding lines are commented),
except in the modules where assert is never used, in which case the
Makefile passes -D DEBUG.
Long story short: to totally disable debugging code, comment-out the
"-D DEBUG" lines and uncomment the "-D NDEBUG" lines, in every Makefile.
Use snprintf() instead of sprintf() in mac_bytes_to_string_r(). This is
really useless, but I want to satisfy the snprintf BSD zealots and get
rid of the warning GCC gives me on OpenBSD.
-lrt is now added as needed in each module Makefile, but not directly in
the library. Furthermore, the Makefiles add -lrt only if the platform is
Linux.
* libowlps, libowlps-client & owlps-listener:
Add Makefiles to compile for OpenWrt 10.03 (Backfire). (owlps-client had
one already.)
* libowlps & libowlps-client:
Update the Makefiles for OpenWrt 8.09 (Kamikaze).
owl_mac_bytes_to_string() now uses a static buffer, so the caller do not
need to free the returned buffer manually. Because of this static
buffer, it is not thread-safe anymore, therefore we introduce
owl_mac_bytes_to_string_r() that is a thread-safe version.
Add some comments, add/remove some endianess conversions. That should be
OK now.
Noticeable changes in owlps.h:
- Type DIRECTION is now an alias for uint8_t instead of an enum.
- Type autocalibration_order now contains an uint8_t instead of an enum.
owl_timestamp_to_ms() did not convert properly the result to uint64_t.
This is now fixed, but time functions are still buggy, as we do not take
into account the length of tv_sec (owl_timestamp_round_to_ms() assumes
that it is 9-digit long).
The use of integer types from inttypes.h & stdint.h should help with
portability issues. It will also force the data transmission between
different architectures to work as intended (if we handle endianess
conversions correctly!).
Abandon the old struct timeval and gettimeofday(). We now use the new
struct timespec and clock_gettime().
struct timespec has a nanosecond resolution, but we lower the resolution
to keep only milliseconds. The code is inspired from the Timestamp class
of the owlps-positioning.
The type TIMESTAMP is a wrapper to the currently-used time structure (we
currently use struct timeval).
The function timeval_to_ms() is now timestamp_to_ms().
owlps-positioning/Makefile used to use colorgcc as the default compiler,
without testing its existence. This is fixed.
The makefiles for libowlps and infrastructure-centred modules now use
colorgcc when available.
The listener does not send its IP address explicitly in the Hello
message anymore. Instead, the aggregator now extract the source address
of the Hello packet.
Autocalibration positioning requests were previously (and stupidly) sent
on the aggregation port. We can now chose the port for autocalibration
requests.
Symbolic link libowlps.so is required to dynamically compile, if
"-lowlps" is used instead of "../../libowlps/libowlps.so.1.0" (which is
now the case in the listener's makefiles, and will be soon for the
others too).
== code/owlps-positioning ==
- Add new class Request (split of Measurement).
- Update Measurement and CalibrationMeasurement (suppress the 'mobile'
attribute).
- Update InputCSV (and InputMedium) to use Request instead of
Measurement. Complete the file reading (mobile & ap pointers remain to
be implemented).
- PosUtil: Add timespec_to_ms(), timespec_to_ns(), ms_to_timespec(), and
ns_to_timespec().
- Makefile: Update to use stlport, fix all deps and add new classes.
- Minor fixes.
- TODO: Add UML-related things, updates Measurement & Request.
== code ==
- libowlps: Add ms_to_timeval() (commented), may be useful later.
- Add TODO.
listener + libowlps : nettoyage, amélioration de la qualité du code,
tests sur le type du paquet capturé.
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@108 785a6c6c-259e-4ff1-8b91-dc31627914f0
aggregator :
* Ajout de l'option getopt manquante pour le port d'envoi.
* Modification des noms des options getopt (options DB en majuscule).
* Correction et harmonisation des noms des options libconfuse et des
#define correspondants.
* Correction et complément de l'aide.
listener :
* Ajout d'une option pour le port d'écoute (-l / listening_port).
* Passage des listes d'options en global (nécessaire pour le port
d'écoute).
* Passage de int à long pour le type du port d'agrégation.
Fichier code/infrastructure-centred/TODO :
* Mise à jour et déplacement des lignes pertinentes dans des TODO
spécialisés (créés pour l'occasion).
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@99 785a6c6c-259e-4ff1-8b91-dc31627914f0
Le commentaire de révision initial figure ci-dessous. Les différences
par rapport à ce commit sont :
- Dans code/infrastructure-centred/owlps-client/ : importation des
modifs de Julien dans la dernière version du client (Julien avait
utilisé comme base une ancienne version).
- Dans code/infrastructure-centred/owlps-listener/ : idem.
- Dans code/owlps-positioning/ :
° Suppression de client (déplacé dans les archives).
° Makefile : ajout d'une pseudo-cible .PHONY.
- code/writeInDb/ :
° Le binaire n'est pas versionné.
° Application de astyle --style=gnu.
| r93 | jgraeffly | 2009-05-27 14:51:40 +0200 (mer 27 mai 2009) | 23 lines
| Chemins modifiés :
| R /code/infrastructure-centred/owlps-aggregator/owlps-aggregator.h
| R /code/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c
| R /code/infrastructure-centred/owlps-client/owlps-client.c
| R /code/infrastructure-centred/owlps-listener/owlps-listener.h
| R /code/infrastructure-centred/owlps-listener/owlps-listenerd.c
| R /code/libowlps/owlps.h
| R /code/owlps-positioning/Makefile
| D /code/owlps-positioning/client
| A /code/owlps-positioning/libowlps-positioning.cc
| A /code/owlps-positioning/libowlps-positioning.hh
| R /code/owlps-positioning/owlps-positioning.cc
| A /code/owlps-positioning/owlps-positioning.cfg
| R /code/owlps-positioning/owlps-positioning.hh
| R /code/owlps-positioning/positioning.cc
| R /code/owlps-positioning/positioning.hh
| R /code/owlps-positioning/server.cc
| R /code/owlps-positioning/server.hh
| R /code/owlps-positioning/treatment.cc
| R /code/owlps-positioning/treatment.hh
| A /code/writeInDb
| A /code/writeInDb/writeindb
| A /code/writeInDb/writeindb.cc
| A /code/writeInDb/writeindb.hh
|
| - Mise à jour du positioner :
| Prise en charge de la BdD pour utilisation ainsi que pour la
| sauvegarde des résultats
| Envoi du résultat au client
| Prise en compte du fichier de configuration ainsi que des
| lignes de commande avec la library boost
|
| - Mise à jour de l'aggregator :
| Pris en compte de la BdD pour la sauvegarde des requetes de
| calibration ou de localisation
| Envoi des demandes de localisation uniquement vers le
| positioner
| Ajout des options utilisables en ligne de commande et dans le
| fichier de conf
|
| - Mise à jour du listener :
| Ajout de l'envoi de l'adresse IP du mobile
|
| - Mise à jour du mobile :
| Ajout de la socket de récupération de la réponse du serveur la
| réponse est sous forme de 3 float (x, y, z) et non d'un Point.
|
| - Mise à jour de owlps.h :
| Ajout des ports par défaut du positioner ainsi que du mobile.
|
| - Ajout de writeInDb :
| Programme permettant de mettre les données contenu dans un
| fichier dans la BdD
git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@94 785a6c6c-259e-4ff1-8b91-dc31627914f0