Commit Graph

351 Commits

Author SHA1 Message Date
Matteo Cypriani c980d05baa [Client] Free the allocated packet 2011-03-25 11:48:26 +01:00
Matteo Cypriani 7c6d09d859 [Client] Check the direction 2011-03-25 11:48:25 +01:00
Matteo Cypriani 15f4436628 [Aggregator] Use owl_timestamp_equals() 2011-03-25 11:48:25 +01:00
Matteo Cypriani 67a271596c [lib] Add timestamp_equals()
owl_timestamp_equals() allows to compare two owl_timestamp more
accurately and efficiently than "owl_time_elapsed_ms() == 0".
2011-03-25 11:48:25 +01:00
Matteo Cypriani 4720399513 [lib] mac_bytes_to_string(): do not malloc anymore
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.
2011-03-25 11:48:25 +01:00
Matteo Cypriani e8aa0838f4 Use ETHER_ADDR_LEN instead of 6 2011-03-25 11:48:25 +01:00
Matteo Cypriani d867f97eda [Aggregator] Use owl_timestamp_is_null()
Use owl_timestamp_is_null() instead of owl_timestamp_to_ms() to test if
a timestamp is empty or not.
Note that we cannot remove owl_timestamp_to_ms(), since it it used by
owl_time_elapsed_ms().
2011-03-25 11:48:25 +01:00
Matteo Cypriani 7fa5819544 [lib] Add timestamp_is_null() 2011-03-25 11:48:25 +01:00
Matteo Cypriani 161157dae7 [Positioning] Add InputUDPSocket
The positioning server can now read the requests sent by the aggregator
via UDP. This data exchange does not concern (auto)calibration requests
yet.
2011-03-25 11:48:25 +01:00
Matteo Cypriani c3c319a7f1 [Positioning] Timestamp::Timestamp(owl_timestamp) 2011-03-25 11:48:24 +01:00
Matteo Cypriani d193b49c9c [lib] Make the variable run extern 2011-03-25 11:48:24 +01:00
Matteo Cypriani 5f9de6e1dc [Listener] Fix the "don't want to quit" bug
In capture(), the pcap_loop() call was blocking, so the program did not
quit if no packet came on rtap_iface. This is now fixed by a call to
pcap_breakloop() in the signal handlers.
2011-03-25 11:48:24 +01:00
Matteo Cypriani ccb963cea8 Update TODO 2011-03-25 11:48:24 +01:00
Matteo Cypriani 0a52205916 [Listener] Use pthread_cleanup* 2011-03-25 11:48:24 +01:00
Matteo Cypriani a3f0fb4130 [Aggregator] Use pthread_cleanup* 2011-03-25 11:48:24 +01:00
Matteo Cypriani 2289e0ef9f [lib] Add close_fd() & close_file()
These functions are aimed to be used with pthread_cleanup_push().
2011-03-25 11:48:24 +01:00
Matteo Cypriani ddd4e16b70 [Aggregator] Write all messages to stderr
Since the aggregated requests can be written to stdout, we must not use
it for other messages. Therefore, we now use stderr for all messages.
2011-03-25 11:48:24 +01:00
Matteo Cypriani c87c2e2e93 [lib] Write messages to stderr instead of stdout 2011-03-25 11:48:24 +01:00
Matteo Cypriani 6c4af9020f close(fd) instead of (void) close(fd) 2011-03-25 11:48:24 +01:00
Matteo Cypriani 98386514e5 Use INET_ADDRSTRLEN instead of 16 2011-03-25 11:48:23 +01:00
Matteo Cypriani f71a4650e2 [Listener] Better handling of threads
Fix thread headers, check the return value of pthread_create(), and wait
for the threads at the end of the program.
2011-03-25 11:48:23 +01:00
Matteo Cypriani fd4b51aeff [Aggregator] Get rid of ip_bytes_to_string()
Use inet_ntop() instead of ip_bytes_to_string(). Delete
ip_bytes_to_string().
2011-03-25 11:48:23 +01:00
Matteo Cypriani 457515faf8 [Aggregator] Better handling of threads
Fix thread headers, check the return value of pthread_create(), and wait
for the threads at the end of the program.
2011-03-25 11:48:23 +01:00
Matteo Cypriani e53dc42e1b [Aggregator] Do not skip cleaning tasks on exit 2011-03-25 11:48:23 +01:00
Matteo Cypriani fb18dd6e52 [Aggregator] Initialise sa_flags
valgrind complained about sa_flags being used uninitialised.
2011-03-25 11:48:23 +01:00
Matteo Cypriani 05dc912385 [Aggregator] Allow "-o-" to use standard output 2011-03-25 11:48:23 +01:00
Matteo Cypriani 58795d03d5 [Aggregator] Rename *couple* -> *request*
Get rid of this old name 'couple' in variables, function names & types.
2011-03-25 11:48:23 +01:00
Matteo Cypriani 0a4625c5fc Makefile: add target 'c' to build only C modules 2011-03-25 11:48:23 +01:00
Matteo Cypriani 8f84cffa93 [Aggregator] Rename demande & message -> request 2011-03-25 11:48:23 +01:00
Matteo Cypriani d4e9d9c97b [Listener] Rename variable couple -> request 2011-03-25 11:48:22 +01:00
Matteo Cypriani 91cba33dcd [lib] Rename types
- Lowercase all defined types.
- Prefix with "owl_".
- Rename couple_message -> owl_captured_request.
- Rename couple_info -> owl_request_info.
2011-03-25 11:48:22 +01:00
Matteo Cypriani a72a76d5a9 mv /infrastructure-centred/* /
Get rid of the infrastructure-centred directory: all the modules are now
at the same level.
2011-03-25 11:48:22 +01:00
Matteo Cypriani c97ad877e1 Delete mobile-centred
Delete the old mobile-centred infrastructure.
2011-03-25 11:48:22 +01:00
Matteo Cypriani 0b744995f4 [i-c] Use -I in Makefiles to avoid full path in .c
Use -I to indicate the path to the libraries (libowlps &
libowlps-client), instead of indicating the path into the source files.
2011-03-25 11:48:22 +01:00
Matteo Cypriani f832335f12 [lib] Allow linking to C++ code 2011-03-18 15:27:24 +01:00
Matteo Cypriani 3c29379821 [Positioning] InputCSV: use read_point3d()
Use CSVFileReader::read_point3d() to read the coordinates, instead of
reading 3 floats.
2011-03-18 15:27:24 +01:00
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