25 #ifndef SRC_PLANTS_INCLUDE_CORBO_PLANTS_DISTURBANCE_INTERFACE_H_ 26 #define SRC_PLANTS_INCLUDE_CORBO_PLANTS_DISTURBANCE_INTERFACE_H_ 32 #ifdef MESSAGE_SUPPORT 33 #include <corbo-communication/messages/plants/disturbance.pb.h> 43 using Ptr = std::shared_ptr<DisturbanceInterface>;
71 virtual bool checkParameters(
int values_dim, std::stringstream* issues)
const {
return true; }
74 virtual void reset() = 0;
79 #ifdef MESSAGE_SUPPORT 80 virtual void toMessage(messages::Disturbance& message)
const {}
83 virtual void fromMessage(
const messages::Disturbance& message, std::stringstream* issues =
nullptr) {}
88 #define FACTORY_REGISTER_DISTURBANCE(type) FACTORY_REGISTER_OBJECT(type, DisturbanceInterface) 92 #endif // SRC_PLANTS_INCLUDE_CORBO_PLANTS_DISTURBANCE_INTERFACE_H_
virtual ~DisturbanceInterface()
Virtual destructor.
Representation of time stamps.
virtual Ptr getInstance() const =0
Return a newly created shared instance of the implemented class.
virtual void disturb(const Time &t, const Eigen::Ref< const Eigen::VectorXd > &values, Eigen::Ref< Eigen::VectorXd > disturbed_values)=0
Modify values according to the underlying disturbance model.
std::shared_ptr< DisturbanceInterface > Ptr
virtual bool checkParameters(int values_dim, std::stringstream *issues) const
Check the underlying parameter configuration for validity.
static Factory & instance()
< Retrieve static instance of the factory
A matrix or vector expression mapping an existing expression.
virtual void reset()=0
reset internal state
static Factory< DisturbanceInterface > & getFactory()
Get access to the associated factory.