Matteo Cypriani
6b7e5668fa
Add/update headers on the top of each source file
2012-02-06 16:44:09 +01:00
Matteo Cypriani
7c7aac31e9
Update time-related default values
...
Aggregation time, check intervals, etc.
By default the aggregator cannot fully aggregate calibration requests
any more, only the positioning and autocalibration requests.
In order to aggregate calibration requests, the aggregation timeout
needs to be increased, or the number of packets of the request and
the delay between each of them lowered.
2012-02-06 13:27:05 +01:00
Matteo Cypriani
3ed19bb012
Version printing: "Owl" instead of "Open Wireless"
2012-02-06 13:27:05 +01:00
Matteo Cypriani
1ebc0c57ed
Different port for autocal. orders and hello
...
Differentiate the port on which the autocalibration hello messages are
sent to the aggregator by the listeners, and the one on which the
autocalibration orders are sent by the aggregator to the listeners.
This will allow to run a listener and an aggregator on the same machine
with autocalibration enabled.
Both in the listener and the aggregator, the option -a (autocalibration
port) has been replaced by the options -O (autocalibration order port)
and -H (autocalibration hello port). In the listener, the option -H was
previously used to set the hello delay; this is now the role of the -T
option.
2012-02-06 13:27:05 +01:00
Matteo Cypriani
a0005e9dad
Don't use inet_ntoa() any more
2012-02-06 13:27:05 +01:00
Matteo Cypriani
2c1697b78a
Enable compilation on GNU/kFreeBSD
2012-02-06 13:27:05 +01:00
Matteo Cypriani
16eaecc53f
Avoid displaying non-ASCII characters
...
Avoid displaying UTF-8 characters on the terminal (French quotes &
ellipsis).
2012-02-06 13:26:50 +01:00
Matteo Cypriani
dd01705608
Wrap help messages at 80 columns
...
In Client, Listener and Aggregator, wrap the help message text at 80
columns to make them easier to read on a standard console.
2012-01-24 18:29:50 +01:00
Matteo Cypriani
a1bc3db310
Fix daemon modes (Aggregator, Listener, Client)
...
daemon() must be called prior to set up signal handlers and threads.
2012-01-24 17:27:46 +01:00
Matteo Cypriani
08a8626354
Makefiles: improve static compilation
...
Add a static target for Listener, Aggregator and Positioning.
Strip the static and semistatic targets.
2012-01-11 16:50:39 +01:00
Matteo Cypriani
a4857e4b1f
[Aggregator] Daemon mode (-D)
2012-01-11 16:50:39 +01:00
Matteo Cypriani
cf73bf6309
[lib] Avoid struct arguments & return values
...
Modify the *time*() functions to avoid passing structures in arguments
(using const pointers instead) or returning structures (using result
arguments instead).
2012-01-11 16:50:36 +01:00
Matteo Cypriani
4dc45acff7
Get rid of the SS - 0x100 problems
...
In the listener & aggregator, the signal strength is stored as an
unsigned byte. To display the actual (negative) value, one must
substract 256 (0x100) to the unsigned value.
This commit changes several things:
- Use the decimal (256) instead of the hexadecimal value (0x100).
- Don't substract 256 when copying the value to another unsigned byte
(aggregator).
- Be careful with the type length. In the positioning server, a SS
could be copied to a signed byte, while (theoretically) the negative
value can exceed the capacity of the signed byte. measurement.hh now
defines a type ss_t to store a signal strength value with the good
size (it is currently an int_fast16_t).
2012-01-09 11:11:31 +01:00
Matteo Cypriani
58ba4c79ff
[lib] Rename start_time -> capture_time
...
"start_time" was meaningless in the global data structures of owlps.h,
and could lead to errors in the aggregator, since it defines a field
start_time in one of its internal structures.
2012-01-09 11:11:30 +01:00
Matteo Cypriani
aa8d11e12b
[lib] Rename antenna_signal_dbm -> ss_dbm
...
Use "ss" instead of "antenna_signal" in the data types declared in
owlps.h. Shorter, and as meaningful.
2012-01-09 11:11:30 +01:00
Matteo Cypriani
376aa106dc
[Aggregator] Fix Makefile (don't link with .h)
2012-01-09 11:11:30 +01:00
Matteo Cypriani
61124e4cfc
Makefiles: test CC prior to surcharge it
...
Verifies that CC is at its default value prior to try to surcharge it
with colorgcc.
2012-01-09 11:11:30 +01:00
Matteo Cypriani
8c070d482e
Standardise CLI options
...
Make uniform the command-line options of the various programs.
Positioning: delete some useless short options.
2012-01-09 11:11:30 +01:00
Matteo Cypriani
39300aaa85
Makefiles: translate help
...
Translate help messages from French.
2012-01-09 11:11:30 +01:00
Matteo Cypriani
a70fc783e2
Makefiles: translate comments
...
Translate all the comments from French.
2012-01-09 11:11:30 +01:00
Matteo Cypriani
b3b1f8eda2
[Listener] Display the mobile's IP address
...
When displaying the request to send, display the IP address of the
mobile.
Aggregator: clean the code for displaying requests.
2011-11-22 19:59:01 +01:00
Matteo Cypriani
ac6d5d7854
[Aggregator] Fix position endianess
...
Convert endianess of the coordinates prior to send a request to the
positioning server.
2011-10-24 17:43:04 +02:00
Matteo Cypriani
c158d87b5a
[Aggregator] Fix request display
2011-10-13 15:43:41 +02:00
Matteo Cypriani
3fec57b1ae
Move all error #defines in owlps.h
2011-08-26 11:09:41 +02:00
Matteo Cypriani
a3c16211c2
Use owl_msleep() everywhere
2011-08-24 15:41:17 +02:00
Matteo Cypriani
1a98cf44b2
[Aggregator] Fix config parsing memory leaks
...
Same thing as for the Listener: avoid using exit(), prefer return an int
value instead.
2011-08-24 13:39:01 +02:00
Matteo Cypriani
442c5a4601
[lib] .h all is prefixed with OWL_ or owl_
...
All the types, defines, etc. are now prefixed with "OWL_" or "owl_".
TRUE and FALSE become owl_true and owl_false.
2011-08-22 22:43:35 +02:00
Matteo Cypriani
8327357290
Makefiles: allow to enable -g easily
...
Add a commented line DEBUG=-g in each Makefile.
2011-08-22 22:43:35 +02:00
Matteo Cypriani
de74213102
[lib] Rename OWL_TIMESTAMP_STR_LEN OWL_TIMESTAMP_STRLEN
2011-08-18 14:02:17 +02:00
Matteo Cypriani
ac4dd87ef9
Use ++var instead of var++ whenever possible
2011-08-18 11:45:36 +02:00
Matteo Cypriani
f5895f23c4
[Aggregator] check_interval in ms
...
The check interval is now in milliseconds instead of microseconds.
2011-07-25 12:46:20 +02:00
Matteo Cypriani
051ce9147c
Use -D DEBUG / NDEBUG in Makefiles
...
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.
2011-07-25 12:46:20 +02:00
Matteo Cypriani
f951ce95f2
[Aggregator] Use perror() after recvfrom()
...
Use perror() instead of fprintf() after the recvfrom() calls.
Fix the test in listen_for_aps().
2011-07-25 12:46:19 +02:00
Matteo Cypriani
0f54bd36a3
[Aggregator] Add option -q (quiet mode)
2011-07-25 12:46:15 +02:00
Matteo Cypriani
d6f337dbf2
[Aggregator] Use verbose levels
...
Get rid of #ifdef DEBUG.
2011-07-25 12:45:24 +02:00
Matteo Cypriani
6536805578
[Aggregator] Switch verbose mode to verbose level
...
The verbose option is now an integer value instead of a boolean, to
allow several levels of verbosity.
2011-07-23 21:37:02 +02:00
Matteo Cypriani
95b9ea30bf
[lib] Fix #includes for OpenBSD
...
libowlps now builds on OpenBSD (4.9)!
2011-06-27 10:09:14 +02:00
Matteo Cypriani
65487af736
[lib] Makefile: remove unneeded -lrt & -lm
...
-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.
2011-06-27 10:09:14 +02:00
Matteo Cypriani
7dade1c36b
Makefiles: get rid of echo -e
...
Use one call to echo for each line, because the echo's -e option is not
standard.
2011-06-27 10:09:14 +02:00
Matteo Cypriani
f54b0d11e1
Makefiles: remove -v incompatible with BSD commands
...
The -v 'verbose' switch of the standard commands (rm, cp, mkdir, etc.)
is not implemented in BSD versions of the commands, so we avoid using
it.
2011-06-27 10:09:14 +02:00
Matteo Cypriani
3d46d64a19
[Aggregator] free_request_list(): semaphore unneeded
...
free_request_list() is called by main() after threads' shutdown, so we
do not need to use a semaphore.
2011-06-10 17:20:37 +02:00
Matteo Cypriani
533936c4ee
[Aggregator] Use semaphores to lock APs' ring
...
The APs' ring is accessed concurrently by listen_for_aps() and
monitor_aps(), so we had to secure that.
2011-06-09 18:53:11 +02:00
Matteo Cypriani
d2559062e6
[Aggregator] Use semaphores to lock requests' list
...
The requests' list might be accessed by the main thread and the monitor
thread simultaneously, so we need to secure the concurrent accesses.
2011-06-09 17:36:00 +02:00
Matteo Cypriani
3196e5a2e0
Makefiles: resolve OWLPS_VERSION earlier
2011-04-26 10:15:04 +02:00
Matteo Cypriani
7123f02e82
[Aggregator] Print version info with -V
2011-04-13 00:12:30 +02:00
Matteo Cypriani
7a95851795
[Aggregator] Look for -h before the main options
...
The options -f and -h are now parsed before the other options (instead
of just -f).
2011-04-13 00:12:30 +02:00
Matteo Cypriani
d31ac3864e
Position endianess conversion in all modules
2011-04-07 16:15:46 +02:00
Matteo Cypriani
aef4e5aed7
[Client & Aggregator] Print direction with PRIu8
2011-04-07 11:57:14 +02:00
Matteo Cypriani
ebd68a398f
[Aggregator] Send position in owl_request
2011-03-31 16:03:22 +02:00
Matteo Cypriani
b8e04f71d7
[Aggregator] Get rid of USE_TIMESTAMP
...
CSV format has changed, period.
2011-03-31 16:03:22 +02:00
Matteo Cypriani
df5ed19834
Include headers as needed
...
Move #includes from .h to .c wherever possible.
2011-03-31 16:03:22 +02:00
Matteo Cypriani
d62a7500b1
[lib] Rename run -> owl_run
2011-03-31 16:03:22 +02:00
Matteo Cypriani
1f37211609
[Aggregator] Makefile: fix multiple flag inclusion
2011-03-31 16:03:22 +02:00
Matteo Cypriani
4f74524f05
Handle request type in Listener & Aggregator
...
The listener now sends the request type to the aggregator. The
aggregator writes it to the CSV file and transmit it to the positioning
server.
2011-03-25 17:20:18 +01:00
Matteo Cypriani
15f4436628
[Aggregator] Use owl_timestamp_equals()
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
a3f0fb4130
[Aggregator] Use pthread_cleanup*
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
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
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
8f84cffa93
[Aggregator] Rename demande & message -> request
2011-03-25 11:48:23 +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