AGXDynamics  2.31.1.0
agxPlot::DebugPlot Class Referenceabstract

"Static" helper class to plot values from where e.g., values aren't exposed. More...

#include <DebugPlot.h>

+ Inheritance diagram for agxPlot::DebugPlot:

Public Types

enum  Priority { HIGHEST_PRIORITY = 2147483647, LOWEST_PRIORITY = 10000, DEFAULT_PRIORITY = 1073741824 }
 Specifies the ranges of the priority which can be assigned to a singleton at the time of creation. More...
 
enum  TimeDataBehavior { ADD, USE_FIRST, USE_LAST }
 Behavior when pushing time data values since several calls can be made within same the time step. More...
 

Public Member Functions

virtual std::string getClassName () const =0
 
int getPriority () const
 Return the shutdown priority of the singleton instance. More...
 

Static Public Member Functions

static void add (agx::Real yValue, const agx::String &curve, const agx::String &window="")
 Add y-value to a curve, named curve, in a window named window, where the x-values are integers, i.e., number of samples. More...
 
static void add (agx::Real xValue, agx::Real yValue, const agx::String &curve, const agx::String &window="")
 Add (x, y) to a curve with name curve in a window named window. More...
 
static void addTimeData (agx::Real yValue, const agx::String &curve, const agx::String &window="", TimeDataBehavior behavior=USE_LAST)
 Add y-value to a curve, named curve, in a window named window, where the x-values are simulation time. More...
 
static agx::Bool hasInstance (agxSDK::Simulation *simulation)
 

Protected Member Functions

 ~DebugPlot ()
 
void _shutdown ()
 
virtual void shutdown () override
 Implement this method to cleanup your Singleton class. More...
 

Detailed Description

"Static" helper class to plot values from where e.g., values aren't exposed.

It's basic so you have to know what your axes labels mean and to which window you're pushing values.

Definition at line 43 of file DebugPlot.h.

Member Enumeration Documentation

◆ Priority

enum agx::Singleton::Priority
inherited

Specifies the ranges of the priority which can be assigned to a singleton at the time of creation.

Enumerator
HIGHEST_PRIORITY 

The highest priority that can be given to a singleton.

LOWEST_PRIORITY 

The lowest priority that can be given to a singleton.

DEFAULT_PRIORITY 

The default priority given to a singleton.

Definition at line 35 of file Singleton.h.

◆ TimeDataBehavior

Behavior when pushing time data values since several calls can be made within same the time step.

Enumerator
ADD 

Add previous and current.

USE_FIRST 

Use first value set - i.e., ignore all the rest of the values during this time step, to this curve.

USE_LAST 

Use the current value, i.e., write over any previous value written.

Definition at line 50 of file DebugPlot.h.

Constructor & Destructor Documentation

◆ ~DebugPlot()

agxPlot::DebugPlot::~DebugPlot ( )
protected

Member Function Documentation

◆ _shutdown()

void agx::Singleton::_shutdown ( )
protectedinherited

◆ add() [1/2]

static void agxPlot::DebugPlot::add ( agx::Real  yValue,
const agx::String &  curve,
const agx::String &  window = "" 
)
static

Add y-value to a curve, named curve, in a window named window, where the x-values are integers, i.e., number of samples.

Use this method, rather than addTimeData, if you know you're writing many values each time step and wants to see them all.

Parameters
yValue- y-value
curve- name of the curve in window
window- name of the window

◆ add() [2/2]

static void agxPlot::DebugPlot::add ( agx::Real  xValue,
agx::Real  yValue,
const agx::String &  curve,
const agx::String &  window = "" 
)
static

Add (x, y) to a curve with name curve in a window named window.

Parameters
xValue- x-value
yValue- y-value
curve- name of the curve in window
window- name of the window

◆ addTimeData()

static void agxPlot::DebugPlot::addTimeData ( agx::Real  yValue,
const agx::String &  curve,
const agx::String &  window = "",
TimeDataBehavior  behavior = USE_LAST 
)
static

Add y-value to a curve, named curve, in a window named window, where the x-values are simulation time.

Parameters
yValue- y-value
curve- name of the curve in window
window- name of the window
behavior- behavior if several calls are made during the same time step

◆ getClassName()

virtual std::string agx::Singleton::getClassName ( ) const
pure virtualinherited

◆ getPriority()

int agx::Singleton::getPriority ( ) const
inherited

Return the shutdown priority of the singleton instance.

◆ hasInstance()

static agx::Bool agxPlot::DebugPlot::hasInstance ( agxSDK::Simulation *  simulation)
static
Returns
true if an instance of this object exists for the given simulation

◆ shutdown()

virtual void agxPlot::DebugPlot::shutdown ( )
overrideprotectedvirtual

Implement this method to cleanup your Singleton class.

Reimplemented from agx::Singleton.


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