1 #ifndef DYNAMIC_GRAPH_PY 2 #define DYNAMIC_GRAPH_PY 7 #include <dynamic-graph/debug.h> 8 #include <dynamic-graph/exception-factory.h> 9 #include <dynamic-graph/signal-base.h> 17 namespace signalBase {
18 PyObject*
create(PyObject*
self, PyObject* args);
20 PyObject*
getTime(PyObject*
self, PyObject* args);
21 PyObject*
setTime(PyObject*
self, PyObject* args);
22 PyObject*
getName(PyObject*
self, PyObject* args);
24 PyObject*
display(PyObject*
self, PyObject* args);
26 PyObject*
getValue(PyObject*
self, PyObject* args);
27 PyObject*
setValue(PyObject*
self, PyObject* args);
28 PyObject*
recompute(PyObject*
self, PyObject* args);
29 PyObject*
unplug(PyObject*
self, PyObject* args);
30 PyObject*
isPlugged(PyObject*
self, PyObject* args);
31 PyObject*
getPlugged(PyObject*
self, PyObject* args);
34 PyObject*
create(PyObject*
self, PyObject* args);
35 PyObject*
display(PyObject*
self, PyObject* args);
36 PyObject*
display(PyObject*
self, PyObject* args);
37 PyObject*
getName(PyObject*
self, PyObject* args);
39 PyObject*
hasSignal(PyObject*
self, PyObject* args);
40 PyObject*
getSignal(PyObject*
self, PyObject* args);
41 PyObject*
listSignals(PyObject*
self, PyObject* args);
57 namespace signalCaster {
61 PyObject*
writeGraph(PyObject*
self, PyObject* args);
77 PyObject*
plug(PyObject* , PyObject* args);
82 #
if PY_MAJOR_VERSION >= 3
83 PyObject* m, PyObject*
92 __attribute__((unused))
static PyMethodDef dynamicGraphMethods[] = {
98 "create a SignalWrapper C++ object"},
103 "Get the class name of a signal"},
106 "Print the signal dependencies in a string"},
110 "Recompute the signal at given time"},
113 "Whether the signal is plugged"},
115 "To which signal the signal is plugged"},
121 "get the class name of an Entity"},
123 "return True if the entity has a signal with the given name"},
126 "Return the list of signals of an entity."},
129 "list the commands of an entity"},
131 "get the docstring of an entity command"},
133 "get the doc string of an entity type"},
135 "return the list of entity classes"},
137 "return the list of signal type names"},
140 "return the list of instanciated entities"},
142 "set the verbosity level of the entity"},
144 "get the verbosity level of the entity"},
146 "add a output file stream to the logger by filename"},
148 "add std::cout as output stream to the logger"},
150 "close all the loggers file output streams."},
152 "set the time sample for printing debugging information"},
154 "get the time sample for printing debugging information"},
156 "set the period at which debugging information are printed"},
158 "get the period at which debugging information are printed"},
160 "Destroy the real time logger."},
162 "Destroy the real time logger."},
164 "Starts the real time logger."},
166 {NULL, NULL, 0, NULL}
169 #if PY_MAJOR_VERSION >= 3 170 __attribute__((unused))
static struct PyModuleDef dynamicGraphModuleDef = {
171 PyModuleDef_HEAD_INIT,
180 #define GETSTATE(m) ((struct dynamicgraph::python::module_state*)PyModule_GetState(m)) 181 #define DGPYERROR(m) GETSTATE(m)->dgpyError 182 #define INITERROR return NULL 185 #define GETSTATE(m) (&dynamicgraph::python::_state) 186 #define DGPYERROR(m) dynamicgraph::python::dgpyError 187 #define INITERROR return PyObject * setValue(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:375
PyObject * create(PyObject *self, PyObject *args)
Create an instance of SignalBase.
Definition: signal-base-py.cc:37
PyObject * getDocString(PyObject *self, PyObject *args)
Definition: entity-py.cc:377
PyObject * display(PyObject *self, PyObject *args)
Definition: entity-py.cc:408
PyObject * setStreamPrintPeriod(PyObject *self, PyObject *args)
Set print period.
Definition: entity-py.cc:560
PyObject * addLoggerCoutOutputStream(PyObject *self, PyObject *args)
Definition: debug-py.cc:71
PyObject * error_out(PyObject *, PyObject *)
Definition: dynamic-graph-py.cc:114
PyObject * getClassName(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:351
PyObject * plug(PyObject *, PyObject *args)
plug a signal into another one.
Definition: dynamic-graph-py.cc:24
PyObject * createSignalWrapper(PyObject *self, PyObject *args)
Create an instance of SignalWrapper.
Definition: signal-base-py.cc:93
PyObject * recompute(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:402
PyObject * getTimeSample(PyObject *self, PyObject *args)
Get stream print period.
Definition: entity-py.cc:600
PyObject * getClassName(PyObject *self, PyObject *args)
Get class name of entity.
Definition: entity-py.cc:112
PyObject * getName(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:327
__attribute__((unused)) static PyMethodDef dynamicGraphMethods[]
List of python functions.
PyObject * getEntityClassList(PyObject *self, PyObject *args)
Get name of entity.
Definition: factory-py.cc:19
PyObject * realTimeLoggerDestroy(PyObject *self, PyObject *args)
Definition: debug-py.cc:85
PyObject * listSignals(PyObject *self, PyObject *args)
Definition: entity-py.cc:210
PyObject * getPlugged(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:470
PyObject * create(PyObject *self, PyObject *args)
Create an instance of Entity.
Definition: entity-py.cc:44
PyObject * addLoggerFileOutputStream(PyObject *self, PyObject *args)
Definition: debug-py.cc:32
PyObject * listCommands(PyObject *self, PyObject *args)
Definition: entity-py.cc:314
PyObject * realTimeLoggerInstance(PyObject *self, PyObject *args)
Definition: debug-py.cc:113
PyObject * display(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:179
PyObject * getLoggerVerbosityLevel(PyObject *self, PyObject *args)
Get verbosity Level.
Definition: entity-py.cc:497
PyObject * writeGraph(PyObject *self, PyObject *args)
Definition: pool-py.cc:19
PyObject * realTimeLoggerSpinOnce(PyObject *self, PyObject *args)
Definition: debug-py.cc:99
PyObject * setTimeSample(PyObject *self, PyObject *args)
Set time sample.
Definition: entity-py.cc:631
PyObject * executeCommand(PyObject *self, PyObject *args)
Definition: entity-py.cc:245
PyObject * closeLoggerFileOutputStream(PyObject *self, PyObject *args)
Definition: debug-py.cc:55
PyObject * getName(PyObject *self, PyObject *args)
Get name of entity.
Definition: entity-py.cc:82
PyObject * getTime(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:143
PyObject * getSignalTypeList(PyObject *self, PyObject *args)
Definition: signal-caster-py.cc:14
PyObject * getValue(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:227
PyObject * setTime(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:156
PyObject * displayDependencies(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:203
PyObject * getCommandDocstring(PyObject *self, PyObject *args)
Definition: entity-py.cc:341
PyObject * getStreamPrintPeriod(PyObject *self, PyObject *args)
Get stream print period.
Definition: entity-py.cc:529
PyObject * getEntityList(PyObject *self, PyObject *args)
Get list of entities.
Definition: pool-py.cc:38
Definition: dynamic-graph-py.hh:73
PyObject * unplug(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:424
PyObject * hasSignal(PyObject *self, PyObject *args)
Check if the entity has a signal with the given name.
Definition: entity-py.cc:142
Definition: convert-dg-to-py.hh:7
PyObject * setLoggerVerbosityLevel(PyObject *self, PyObject *args)
Set verbosity Level.
Definition: entity-py.cc:435
PyObject * isPlugged(PyObject *self, PyObject *args)
Definition: signal-base-py.cc:445
PyObject * enableTrace(PyObject *, PyObject *args)
Definition: dynamic-graph-py.cc:78
PyObject * getSignal(PyObject *self, PyObject *args)
Get a signal by name.
Definition: entity-py.cc:178
PyObject * dgpyError
Definition: dynamic-graph-py.hh:74