Commit Graph

315 Commits

Author SHA1 Message Date
Matteo Cypriani 3fe1f1be6e Update TODO 2011-03-18 15:25:31 +01:00
Matteo Cypriani 5669540d8b [Positioning] Warn about the non-maintained tests 2011-03-18 15:24:37 +01:00
Matteo Cypriani 38769efbf0 [Positioning] Read new timestamp format from CSV 2011-03-18 15:24:37 +01:00
Matteo Cypriani cbd2ba3ca1 [Positioning] Timestamp: enable ns precision
Do not round to millisecond precision anymore, we now keep nanosecond
precision.
2011-03-18 15:24:37 +01:00
Matteo Cypriani 3782ca9012 Track endianess issues
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.
2011-03-18 15:24:31 +01:00
Matteo Cypriani 795ac90614 [Aggregator] Use timestamp_to_string()
Use owl_timestamp_to_string() instead of owl_timestamp_to_ms() to
display the timestamps.
2011-03-16 16:46:10 +01:00
Matteo Cypriani 0b5ebc524f [Listener] Use timestamp_to_string()
Use owl_timestamp_to_string() instead of owl_timestamp_to_ms() to
display the timestamps.
2011-03-16 16:46:10 +01:00
Matteo Cypriani 8ae9e7915b [Client] Use timestamp_to_string()
Use owl_timestamp_to_string() instead of owl_timestamp_to_ms() to
display the packet timestamp.
2011-03-16 16:46:10 +01:00
Matteo Cypriani 33f863e2e1 [lib] Refactor time_elapsed()
owl_time_elapsed() now returns a TIMESTAMP. The new function
owl_time_elapsed_ms() returns a value in milliseconds (old behaviour).
2011-03-16 16:46:10 +01:00
Matteo Cypriani 788a61a712 [lib] Add timestamp_to_string() 2011-03-16 16:46:09 +01:00
Matteo Cypriani d0b15bf978 [lib] Do not round to ms precision anymore
Delete owl_timestamp_round_to_ms(), we now keep nanosecond precision.
2011-03-16 16:46:09 +01:00
Matteo Cypriani 3815ccae8b [lib] Fix timestamp_to_ms()
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).
2011-03-16 16:46:09 +01:00
Matteo Cypriani 4ff1d194e4 [Client] Use owl_hton_timestamp() 2011-03-16 16:46:09 +01:00
Matteo Cypriani f60287bf49 [lib] Change TIMESTAMP type
TIMESTAMP is not a simple alias for struct timespec. It is now a clone
of struct timespec that uses fields of a fixed size (uint32_t).
2011-03-16 16:46:09 +01:00
Matteo Cypriani fb8081f02e [Client] make_packet(): time to ms only once 2011-03-16 16:45:38 +01:00
Matteo Cypriani 94e3701a51 [lib] Add TIMESTAMP endianess converters
Add the functions owl_hton_timestamp() and  owl_ntoh_timestamp().
2011-03-16 16:45:38 +01:00
Matteo Cypriani 5d8e907335 [Aggregator] Swap timestamp and mobile MAC
To be consistent with what is read by owlps-positioning, the mobile MAC
address is now the first field of each line of the CSV file.
2011-03-16 16:45:38 +01:00
Matteo Cypriani c4f413b862 [Positioning] Fix compilation (-lstdc++) 2011-03-16 16:45:38 +01:00
Matteo Cypriani c2b7b52a55 [Listener] Fix autocalibration_ip defaulting
autocalibration_ip was not set to its default value (aggregation_ip) if
not set.
2011-03-16 16:45:38 +01:00
Matteo Cypriani 8e1466eacc [Listener] check_configuration(): port numbers 2011-03-16 16:45:38 +01:00
Matteo Cypriani 5c123d769f [Aggregator] check_configuration(): port numbers 2011-03-16 16:45:37 +01:00
Matteo Cypriani 2fb30970ad [Client] check_configuration(): check port numbers 2011-03-16 16:45:37 +01:00
Matteo Cypriani b88f26e503 [lib] Rename create_udp_sending_socket()
Rename owl_create_udp_sending_socket() -> owl_create_udp_trx_socket().
2011-03-16 16:45:37 +01:00
Matteo Cypriani 940c5f74df [lib] Prefix all functions with owl_ 2011-03-16 16:45:37 +01:00
Matteo Cypriani 686ab87a1c [lib-client] Rename create_socket_to_aggregator()
This function had to be renamed, since it allows (and it is used) to
open sockets to other hosts than the aggregator.
2011-03-16 16:45:37 +01:00
Matteo Cypriani 0045ba8a14 [lib-client] Change function prefix (owlclient_)
Change the function prefix from "owlps_" to "owlclient_".
2011-03-16 16:45:37 +01:00
Matteo Cypriani 7c80f17b0b Create a global TODO file
Most of the local TODO files are merged into the new root TODO.
2011-03-16 16:45:37 +01:00
Matteo Cypriani fe3c509831 [Client] make_packet(): use memset() for the type
Use memset() instead of a direct allocation to set the packet type, to
avoid implicit cast (even though it seems useless here).
2011-03-16 16:45:37 +01:00
Matteo Cypriani 2771f8573b [lib] timestamp_now_ns(): return int (not BOOL) 2011-03-16 16:45:37 +01:00
Matteo Cypriani cfdbdccca3 [Aggregator] Comment ip_bytes_to_string() 2011-03-16 16:45:37 +01:00
Matteo Cypriani b4ee915e2d [Listener] read_packet(): drop the data variable 2011-03-16 16:45:37 +01:00
Matteo Cypriani 7671163f62 [Listener] Rename my_mac -> my_mac_bytes 2011-03-16 16:45:37 +01:00
Matteo Cypriani 60fe0061be [Client] Use strtoul() instead of strtol() 2011-03-16 16:45:37 +01:00
Matteo Cypriani 8123ee3096 Switch to stdint types where possible
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!).
2011-03-16 16:45:37 +01:00
Matteo Cypriani 00c6cccfa2 [Listener] Use memset() instead of bzero() 2011-03-16 16:45:37 +01:00
Matteo Cypriani abb1d170cf [lib] Use memset() instead of bzero() 2011-03-16 16:45:36 +01:00
Matteo Cypriani f8e7d9adef [lib] Use clock_gettime() instead of gettimeofday()
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.
2011-03-16 16:45:36 +01:00
Matteo Cypriani 4c1da67294 [Listener] Do not use directly TIMESTAMP fields
Since struct timeval is now abstracted by TIMESTAMP, we must not use the
structure fields (tv_sec, tv_usec) anymore.
2011-03-16 16:44:32 +01:00
Matteo Cypriani db8f6dff22 [lib] Add timestamp_now()
Use the new function timestamp_now() everywhere instead of
gettimeofday().
2011-03-16 16:44:32 +01:00
Matteo Cypriani ff81d43cb1 [lib] Introduce type TIMESTAMP
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().
2011-03-16 16:44:32 +01:00
Matteo Cypriani 3331a6685f [Aggregator] Rename TIMESTAMP compilation option
The TIMESTAMP compilation-time option is now USE_TIMESTAMP.
2011-03-16 16:44:32 +01:00
Matteo Cypriani 10a47246f4 [lib] Rename sub_date() -> time_elapsed() 2011-03-16 16:44:32 +01:00
Matteo Cypriani 829982766d [lib] Rename mac_cmp() -> mac_equals() 2011-03-16 16:44:32 +01:00
Matteo Cypriani af1c04529d [lib] sigint_handler(): use #ifdef DEBUG 2011-03-16 16:44:32 +01:00
Matteo Cypriani 3d0300cc60 [lib] Translate comments, 72 col. 2011-03-16 16:44:32 +01:00
Matteo Cypriani f33ab91187 [Aggregator] Reorganise usage message, document -o 2011-03-16 16:44:32 +01:00
Matteo Cypriani 0676462082 Makefiles: use colorgcc (only) if it exists
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.
2011-03-16 16:44:32 +01:00
Matteo Cypriani 3027df22a7 [Positioning] Makefile: add help 2011-03-16 16:44:32 +01:00
Matteo Cypriani 8e87249087 [Aggregator] Print mobile MAC to the output file 2011-03-16 16:44:32 +01:00
Matteo Cypriani 47c62a3d5e [Aggregator] Makefile: use -D TIMESTAMP by default 2011-03-16 16:44:31 +01:00