Drake
SystemInterface< T > Class Template Referenceabstract

A superclass template for systems that receive input, maintain state, and produce numerical output using a specified scalar type T. More...

#include <drake/systems/framework/system_interface.h>

Inheritance diagram for SystemInterface< T >:
Collaboration diagram for SystemInterface< T >:

Public Member Functions

virtual std::unique_ptr< Context< T > > CreateDefaultContext () const =0
 Returns a default context, initialized with the correct numbers of concrete input ports and state variables for this System. More...
 
virtual std::unique_ptr< SystemOutput< T > > AllocateOutput () const =0
 Returns a default output, initialized with the correct number of concrete output ports for this System. More...
 
virtual void EvalOutput (const Context< T > &context, SystemOutput< T > *output) const =0
 Computes the output for the given context, possibly updating values in the cache. More...
 
virtual T EvalPotentialEnergy (const Context< T > &context) const
 Return the potential energy currently stored in the configuration provided in the given Context. More...
 
virtual T EvalKineticEnergy (const Context< T > &context) const
 Return the kinetic energy currently present in the motion provided in the given Context. More...
 
- Public Member Functions inherited from AbstractSystemInterface
virtual ~AbstractSystemInterface ()
 
virtual std::string get_name () const =0
 Returns the name of this System. More...
 

Protected Member Functions

 SystemInterface ()
 
- Protected Member Functions inherited from AbstractSystemInterface
 AbstractSystemInterface ()
 

Detailed Description

template<typename T>
class drake::systems::SystemInterface< T >

A superclass template for systems that receive input, maintain state, and produce numerical output using a specified scalar type T.

Concrete systems with no state should inherit directly from this interface. Concrete systems with state should use a more specific interface in the SystemInterface family.

Template Parameters
TThe vector element type, which must be a valid Eigen scalar.

Constructor & Destructor Documentation

SystemInterface ( )
inlineprotected

Member Function Documentation

virtual std::unique_ptr<SystemOutput<T> > AllocateOutput ( ) const
pure virtual

Returns a default output, initialized with the correct number of concrete output ports for this System.

Implemented in Adder< T >.

virtual std::unique_ptr<Context<T> > CreateDefaultContext ( ) const
pure virtual

Returns a default context, initialized with the correct numbers of concrete input ports and state variables for this System.

Since input port pointers are not owned by the Context, they should simply be initialized to nullptr.

Implemented in Adder< T >.

virtual T EvalKineticEnergy ( const Context< T > &  context) const
inlinevirtual

Return the kinetic energy currently present in the motion provided in the given Context.

Non-physical Systems will return 0.

virtual void EvalOutput ( const Context< T > &  context,
SystemOutput< T > *  output 
) const
pure virtual

Computes the output for the given context, possibly updating values in the cache.

Implemented in Adder< T >.

virtual T EvalPotentialEnergy ( const Context< T > &  context) const
inlinevirtual

Return the potential energy currently stored in the configuration provided in the given Context.

Non-physical Systems will return 0.


The documentation for this class was generated from the following file: