Drake
Drake C++ Documentation
WitnessTriggeredEventData< T > Class Template Reference

Detailed Description

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

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

A witness function isolates 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.

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

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
 

Constructor & Destructor Documentation

◆ WitnessTriggeredEventData() [1/3]

◆ WitnessTriggeredEventData() [2/3]

◆ WitnessTriggeredEventData() [3/3]

Member Function Documentation

◆ operator=() [1/2]

WitnessTriggeredEventData& operator= ( const WitnessTriggeredEventData< T > &  )
default

◆ operator=() [2/2]

WitnessTriggeredEventData& operator= ( WitnessTriggeredEventData< T > &&  )
default

◆ set_t0()

void set_t0 ( const T &  t0)

Sets the time at the left end of the window.

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

◆ set_tf()

void set_tf ( const T &  tf)

Sets the time at the right end of the window.

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

◆ set_triggered_witness()

void set_triggered_witness ( const WitnessFunction< T > *  triggered_witness)

Sets the witness function that triggered the event handler.

◆ set_xc0()

void set_xc0 ( const ContinuousState< T > *  xc0)

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

◆ set_xcf()

void set_xcf ( const ContinuousState< T > *  xcf)

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

◆ t0()

const T& t0 ( ) const

Gets the time at the left end of the window.

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

◆ tf()

const T& tf ( ) const

Gets the time at the right end of the window.

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

◆ triggered_witness()

const WitnessFunction<T>* triggered_witness ( ) const

Gets the witness function that triggered the event handler.

◆ xc0()

const ContinuousState<T>* xc0 ( ) const

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

◆ xcf()

const ContinuousState<T>* xcf ( ) const

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: