2012-02-06 16:44:09 +01:00
|
|
|
/*
|
2013-05-29 18:43:35 +02:00
|
|
|
* This file is part of the Owl Positioning System (OwlPS) project.
|
|
|
|
* It is subject to the copyright notice and license terms in the
|
|
|
|
* COPYRIGHT.t2t file found in the top-level directory of this
|
|
|
|
* distribution and at
|
|
|
|
* http://code.lm7.fr/p/owlps/source/tree/master/COPYRIGHT.t2t
|
|
|
|
* No part of the OwlPS Project, including this file, may be copied,
|
|
|
|
* modified, propagated, or distributed except according to the terms
|
|
|
|
* contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
|
|
|
|
* distributed along with this file, either separately or by replacing
|
|
|
|
* this notice by the COPYRITGHT.t2t file's contents.
|
2012-02-06 16:44:09 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-02-16 19:31:25 +01:00
|
|
|
#include "calibrationrequest.hh"
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-31 17:08:24 +02:00
|
|
|
/* *** Constructors *** */
|
|
|
|
|
|
|
|
|
2011-04-26 16:34:58 +02:00
|
|
|
CalibrationRequest::
|
|
|
|
CalibrationRequest(uint_fast8_t _type = OWL_REQUEST_AUTOCALIBRATION):
|
2011-03-31 17:08:24 +02:00
|
|
|
reference_point(NULL), direction(Direction())
|
|
|
|
{
|
|
|
|
type = _type ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CalibrationRequest::
|
|
|
|
CalibrationRequest(const Request &source,
|
|
|
|
ReferencePoint *_reference_point = NULL,
|
2011-04-26 16:34:58 +02:00
|
|
|
const Direction &_direction = Direction(),
|
|
|
|
uint_fast8_t _type = OWL_REQUEST_AUTOCALIBRATION):
|
2011-03-31 17:08:24 +02:00
|
|
|
Request(source), reference_point(_reference_point),
|
|
|
|
direction(_direction)
|
|
|
|
{
|
|
|
|
type = _type ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-16 19:31:25 +01:00
|
|
|
/* *** Write accessors *** */
|
|
|
|
|
|
|
|
|
2011-06-20 11:43:17 +02:00
|
|
|
void CalibrationRequest::reference_point_delete_requests() const
|
|
|
|
{
|
|
|
|
reference_point->delete_requests() ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-19 11:40:55 +01:00
|
|
|
void CalibrationRequest::reference_point_backward_link() const
|
|
|
|
{
|
|
|
|
reference_point->add_request(this) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-02-16 19:31:25 +01:00
|
|
|
void CalibrationRequest::clear()
|
|
|
|
{
|
|
|
|
Request::clear() ;
|
|
|
|
reference_point = NULL ;
|
2010-02-19 11:40:55 +01:00
|
|
|
direction.clear() ;
|
2010-02-16 19:31:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* *** Operators *** */
|
|
|
|
|
|
|
|
|
2011-07-30 20:38:42 +02:00
|
|
|
CalibrationRequest& CalibrationRequest::
|
|
|
|
operator=(const CalibrationRequest &source)
|
2010-02-16 19:31:25 +01:00
|
|
|
{
|
|
|
|
if (this == &source)
|
|
|
|
return *this ;
|
|
|
|
|
|
|
|
this->Request::operator=(source) ;
|
2010-02-19 11:40:55 +01:00
|
|
|
direction = source.direction ;
|
2010-02-16 19:31:25 +01:00
|
|
|
reference_point = source.reference_point ;
|
|
|
|
|
|
|
|
return *this ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-07-30 20:38:42 +02:00
|
|
|
bool CalibrationRequest::
|
|
|
|
operator==(const CalibrationRequest &source) const
|
2010-02-16 19:31:25 +01:00
|
|
|
{
|
|
|
|
if (this == &source)
|
|
|
|
return true ;
|
|
|
|
|
|
|
|
return
|
|
|
|
this->Request::operator==(source) &&
|
2010-02-19 11:40:55 +01:00
|
|
|
direction == source.direction &&
|
2010-02-16 19:31:25 +01:00
|
|
|
reference_point == source.reference_point ;
|
|
|
|
}
|