Owl Positioning System: a Wi-Fi-based, infrastructure-centred indoor positioning system. http://owlps.pu-pm.univ-fcomte.fr/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

calibrationrequest.cc 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * This file is part of the Owl Positioning System (OwlPS) project.
  3. * It is subject to the copyright notice and license terms in the
  4. * COPYRIGHT.t2t file found in the top-level directory of this
  5. * distribution and at
  6. * https://code.lm7.fr/mcy/owlps/src/master/COPYRIGHT.t2t
  7. * No part of the OwlPS Project, including this file, may be copied,
  8. * modified, propagated, or distributed except according to the terms
  9. * contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
  10. * distributed along with this file, either separately or by replacing
  11. * this notice by the COPYRIGHT.t2t file's contents.
  12. */
  13. #include "calibrationrequest.hh"
  14. /* *** Constructors *** */
  15. CalibrationRequest::CalibrationRequest(const uint_fast8_t _type):
  16. reference_point(nullptr), direction(Direction())
  17. {
  18. type = _type ;
  19. }
  20. CalibrationRequest::
  21. CalibrationRequest(const Request &source,
  22. ReferencePoint *const _reference_point,
  23. const Direction &_direction,
  24. const uint_fast8_t _type):
  25. Request(source), reference_point(_reference_point),
  26. direction(_direction)
  27. {
  28. type = _type ;
  29. }
  30. /* *** Write accessors *** */
  31. void CalibrationRequest::reference_point_delete_requests() const
  32. {
  33. reference_point->delete_requests() ;
  34. }
  35. void CalibrationRequest::reference_point_backward_link() const
  36. {
  37. reference_point->add_request(this) ;
  38. }
  39. void CalibrationRequest::clear()
  40. {
  41. Request::clear() ;
  42. reference_point = nullptr ;
  43. direction.clear() ;
  44. }
  45. /* *** Operators *** */
  46. CalibrationRequest& CalibrationRequest::
  47. operator=(const CalibrationRequest &source)
  48. {
  49. if (this == &source)
  50. return *this ;
  51. this->Request::operator=(source) ;
  52. direction = source.direction ;
  53. reference_point = source.reference_point ;
  54. return *this ;
  55. }
  56. bool CalibrationRequest::
  57. operator==(const CalibrationRequest &source) const
  58. {
  59. if (this == &source)
  60. return true ;
  61. return
  62. this->Request::operator==(source) &&
  63. direction == source.direction &&
  64. reference_point == source.reference_point ;
  65. }