Commit Graph

432 Commits

Author SHA1 Message Date
Matteo Cypriani 3719f58b65 [Positioning] OutputUDPSocket: finish cleaning
Use libowlps for socket creation.
Use Result::to_csv() and ResultList::to_csv().
2011-04-05 16:00:52 +02:00
Matteo Cypriani 2324c8e5d1 [Positioning] Move OutputCSV::*to_csv()
OutputCSV::result_to_csv() becomes Result::to_csv().
OutputCSV::results_to_csv() becomes ResultList::to_csv().
2011-04-05 15:42:57 +02:00
Matteo Cypriani c802ad1224 [lib] Use const arguments wherever possible 2011-04-05 15:42:16 +02:00
Matteo Cypriani 40fb159a91 Merge branch 'dev-outputsocket' into dev
Adds OutputUDPSocket.
OutputUDPSocket::write(ResultList) is a mock function, since important
changes have to be done before that.

Conflicts:
	owlps-positioning/src/userinterface.cc
2011-04-05 12:05:46 +02:00
Matteo Cypriani a898af4389 [Positioning] Write all results simultaneously
Write results computed by several algorithms for the same request
simultaneously for a given medium. This allows to have only one CSV line
for a given request.
To achieve that, the class ResultList was created.
2011-04-05 11:52:10 +02:00
Matteo Cypriani 562ea6c28b [Positioning] Add options output.udp-{host,port} 2011-04-05 11:27:44 +02:00
Matteo Cypriani 22cad4c214 [Positioning] OutputSocket -> OutputUDPSocket 2011-04-05 11:27:44 +02:00
Matteo Cypriani a2c0556ee8 [Positioning] OutputSocket: review & clean 2011-04-05 11:27:44 +02:00
Florian Taillard 756b850375 [Positioning] Modified output socket UDP
The ip of destination is now configured in cfg/owlps-positioning.cfg
and activate by argument -O Socket.
Update owlps-positioning.cfg (Add remote-ip).
2011-04-05 11:27:44 +02:00
Matteo Cypriani 4752198ce7 [Positioning] Include algorithm name in results 2011-03-31 19:42:35 +02:00
Matteo Cypriani 670dfdc867 [Positioning] Improve CalibrationRequest::type
Add the request type in CalibrationRequest constructors.
Handle (auto)calibration request type in Input*.
2011-03-31 17:08:24 +02:00
Matteo Cypriani 5972e245cc [Positioning] InputUDPSocket: read calibration data 2011-03-31 16:03:22 +02:00
Matteo Cypriani ebd68a398f [Aggregator] Send position in owl_request 2011-03-31 16:03:22 +02:00
Matteo Cypriani 6823cd4028 [lib] Add position in owl_request 2011-03-31 16:03:22 +02:00
Matteo Cypriani 5945617994 Update TODOs 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 d64b4046da [Positioning] Handle signals 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 46a67d2843 [Positioning] Add option flush-output-files 2011-03-31 16:03:22 +02:00
Matteo Cypriani 60a10cb112 [Positioning] Configuration: add bool_value() 2011-03-31 16:03:22 +02:00
Matteo Cypriani f388e6c8ec [Positioning] Update owlps-positioning.cfg
The new configuration file is more generic and better shows options.
2011-03-31 16:03:22 +02:00
Matteo Cypriani 70ff9ffb42 [Positioning] Delete old option server.port
This option was replaced by input.udp-port.
2011-03-31 16:03:22 +02:00
Matteo Cypriani 1a5117d46b [Positioning] Minimal handling of request type
Handle the new CSV & UDP formats that include the request type.
2011-03-31 16:03:22 +02:00
Matteo Cypriani 1dad77b26f [Positioning] CSVFileReader: reindent 2011-03-28 17:52:25 +02:00
Matteo Cypriani 75fc40f057 [Positioning] Fix CSV Input
Bug introduced with InputUDPSocket.
2011-03-28 17:51:06 +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 204750b8c5 [lib] Rename PACKET_TYPE_* -> OWL_REQUEST_* 2011-03-25 16:30:40 +01:00
Matteo Cypriani 1e1023e6b5 Makefiles: update lib dependencies 2011-03-25 13:50:20 +01:00
Florian Taillard 6fbb0874e7 [Positioning] Add OutputSocket 2011-03-25 12:19:52 +01:00
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