AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxPython/ScriptManager.h File Reference
#include <agx/config/AGX_USE_PYTHON.h>
#include <agx/config/AGX_USE_WEBSOCKETS.h>
#include <agx/config.h>
#include <agx/ref_ptr.h>
#include <agxPython/export.h>
#include <agx/Referenced.h>
#include <agx/Logger.h>
#include <agx/Timer.h>
#include <agx/agx_vector_types.h>
#include <agx/Uuid.h>
#include <agxSDK/CallbackWrappers.h>
#include <agxPython/ScriptContext.h>
#include <agxPython/ReactiveScript.h>
#include <agxPython/ScriptIDE.h>
#include <string>
#include <map>
#include <set>
#include <exception>

Go to the source code of this file.

Classes

class  agxPython::ScriptError
 Exception base class for all fatal runtime errors caused by Python scripts. More...
 
class  agxPython::ScriptManager
 Class that manages the embedded Python interpreter and a script context. More...
 
class  agxPython::StartPlaybackSignalCallback
 
class  agxPython::StartRecordingSignalCallback
 
class  agxPython::StopPlaybackSignalCallback
 
class  agxPython::StopRecordingSignalCallback
 

Namespaces

 agxPython
 ReactiveScripts are Python scripts for use in strong coupling with the Simulation instance it is assigned and the stepping in time it grants.
 
 agxSDK
 The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simulation system including Material, event listeners etc.
 

Macros

#define AGXPYTHON_REPORT_ERROR(errorMessage)
 
#define g_pythonScriptManager   agxPython::ScriptManager::instance("")
 
#define g_pythonScriptManagerForProgram(PROGRAM)   agxPython::ScriptManager::instance(PROGRAM)
 

Typedefs

typedef agx::observer_ptr
< const
StartPlaybackSignalCallback > 
agxPython::StartPlaybackSignalCallbackConstObserver
 
typedef agx::ref_ptr< const
StartPlaybackSignalCallback > 
agxPython::StartPlaybackSignalCallbackConstRef
 
typedef agx::observer_ptr
< StartPlaybackSignalCallback > 
agxPython::StartPlaybackSignalCallbackObserver
 
typedef agx::ref_ptr
< StartPlaybackSignalCallback > 
agxPython::StartPlaybackSignalCallbackRef
 
typedef agx::observer_ptr
< const
StartRecordingSignalCallback > 
agxPython::StartRecordingSignalCallbackConstObserver
 
typedef agx::ref_ptr< const
StartRecordingSignalCallback > 
agxPython::StartRecordingSignalCallbackConstRef
 
typedef agx::observer_ptr
< StartRecordingSignalCallback > 
agxPython::StartRecordingSignalCallbackObserver
 
typedef agx::ref_ptr
< StartRecordingSignalCallback > 
agxPython::StartRecordingSignalCallbackRef
 
typedef agx::observer_ptr
< const
StopPlaybackSignalCallback > 
agxPython::StopPlaybackSignalCallbackConstObserver
 
typedef agx::ref_ptr< const
StopPlaybackSignalCallback > 
agxPython::StopPlaybackSignalCallbackConstRef
 
typedef agx::observer_ptr
< StopPlaybackSignalCallback > 
agxPython::StopPlaybackSignalCallbackObserver
 
typedef agx::ref_ptr
< StopPlaybackSignalCallback > 
agxPython::StopPlaybackSignalCallbackRef
 
typedef agx::observer_ptr
< const
StopRecordingSignalCallback > 
agxPython::StopRecordingSignalCallbackConstObserver
 
typedef agx::ref_ptr< const
StopRecordingSignalCallback > 
agxPython::StopRecordingSignalCallbackConstRef
 
typedef agx::observer_ptr
< StopRecordingSignalCallback > 
agxPython::StopRecordingSignalCallbackObserver
 
typedef agx::ref_ptr
< StopRecordingSignalCallback > 
agxPython::StopRecordingSignalCallbackRef
 

Enumerations

enum  agxPython::ScriptContextType {
  agxPython::SCRIPTCONTEXT_INVALID = 0, agxPython::SCRIPTCONTEXT_PYTHON, agxPython::SCRIPTCONTEXT_AGXVIEWER, agxPython::SCRIPTCONTEXT_FMI,
  agxPython::SCRIPTCONTEXT_QTVIEWER
}
 

Functions

AGXPYTHON_EXPORT bool agxPython::doFile (const std::string &path)
 
AGXPYTHON_EXPORT ScriptContext * agxPython::getContext ()
 
AGXPYTHON_EXPORT bool agxPython::scriptIsAttached ()
 

Macro Definition Documentation

#define AGXPYTHON_REPORT_ERROR (   errorMessage)
Value:
if (g_pythonScriptManager->getTreatInvalidAsErrors() || agxUnit::isUnittestingEnabled()) \
{ \
LOGGER_ERROR() << (errorMessage) << std::endl << LOGGER_END(); \
} \
else \
{ \
LOGGER_WARNING() << (errorMessage) << std::endl << LOGGER_END(); \
}
bool isUnittestingEnabled()
Is unit testing enabled? (Has to be both built and initialized).
Definition: UnitMacros.h:316
#define g_pythonScriptManager
#define LOGGER_WARNING()
Definition: Logger.h:23
#define LOGGER_ERROR()
Definition: Logger.h:22
#define LOGGER_END()
Definition: Logger.h:26

Definition at line 504 of file agxPython/ScriptManager.h.

#define g_pythonScriptManager   agxPython::ScriptManager::instance("")

Definition at line 502 of file agxPython/ScriptManager.h.

#define g_pythonScriptManagerForProgram (   PROGRAM)    agxPython::ScriptManager::instance(PROGRAM)

Definition at line 503 of file agxPython/ScriptManager.h.