Skip to content
Snippets Groups Projects
Commit 1180e69d authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Add class IsMotion. Now ProcessorMotion inherits from it.

parent 497299c7
No related branches found
No related tags found
1 merge request!338Resolve "New class isMotion"
Pipeline #4915 passed
/**
* \file is_motion.h
*
* Created on: Mar 10, 2020
* \author: jsola
*/
#ifndef PROCESSOR_IS_MOTION_H_
#define PROCESSOR_IS_MOTION_H_
#include "core/common/wolf.h"
namespace wolf
{
class TimeStamp;
class IsMotion
{
public:
IsMotion();
virtual ~IsMotion();
// Queries to the processor:
// virtual bool isMotion() const {return true;}
/** \brief Fill a reference to the state integrated so far
* \param _x the returned state vector
*/
virtual void getCurrentState(Eigen::VectorXd& _x) const = 0;
virtual void getCurrentTimeStamp(TimeStamp& _ts) const = 0;
/** \brief Get the state integrated so far
* \return the state vector
*/
virtual Eigen::VectorXd getCurrentState() const = 0;
virtual TimeStamp getCurrentTimeStamp() const = 0;
/** \brief Fill the state corresponding to the provided time-stamp
* \param _ts the time stamp
* \param _x the returned state
* \return if state in the provided time-stamp could be resolved
*/
virtual bool getState(const TimeStamp& _ts, Eigen::VectorXd& _x) const = 0;
/** \brief Get the state corresponding to the provided time-stamp
* \param _ts the time stamp
* \return the state vector
*/
virtual Eigen::VectorXd getState(const TimeStamp& _ts) const = 0;
};
}
///// IMPLEMENTATION ///////
namespace wolf{
inline IsMotion::IsMotion()
{
}
inline IsMotion::~IsMotion()
{
}
} /* namespace wolf */
#endif /* PROCESSOR_IS_MOTION_H_ */
......@@ -9,6 +9,7 @@ class SensorBase;
// Wolf includes
#include "core/common/wolf.h"
#include "core/common/node_base.h"
#include "core/processor/is_motion.h"
#include "core/sensor/sensor_base.h"
#include "core/frame/frame_base.h"
#include "core/common/time_stamp.h"
......
......@@ -129,7 +129,7 @@ struct ProcessorParamsMotion : public ProcessorParamsBase
* // TODO: JS: review instructions up to here
*
*/
class ProcessorMotion : public ProcessorBase
class ProcessorMotion : public ProcessorBase, public IsMotion
{
public:
typedef enum {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment