25 #ifndef SRC_SYSTEMS_INCLUDE_CORBO_SYSTEMS_OUTPUT_FUNCTION_INTERFACE_H_ 26 #define SRC_SYSTEMS_INCLUDE_CORBO_SYSTEMS_OUTPUT_FUNCTION_INTERFACE_H_ 31 #ifdef MESSAGE_SUPPORT 32 #include <corbo-communication/messages/systems/output_functions.pb.h> 65 using Ptr = std::shared_ptr<SystemOutputInterface>;
93 #ifdef MESSAGE_SUPPORT 94 virtual void toMessage(corbo::messages::OutputFunction& message)
const {}
97 virtual void fromMessage(
const corbo::messages::OutputFunction& message, std::stringstream* issues =
nullptr) {}
102 #define FACTORY_REGISTER_OUTPUT_FUNCTION(type) FACTORY_REGISTER_OBJECT(type, SystemOutputInterface) 119 Ptr getInstance()
const override {
return std::make_shared<FullStateSystemOutput>(); }
126 #ifdef MESSAGE_SUPPORT 128 void toMessage(corbo::messages::OutputFunction& message)
const override { message.mutable_full_state_system_output(); }
148 Ptr getInstance()
const override {
return std::make_shared<FirstStateSystemOutput>(); }
153 #ifdef MESSAGE_SUPPORT 155 void toMessage(corbo::messages::OutputFunction& message)
const override { message.mutable_first_state_system_output(); }
175 Ptr getInstance()
const override {
return std::make_shared<LastStateSystemOutput>(); }
180 #ifdef MESSAGE_SUPPORT 182 void toMessage(corbo::messages::OutputFunction& message)
const override { message.mutable_last_state_system_output(); }
205 Ptr getInstance()
const override {
return std::make_shared<LastStateSystemOutput>(); }
210 #ifdef MESSAGE_SUPPORT 212 void toMessage(corbo::messages::OutputFunction& message)
const override { message.mutable_last_state_system_output(); }
227 #endif // SRC_SYSTEMS_INCLUDE_CORBO_SYSTEMS_OUTPUT_FUNCTION_INTERFACE_H_
Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
Interface class for system output functions.
const Eigen::MatrixXd & getLinearMatrixC() const
Get linear system matrix [SystemDynamicsInterface::getStateDimension() x getOutputDimension()].
virtual void output(const StateVector &x, OutputVector &y)=0
Evaluate the system output equation.
Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
void output(const StateVector &x, OutputVector &y) override
Evaluate the system output equation.
#define FACTORY_REGISTER_OUTPUT_FUNCTION(type)
void output(const StateVector &x, OutputVector &y) override
Evaluate the system output equation.
Eigen::VectorXd StateVector
Linear system output function.
Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
void output(const StateVector &x, OutputVector &y) override
Evaluate the system output equation.
virtual int getOutputDimension() const =0
Get dimension of the system output y.
virtual Ptr getInstance() const =0
Return a newly created shared instance of the implemented class.
void setLinearMatrixC(const Eigen::Ref< const Eigen::MatrixXd > &matric_c)
Set linear system matrix [SystemDynamicsInterface::getStateDimension() x getOutputDimension()].
std::shared_ptr< SystemOutputInterface > Ptr
void output(const StateVector &x, OutputVector &y) override
Evaluate the system output equation.
int getOutputDimension() const override
Get dimension of the system output y.
int getOutputDimension() const override
Get dimension of the system output y.
int getOutputDimension() const override
Get dimension of the system output y.
A matrix or vector expression mapping an existing expression.
constexpr const int INHERITED
Inherit property.
Eigen::VectorXd OutputVector
Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
virtual ~SystemOutputInterface()=default
Default destructor.
Return first state vector component as system output.
int getOutputDimension() const override
Get dimension of the system output y.
Return full state vector as system output.
Return first state vector component as system output.