- Where possible, use initialisation lists in class definition instead
of explicit variable initialisations in source file.
- Rename some variables (use of "source" in copy constructors and
operators…).
- Suppress useless Doxygen comments, allow non-documented members in
Doxyfile.
In cxxtest, TS_ASSERT_DIFFERS(a, b) tests !(a == b) and not (a != b).
Therefore, to test a::operator!=(b), we must avoid TS_ASSERT_DIFFERS()
(that will test !a::operator==(b)) and write instead TS_ASSERT(a != b).
The new class Positioning is the interface between Input and Output,
using positioning algorithms to compute results from requests.
Update UserInterface to add option "positioning.algorithm"; update posexcept.
PositioningAlgorithm is the super-class of all positioning algorithms.
RealPosition is the first "positioning algorithm" (it actually computes
nothing, but returns the position declared in a CalibrationRequest).
- Replace occurences of `container.size() == 0` with
`container.empty()`.
- Fix an allocation in posexcept.cc (false positive?).
- UserInterface: in constructor, handle bad_alloc exception possibly
thrown by `new`.
InputLogCSV now handles calibration requests.
TestUtil:
- Request list become a Request pointer list (to handle polymorphism).
- Add a ReferencePoint list.
- Reorganise create_test_csv_file().
InputCSV now handles CalibrationRequest, adding position and direction
information.
Input:
- Add add_request_to_stock().
Stock:
- Add list of ReferencePoint.
- Add list of CalibrationRequest.
The new class Direction will be used to represent the direction of a
calibration request.
Update posexcept.hh to add new exception bad_direction, used in class
Direction.
InputMedium:
- Split into two files (inputmedium.{hh,cc}).
- Add polymorphic handling of CalibrationRequest.
- Write unit tests.
InputCSV:
- Use new code of InputMedium to handle calibration requests.
- We detect if the read request is a calibration request, but
specific attributes are not initialised.
Delete class CalibrationMeasurement and add class CalibrationRequest:
the ReferencePoint must be linked by the Request, not by each
Measurement of the Request.
Adapt ReferencePoint to link a CalibrationRequest instead of a
CalibrationMeasurement.
Request:
- Destructor is now virtual to allow polymorphism.
- Reactivate tests on get_measurements() and set_measurements().
Work on unit tests:
- TestUtil:
- Add set_up(), that sets up lists of Request, Mobile and AccessPoint,
primarily to be used with create_test_csv_file().
- Add public attributes for these lists.
- Update create_test_csv_file() to use these lists.
- Update InputCSV_test to use new TestUtil.
- Add class TestSetUp, a global fixture class. Before all tests off all
test suites, it calls TestUtil::set_up().
- Update and clean Makefile.
- Add files posexcept.{hh,cc} that contains exception classes.
- Add class Input, that handles InputMedium (and InputLogMedium, in the
future). Note that for the moment, the unit test is *very* minimal.
- UserInterface: Add options for the input medium and the CSV file.
Add the class TestUtil, that provides functions used in several unit
tests. For the moment, it contains two function:
- fill_file(), that creates and fills a test file.
- remove_file(), that deletes a test file.
- Add class Configuration, a stock for the configuration structure.
- Add class UserInterface, that handles the configuration input.
- Update owlps-positioning.cc (delete old stuff like configuration) and
delete owlps-positioning.hh: we now have a compilable executable.
This commit pass finally all unit tests without any warning!
Measurement:
- Finish unit test (test the average SS).
- Fix update_average_ss() and add_ss().
- average_ss is now double.
Area:
- Unit test: test inversion of points.
- Add reorder_coordinates().
- Remove all set_{x,y,z}_{min,max}() accessors.
- Remove set_p_min() and set_p_max().
- Add set_coordinates().
- The constructor now takes 2 Point3D instead of 6 float coordinates.
Point3D:
- Unit test: finish to test distances, test new cast operator.
- Add a cast to string operator.
Unit tests:
- Add valuetraits.hh with class to display correctly a Point3D in a
wrong assertion.
InputCSV:
- Add eof_close() to automatically close the file when EOF is reached.
- Add read_next_line(), that read the next non-blank line and skips
blank characters.
- Add current_line, a string containing the current line data.
- Update unit test.
InputMedium:
- Rename InputMedium::current_line to current_line_nb.
AccessPoint:
- Fix a bug with the frequency.
- Add an accessor set_channel() that calls set_frequency().
WifiDevice:
- Fix a bug with the antenna gain (which was converted with
PosUtil::channel_to_frequency()).
- Pass float arguments as values and not references.
Fix some errors revealed during writing of unit tests.
Building: Fix wrong #ifndef in building.hh.
Measurement: New default constructor.
PosUtil:
- Remove nanosecond-precision functions.
- Add timespec_round_to_ms() to lower the precision of a struct timespec
to millisecond.
- Add timespec_equals to compare two struct timespec (maybe an
operator==() would be better?).
- In all classes where we used a C-style cast to suppress const, we now
use a const_cast.
- Area: Add operator=().
- InputCSV:
- Document get_next_request().
- Handle exception when using Stock::get_{ap,mobile}().
- In constructor, throw an exception in case of error when opening the
input file.
- CalibrationMeasurement: Remove operator<<() which is useless (it is a
simple call to Measurement operator<<()).
- Makefile: Add target 'check'.
- Add/update comments to be Doxygen compliant. Translate existing
comments in English.
- Various fixes (more or less importants):
- NULL pointer verification when adding an element to a vector of
pointers.
- Add some missing accessors.
- Add some more error handling with exceptions. Class Stock: correct
accessors (pure read accessors do not create a missing element any
more, but throw an exception).
- Makefile: Add 'doc' target.
- Update TODO (some things noticed when reviewing the code for
comments).
In all classes:
- Read accessors return a const reference instead of a value.
- operator=() returns a const reference.
- Use '\n' instead of std::endl in all stream manipulations, when
buffer flush is not required.
- Use pre-incrementing where possible, instead of post-incrementing.
- Point3D: Destructor must be virtual (thanks cppcheck!).
- Update TODO.