17#ifndef AGXSDK_SIMULATION_CONTROL_H
18#define AGXSDK_SIMULATION_CONTROL_H
33 class CoSimulationClient;
47 size_t numInputValues,
size_t numOutputValues);
71 friend class agxMex::Simulation;
194 SINGLETON_CLASSNAME_METHOD();
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXPHYSICS_EXPORT
Class for receiving serialized agxSDK::Simulation:s from remote host.
Base class for input/output arguments.
SimulationControlArgument(size_t numInputValues, size_t numOutputValues)
size_t getNumOutputValues() const
virtual bool obtainOutput(const agxSDK::Simulation *simulation, const agx::RealVector &output) const =0
size_t getNumInputValues() const
virtual bool applyInput(const agxSDK::Simulation *simulation, const agx::RealVector &input) const =0
size_t cachedTotalOutputSize
OutputArgumentRefVector arguments
OutputArgumentCollection()
agx::StringVector valueNames
A class for adding input and output arguments, to be used when running a co-simulation.
agx::Vector< SimulationControlArgumentRef > OutputArgumentRefVector
void addOutputArgument(const agx::String &portName, SimulationControlArgument *outputArgument)
Adds an output argument.
size_t getTotalNumInitInputValues() const
Get total size of input values from all input arguments only for scene initialization.
void addInitOutputArgument(const agx::String &portName, SimulationControlArgument *outputArgument)
Adds an output argument.
size_t getTotalNumInitOutputValues() const
Get total size of output values from all output arguments only for scene initialization.
static SimulationControl * instance()
Gets (and possibly creates) and instance of the singleton.
void addInitInputArgument(const agx::String &portName, SimulationControlArgument *inputArgument)
Adds an input argument.
bool step(const agx::RealVector &inputs, const agx::RealVector &outputs, agxSDK::Simulation *simulation)
Steps the simulation one time step, using inputs and returning outputs.
const char * getInitOutputValueName(size_t valueNr)
Returns name associated to output value only for scene initialization, by the argument it belongs to.
const char * getInputValueName(size_t valueNr)
Returns name associated to input value by the argument it belongs to.
size_t getTotalNumInputValues() const
Get total size of input values from all input arguments.
bool applyInitInputValues(agxSDK::Simulation *simulation, const agx::RealVector &initInputs) const
const char * getInitInputValueName(size_t valueNr)
Returns name associated to input value only for scene initialization, by the argument it belongs to.
void addInputArgument(const agx::String &portName, SimulationControlArgument *inputArgument)
Adds an input argument.
void shutdown() override
Implement this method to cleanup your Singleton class.
agx::String getLastErrorMessage() const
agx::Vector< SimulationControlArgumentRef > InputArgumentRefVector
bool obtainInitOutputValues(agxSDK::Simulation *simulation, const agx::RealVector &initOutputs) const
const char * getOutputValueName(size_t valueNr)
Returns name associated to output value by the argument it belongs to.
size_t getTotalNumOutputValues() const
Get total size of output values from all output arguments.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Base class providing referencing counted objects.
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
This namespace contains functionality for using AGX with Matlab/Simulink.
Containins classes for sending/reading data over sockets as well as compression functionality.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...