Skip to content
Snippets Groups Projects
Commit 95ac92a2 authored by florent's avatar florent
Browse files

Call plug with right order for signals: plug (sigIn, sigOut).

     * src/dynamic-graph-py.cc,
     * src/dynamic_graph/__init__.py.
parent d605c870
No related branches found
No related tags found
No related merge requests found
...@@ -44,12 +44,12 @@ namespace dynamicgraph { ...@@ -44,12 +44,12 @@ namespace dynamicgraph {
char* objIn = NULL; char* objIn = NULL;
char* sigOut = NULL; char* sigOut = NULL;
char* sigIn = NULL; char* sigIn = NULL;
if (!PyArg_ParseTuple(args,"ssss", &objOut, &sigOut, &objIn, &sigIn)) if (!PyArg_ParseTuple(args,"ssss", &objIn, &sigIn, &objOut, &sigOut))
return NULL; return NULL;
std::ostringstream os; std::ostringstream os;
try { try {
interpreter.cmdPlug(objOut, sigOut, objIn, sigIn, os); interpreter.cmdPlug(objIn, sigIn, objOut, sigOut, os);
} catch (dynamicgraph::ExceptionFactory& exc) { } catch (dynamicgraph::ExceptionFactory& exc) {
PyErr_SetString(error, exc.getStringMessage().c_str()); PyErr_SetString(error, exc.getStringMessage().c_str());
return NULL; return NULL;
......
...@@ -7,12 +7,12 @@ from wrap import * ...@@ -7,12 +7,12 @@ from wrap import *
import entity, signal_base import entity, signal_base
import re import re
def plug (signalOut, signalIn) : def plug (signalIn, signalOut) :
""" """
Plug an output signal into an input signal Plug an output signal into an input signal
syntax is plug ("entityOut.signalOut", "entityIn.signalIn") syntax is plug ("entityIn.signalIn", "entityOut.signalOut")
""" """
# get signals and entities # get signals and entities
[eOut, sOut] = re.split("\.", signalOut)
[eIn, sIn] = re.split("\.", signalOut) [eIn, sIn] = re.split("\.", signalOut)
w_plug(eOut, sOut, eIn, sIn) [eOut, sOut] = re.split("\.", signalOut)
w_plug(eIn, sIn, eOut, sOut)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment