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

Rewrite dynamic_graph.plug.

	* src/dynamic-graph-py.cc: rename plug -> w_plug,
	* src/dynamic_graph/__init__.py: bing wrap.w_plug to plug.
parent fe120531
No related branches found
No related tags found
No related merge requests found
...@@ -91,9 +91,9 @@ namespace dynamicgraph { ...@@ -91,9 +91,9 @@ namespace dynamicgraph {
\brief List of python functions \brief List of python functions
*/ */
static PyMethodDef dynamicGraphMethods[] = { static PyMethodDef dynamicGraphMethods[] = {
{"plug", dynamicgraph::python::plug, METH_VARARGS, {"w_plug", dynamicgraph::python::plug, METH_VARARGS,
"plug an output signal into an input signal"}, "plug an output signal into an input signal"},
{"debugtrace", dynamicgraph::python::enableTrace, METH_VARARGS, {"w_debugtrace", dynamicgraph::python::enableTrace, METH_VARARGS,
"Enable or disable tracing debug info in a file"}, "Enable or disable tracing debug info in a file"},
// Signals // Signals
{"create_signal_base", dynamicgraph::python::signalBase::create, METH_VARARGS, {"create_signal_base", dynamicgraph::python::signalBase::create, METH_VARARGS,
......
...@@ -3,5 +3,16 @@ Copyright (c) 2010 CNRS ...@@ -3,5 +3,16 @@ Copyright (c) 2010 CNRS
Author: Florent Lamiraux Author: Florent Lamiraux
""" """
import wrap from wrap import *
import entity, signal_base import entity, signal_base
import re
def plug (signalOut, signalIn) :
"""
Plug an output signal into an input signal
syntax is plug ("entityOut.signalOut", "entityIn.signalIn")
"""
# get signals and entities
[eOut, sOut] = re.split("\.", signalOut)
[eIn, sIn] = re.split("\.", signalOut)
w_plug(eOut, sOut, eIn, sIn)
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