[Positioner] Cosmetic changes, mainly comments
This commit is contained in:
parent
9144ef3740
commit
ecae205955
|
@ -242,7 +242,7 @@ mobile-csv-file = /usr/local/etc/owlps/mobiles.csv
|
||||||
#udp-port = 9910
|
#udp-port = 9910
|
||||||
|
|
||||||
# The TCPEvAAL output follows the specification of EvAAL 2011 to
|
# The TCPEvAAL output follows the specification of EvAAL 2011 to
|
||||||
# communicate with the SocketAdapter program developped by the
|
# communicate with the SocketAdapter program developed by the
|
||||||
# organizers.
|
# organizers.
|
||||||
# Note: you can use only one algorithm when using the TCPEvAAL output.
|
# Note: you can use only one algorithm when using the TCPEvAAL output.
|
||||||
#medium = TCPEvAAL
|
#medium = TCPEvAAL
|
||||||
|
|
|
@ -135,7 +135,9 @@ bool InputCSV::fill_current_request()
|
||||||
if (! read_field(packet_id, "the packet ID"))
|
if (! read_field(packet_id, "the packet ID"))
|
||||||
return false ;
|
return false ;
|
||||||
|
|
||||||
int_fast16_t ss ;
|
// Note: the initialisation is useless but avoids a compilation
|
||||||
|
// warning.
|
||||||
|
int_fast16_t ss = 0 ;
|
||||||
if (! read_field(ss, "the signal strength"))
|
if (! read_field(ss, "the signal strength"))
|
||||||
return false ;
|
return false ;
|
||||||
|
|
||||||
|
|
|
@ -46,13 +46,15 @@ InputMedium::~InputMedium()
|
||||||
* Reads a Request, increments current_line_nb, updates #current_request
|
* Reads a Request, increments current_line_nb, updates #current_request
|
||||||
* and returns it.
|
* and returns it.
|
||||||
*
|
*
|
||||||
* The input medium should be ready to be read before precessing
|
* The input medium should be ready to be read before
|
||||||
* requests; otherwise, #current_request is [cleared](@ref Request::clear)
|
* processing requests; otherwise, #current_request is
|
||||||
* and a blank Request is returned.
|
* [cleared](@ref Request::clear) and a blank Request is
|
||||||
|
* returned.
|
||||||
*
|
*
|
||||||
* @returns The Request read, or an empty Request in case of error or
|
* @returns The Request read.
|
||||||
* EOF (note that when casted to bool, an empty Request is `false`,
|
* @returns An empty Request in case of error or if the end of the
|
||||||
* see Request::operator bool()).
|
* file is reached (note that when casted to bool, an empty Request
|
||||||
|
* is `false`, see Request::operator bool()).
|
||||||
*/
|
*/
|
||||||
const Request& InputMedium::get_next_request()
|
const Request& InputMedium::get_next_request()
|
||||||
{
|
{
|
||||||
|
|
|
@ -100,6 +100,9 @@ add_ss_list(const map<pkt_id_t, ss_t> &_ss_list)
|
||||||
/**
|
/**
|
||||||
* Merge consists of adding the SS values of `source` to #ss_list. It
|
* Merge consists of adding the SS values of `source` to #ss_list. It
|
||||||
* is possible only if the #cp of the two Measurement are identical.
|
* is possible only if the #cp of the two Measurement are identical.
|
||||||
|
* Since add_ss_list() is used, if `source` contains packets with IDs
|
||||||
|
* that already exist, the old ones will be overwritten.
|
||||||
|
*
|
||||||
* @throw cannot_merge if the CP of the two Measurement are different.
|
* @throw cannot_merge if the CP of the two Measurement are different.
|
||||||
*/
|
*/
|
||||||
void Measurement::merge(const Measurement &source)
|
void Measurement::merge(const Measurement &source)
|
||||||
|
|
|
@ -27,6 +27,10 @@ using namespace std ;
|
||||||
/* *** Constructors *** */
|
/* *** Constructors *** */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The error (distance between _position and _real_position) is
|
||||||
|
* computed automatically.
|
||||||
|
*/
|
||||||
Result::Result(const Request *_request,
|
Result::Result(const Request *_request,
|
||||||
const std::string &_algorithm,
|
const std::string &_algorithm,
|
||||||
const Point3D &_position,
|
const Point3D &_position,
|
||||||
|
|
|
@ -58,6 +58,7 @@ public:
|
||||||
|
|
||||||
/** @name Write accessors */
|
/** @name Write accessors */
|
||||||
//@{
|
//@{
|
||||||
|
/// Computes the distance between #position and `real_position`
|
||||||
void compute_error(const Point3D &real_position) ;
|
void compute_error(const Point3D &real_position) ;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
|
@ -108,12 +108,11 @@ Timestamp Timestamp::get_current_time()
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param source A pointer to the new time. If NULL, #current_time is
|
* @param source A reference to the new time.
|
||||||
* updated to the current time.
|
|
||||||
*/
|
*/
|
||||||
void Timestamp::update_current_time(const Timestamp &source)
|
void Timestamp::update_current_time(const Timestamp &source)
|
||||||
{
|
{
|
||||||
// We should never call this function if we are in replay mode:
|
// We should only call this function if we are in replay mode:
|
||||||
assert(Configuration::bool_value("replay")) ;
|
assert(Configuration::bool_value("replay")) ;
|
||||||
|
|
||||||
// According to human perception, time generally goes only forward:
|
// According to human perception, time generally goes only forward:
|
||||||
|
|
|
@ -54,11 +54,10 @@ namespace po = boost::program_options ;
|
||||||
* @param argc Number of arguments passed to the program.
|
* @param argc Number of arguments passed to the program.
|
||||||
* @param argv Values of the arguments.
|
* @param argv Values of the arguments.
|
||||||
*/
|
*/
|
||||||
UserInterface::UserInterface(const int argc, char **argv)
|
UserInterface::UserInterface(const int argc, const char **const argv):
|
||||||
|
cli_argument_count(argc), cli_argument_values(argv)
|
||||||
{
|
{
|
||||||
assert(argv) ;
|
assert(cli_argument_values) ;
|
||||||
cli_argument_values = argv ;
|
|
||||||
cli_argument_count = argc ;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,6 +80,9 @@ public:
|
||||||
/* *** Constructors *** */
|
/* *** Constructors *** */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `_mac_addr` must be uppercase.
|
||||||
|
*/
|
||||||
inline WifiDevice::
|
inline WifiDevice::
|
||||||
WifiDevice(const std::string &_ip_addr,
|
WifiDevice(const std::string &_ip_addr,
|
||||||
const std::string &_mac_addr,
|
const std::string &_mac_addr,
|
||||||
|
|
Loading…
Reference in New Issue