Commit Graph

849 Commits

Author SHA1 Message Date
Matteo Cypriani 5f26d7a28e [Positioner] AP::received_calibration…(): percents
AccessPoint::received_calibration_from_ap() now returns a percentage of
the received packets (instead of a boolean).
2012-02-08 10:52:39 +01:00
Matteo Cypriani a2629dd5a9 [Positioner] Fix Request::get_measurement(s)(mac)
Request::get_measurements(mac) is renamed Request::get_measurement(mac).
A Request can't store more than one measurement per AP, so it was a
mistake to return a vector. The new function returns a single pointer.
2012-02-08 10:52:39 +01:00
Matteo Cypriani 3cbe9c2df5 [Positioner] Option calibration-requests-timeout
Introduce the option positioning.calibration-requests-timeout, to avoid
keeping the old calibration requests.
2012-02-08 10:52:39 +01:00
Matteo Cypriani 7a6a85ad19 [Positioner] Add Configuration::uint_value() 2012-02-08 10:52:39 +01:00
Matteo Cypriani 35265e75c2 [Positioner] Timestamp: elapsed() & owl_timestamp()
New functions added in Timestamp:
  - elapsed()
  - elapsed(Timestamp)
  - operator owl_imestamp()
2012-02-08 10:52:39 +01:00
Matteo Cypriani 9c1fc429c9 [Positioner] Autocalibration: APs in coverage
In Stock::generate_reference_point(), we now select an AP only if it is
in coverage of the reference AP.
2012-02-08 10:52:39 +01:00
Matteo Cypriani d683c32ce5 [Positioner] Add Request::get_measurements(mac) 2012-02-08 10:52:39 +01:00
Matteo Cypriani 3b1bbb8b5c [Positioner] ReferencePoint::get_requests(mac) public
ReferencePoint::get_requests(mac_transmitter) is now public.
2012-02-08 10:52:39 +01:00
Matteo Cypriani 1533852a1f [Positioner] Handle the packet numbering
In Measurement, the SSs are now stored in a map (instead of a vector),
along with their packet IDs.
2012-02-08 10:52:39 +01:00
Matteo Cypriani 5ab5b4f22f [Aggregator] Handle the packet numbering 2012-02-08 10:52:39 +01:00
Matteo Cypriani 1cc1ce4302 [Listener] Handle the packet numbering 2012-02-08 10:52:39 +01:00
Matteo Cypriani c53b8d61e7 [lib-client] send_request(): update the packet ID 2012-02-08 10:52:39 +01:00
Matteo Cypriani 8e7aac1e6e [Client] make_packet(): include the packet number
The prepared packet now includes the number of packets of the request
and the current packet ID. The packet ID is initialised to 1 for the
first packet.
2012-02-08 10:52:38 +01:00
Matteo Cypriani 5939bdbd04 [lib] Add nb_packet & packet_id to the structures 2012-02-08 10:52:38 +01:00
Matteo Cypriani ca249457be Makefiles: BSD-specific -I/-L 2012-02-07 17:50:19 +01:00
Matteo Cypriani 5b042baa11 TODO: pre-release update 2012-02-07 12:41:29 +01:00
Matteo Cypriani d5e2c975ae Rename Positioning -> Positioner
To be consistent with the other modules, the positioning server must be
called OwlPS Positioner instead of Positioning, and the executable
owlps-positionerd (even if the daemon mode is not implemented yet).
That's a big commit for a tiny change.
2012-02-06 17:48:43 +01:00
Matteo Cypriani b39dff9afb [Positioning] Remove csv/ & log/ 2012-02-06 17:48:08 +01:00
Matteo Cypriani 6b7e5668fa Add/update headers on the top of each source file 2012-02-06 16:44:09 +01:00
Matteo Cypriani c137f6491c [Positioning] Update Doxyfile with Doxygen 1.7.6.1 2012-02-06 14:51:07 +01:00
Matteo Cypriani a5e46da662 Update TODO 2012-02-06 13:27:05 +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 ee3ab7b383 [Listener] Same port for all requests
The autocalibration requests are now sent on the same port as the
positioning request, by default. There was no real reason to send them
on a different port.
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 a20156a45e [Listener] print_configuration(): fix verbose
The verbose level was displayed as a boolean when the program was
compiled without libconfuse.
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 cfe58267e3 Makefile: ARG variable allows to specify a target
One can now call make ARG=static to call the "static" target of each
module.
2012-01-24 17:26:13 +01:00
Matteo Cypriani ad8f42117b [Listener] Compile without confuse (Atheros)
For the Atheros platforms, do not link to libconfuse by default.
2012-01-24 17:26:06 +01:00
Matteo Cypriani 7fc89a381c [Listener] Check radiotap header length
From time to time, the length of the radiotap header (rtap_bytes in
read_packet()) is 65535. This is a quick & dirty fix to avoid segfaults,
but we should search for the reason why this value sometimes appears.
2012-01-24 16:11:36 +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 c9c82211d8 [Client] Compile-time option ENABLE_RECEIVE_POSITION
Enables or disables the -l option at compile-time.
2012-01-11 16:50:39 +01:00
Matteo Cypriani a81b539a05 Remove Makefiles for OpenWrt 8.09 2012-01-11 16:50:39 +01:00
Matteo Cypriani 58e86c304a [lib] Bump so version to 2.0 2012-01-11 16:50:39 +01:00
Matteo Cypriani 327f8ae199 [Client] Daemon mode (-D) 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 2ed7ccd4bc [Listener] Daemon mode (-D)
Basic implementation of the daemon mode.
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 93f316d2c6 [lib] Fix time_elapsed()
The previous implementation was very naive and incorrect.
2012-01-11 16:48:59 +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 5bef966d14 [Positioning] InputMedium: fix a comment 2012-01-09 11:11:30 +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 812273cc0c Update TODO 2012-01-09 11:11:30 +01:00
Matteo Cypriani 3d05f203aa [Positioning] Rename RADAR -> NSS
The algorithm RADAR is renamed "NSS", which is more neutral.
2012-01-09 11:11:30 +01:00