Drake
WitnessTriggeredEventData< T > Class Template Reference

Class for storing data from a witness function triggering to be passed to event handlers. More...

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

Inheritance diagram for WitnessTriggeredEventData< T >:
[legend]
Collaboration diagram for WitnessTriggeredEventData< T >:
[legend]

Public Member Functions

 WitnessTriggeredEventData ()
 
const WitnessFunction< T > * triggered_witness () const
 Gets the witness function that triggered the event handler. More...
 
void set_triggered_witness (const WitnessFunction< T > *triggered_witness)
 Sets the witness function that triggered the event handler. More...
 
const T & t0 () const
 Gets the time at the left end of the window. More...
 
void set_t0 (const T &t0)
 Sets the time at the left end of the window. More...
 
const T & tf () const
 Gets the time at the right end of the window. More...
 
void set_tf (const T &tf)
 Sets the time at the right end of the window. More...
 
const ContinuousState< T > * xc0 () const
 Gets a pointer to the continuous state at the left end of the isolation window. More...
 
void set_xc0 (const ContinuousState< T > *xc0)
 Sets a pointer to the continuous state at the left end of the isolation window. More...
 
const ContinuousState< T > * xcf () const
 Gets a pointer to the continuous state at the right end of the isolation window. More...
 
void set_xcf (const ContinuousState< T > *xcf)
 Sets a pointer to the continuous state at the right end of the isolation window. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 WitnessTriggeredEventData (const WitnessTriggeredEventData &)=default
 
WitnessTriggeredEventDataoperator= (const WitnessTriggeredEventData &)=default
 
 WitnessTriggeredEventData (WitnessTriggeredEventData &&)=default
 
WitnessTriggeredEventDataoperator= (WitnessTriggeredEventData &&)=default
 
- Public Member Functions inherited from EventData
 EventData ()
 
virtual ~EventData ()
 
virtual std::unique_ptr< EventDataClone () const
 
 EventData (const EventData &)=default
 
EventDataoperator= (const EventData &)=default
 
 EventData (EventData &&)=default
 
EventDataoperator= (EventData &&)=default
 

Additional Inherited Members

Detailed Description

template<class T>
class drake::systems::WitnessTriggeredEventData< T >

Class for storing data from a witness function triggering to be passed to event handlers.

A witness function isolates the time to a (typically small) window during which the witness function crosses zero. The time and state at both sides of this window are passed to the event handler so that the system can precisely determine the reason that the witness function triggered.

Constructor & Destructor Documentation

Member Function Documentation

WitnessTriggeredEventData& operator= ( const WitnessTriggeredEventData< T > &  )
default
WitnessTriggeredEventData& operator= ( WitnessTriggeredEventData< T > &&  )
default
void set_t0 ( const T &  t0)
inline

Sets the time at the left end of the window.

Note that t0 should be smaller than tf after both values are set.

void set_tf ( const T &  tf)
inline

Sets the time at the right end of the window.

Note that tf should be larger than t0 after both values are set.

void set_triggered_witness ( const WitnessFunction< T > *  triggered_witness)
inline

Sets the witness function that triggered the event handler.

Here is the caller graph for this function:

void set_xc0 ( const ContinuousState< T > *  xc0)
inline

Sets a pointer to the continuous state at the left end of the isolation window.

void set_xcf ( const ContinuousState< T > *  xcf)
inline

Sets a pointer to the continuous state at the right end of the isolation window.

Here is the call graph for this function:

const T& t0 ( ) const
inline

Gets the time at the left end of the window.

Default is NaN (which indicates that the value is invalid).

const T& tf ( ) const
inline

Gets the time at the right end of the window.

Default is NaN (which indicates that the value is invalid).

const WitnessFunction<T>* triggered_witness ( ) const
inline

Gets the witness function that triggered the event handler.

const ContinuousState<T>* xc0 ( ) const
inline

Gets a pointer to the continuous state at the left end of the isolation window.

const ContinuousState<T>* xcf ( ) const
inline

Gets a pointer to the continuous state at the right end of the isolation window.


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