A class for adding input and output arguments, to be used when running a co-simulation.
More...
#include <SimulationControl.h>
|
| void | addInitInputArgument (const agx::String &portName, SimulationControlArgument *inputArgument) |
| | Adds an input argument. More...
|
| |
| void | addInitOutputArgument (const agx::String &portName, SimulationControlArgument *outputArgument) |
| | Adds an output argument. More...
|
| |
| void | addInputArgument (const agx::String &portName, SimulationControlArgument *inputArgument) |
| | Adds an input argument. More...
|
| |
| void | addOutputArgument (const agx::String &portName, SimulationControlArgument *outputArgument) |
| | Adds an output argument. More...
|
| |
| bool | applyInitInputValues (agxSDK::Simulation *simulation, const agx::RealVector &initInputs) const |
| |
| void | clear () |
| |
| const char * | getInitInputValueName (size_t valueNr) |
| | Returns name associated to input value only for scene initialization, by the argument it belongs to. More...
|
| |
| const char * | getInitOutputValueName (size_t valueNr) |
| | Returns name associated to output value only for scene initialization, by the argument it belongs to. More...
|
| |
| const char * | getInputValueName (size_t valueNr) |
| | Returns name associated to input value by the argument it belongs to. More...
|
| |
| agx::String | getLastErrorMessage () const |
| |
| const char * | getOutputValueName (size_t valueNr) |
| | Returns name associated to output value by the argument it belongs to. More...
|
| |
| size_t | getTotalNumInitInputValues () const |
| | Get total size of input values from all input arguments only for scene initialization. More...
|
| |
| size_t | getTotalNumInitOutputValues () const |
| | Get total size of output values from all output arguments only for scene initialization. More...
|
| |
| size_t | getTotalNumInputValues () const |
| | Get total size of input values from all input arguments. More...
|
| |
| size_t | getTotalNumOutputValues () const |
| | Get total size of output values from all output arguments. More...
|
| |
| bool | obtainInitOutputValues (agxSDK::Simulation *simulation, const agx::RealVector &initOutputs) const |
| |
| bool | step (const agx::RealVector &inputs, const agx::RealVector &outputs, agxSDK::Simulation *simulation) |
| | Steps the simulation one time step, using inputs and returning outputs. More...
|
| |
| | Singleton (int priority=DEFAULT_PRIORITY) |
| | Default constructor. More...
|
| |
| virtual std::string | getClassName () const =0 |
| |
| int | getPriority () const |
| | Return the shutdown priority of the singleton instance. More...
|
| |
A class for adding input and output arguments, to be used when running a co-simulation.
Definition at line 67 of file SimulationControl.h.
◆ ArgumentConstObserver
◆ ArgumentConstRef
◆ ArgumentObserver
◆ ArgumentRef
◆ InputArgumentRefVector
◆ OutputArgumentRefVector
◆ SimulationControl()
| agxSDK::SimulationControl::SimulationControl |
( |
| ) |
|
|
protected |
◆ addInitInputArgument()
Adds an input argument.
Input to AGX Dynamics (output from Simulink) Will get data at the initialization of the scene as specified in the AGX block-argument in Simulink
- Parameters
-
| portName | - Name of the variable, useful at debugging. DOes not correspond to any port in simulink. |
◆ addInitOutputArgument()
Adds an output argument.
Output from AGX Dynamics (input to Simulink)
- Parameters
-
| portName | - The name of the Simulink output port ( Will send data from AGX at the initialization to Simulink to the named input port |
◆ addInputArgument()
Adds an input argument.
Input to AGX Dynamics (output from Simulink)
- Parameters
-
| portName | - The name of the Simulink output port |
◆ addOutputArgument()
Adds an output argument.
Output from AGX Dynamics (input to Simulink)
- Parameters
-
| portName | - The name of the Simulink input port |
◆ applyInitInputValues()
◆ clear()
| void agxSDK::SimulationControl::clear |
( |
| ) |
|
◆ getInitInputValueName()
| const char* agxSDK::SimulationControl::getInitInputValueName |
( |
size_t |
valueNr | ) |
|
Returns name associated to input value only for scene initialization, by the argument it belongs to.
- Parameters
-
| valueNr | The number of the input value. |
- Return values
-
| The | name. 0 if valueNr >= number of input values. |
◆ getInitOutputValueName()
| const char* agxSDK::SimulationControl::getInitOutputValueName |
( |
size_t |
valueNr | ) |
|
Returns name associated to output value only for scene initialization, by the argument it belongs to.
- Parameters
-
| valueNr | The number of the output value. |
- Return values
-
| The | name. 0 if valueNr >= number of output values. |
◆ getInputValueName()
| const char* agxSDK::SimulationControl::getInputValueName |
( |
size_t |
valueNr | ) |
|
Returns name associated to input value by the argument it belongs to.
- Parameters
-
| valueNr | The number of the input value. |
- Return values
-
| The | name. 0 if valueNr >= number of input values. |
◆ getLastErrorMessage()
| agx::String agxSDK::SimulationControl::getLastErrorMessage |
( |
| ) |
const |
- Returns
- the last error message set by any method. Will be cleared every timestep
◆ getOutputValueName()
| const char* agxSDK::SimulationControl::getOutputValueName |
( |
size_t |
valueNr | ) |
|
Returns name associated to output value by the argument it belongs to.
- Parameters
-
| valueNr | The number of the output value. |
- Return values
-
| The | name. 0 if valueNr >= number of output values. |
◆ getTotalNumInitInputValues()
| size_t agxSDK::SimulationControl::getTotalNumInitInputValues |
( |
| ) |
const |
Get total size of input values from all input arguments only for scene initialization.
◆ getTotalNumInitOutputValues()
| size_t agxSDK::SimulationControl::getTotalNumInitOutputValues |
( |
| ) |
const |
Get total size of output values from all output arguments only for scene initialization.
◆ getTotalNumInputValues()
| size_t agxSDK::SimulationControl::getTotalNumInputValues |
( |
| ) |
const |
Get total size of input values from all input arguments.
◆ getTotalNumOutputValues()
| size_t agxSDK::SimulationControl::getTotalNumOutputValues |
( |
| ) |
const |
Get total size of output values from all output arguments.
◆ instance()
Gets (and possibly creates) and instance of the singleton.
◆ obtainInitOutputValues()
◆ shutdown()
| void agxSDK::SimulationControl::shutdown |
( |
| ) |
|
|
overrideprotectedvirtual |
Implement this method to cleanup your Singleton class.
Reimplemented from agx::Singleton.
◆ step()
Steps the simulation one time step, using inputs and returning outputs.
If anything goes wrong, reports to LOGGER_WARNING and returns false.
- Parameters
-
| inputs | The inputs. Fixed size. |
| outputs | The outputs. Fixed size, just write at the right positions. |
- Return values
-
The documentation for this class was generated from the following file: