Commit 20681b37 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Guilhem Saurel

Add command to remove a signal from PythonSignalContainer

parent b5ea1954
......@@ -18,6 +18,7 @@
#include <Python.h>
#include <dynamic-graph/factory.h>
#include <dynamic-graph/command-bind.h>
namespace dynamicgraph {
namespace python {
......@@ -37,6 +38,16 @@ namespace dynamicgraph {
PythonSignalContainer::PythonSignalContainer(const std::string& name)
: Entity (name)
{
std::string docstring;
docstring = " \n"
" Remove a signal\n"
" \n"
" Input:\n"
" - name of the signal\n"
" \n";
addCommand("rmSignal",
command::makeCommandVoid1(*this,&PythonSignalContainer::rmSignal,docstring));
}
void PythonSignalContainer::signalRegistration (const SignalArray<int>& signals)
......@@ -44,6 +55,11 @@ namespace dynamicgraph {
Entity::signalRegistration (signals);
}
void PythonSignalContainer::rmSignal (const std::string& name)
{
Entity::signalDeregistration (name);
}
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(PythonSignalContainer, "PythonSignalContainer");
template <class T, class Time>
......
......@@ -41,6 +41,8 @@ namespace dynamicgraph {
PythonSignalContainer (const std::string& name);
void signalRegistration (const SignalArray<int>& signals);
void rmSignal (const std::string& name);
};
template <class T, class Time>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment