Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph-python
Commits
20681b37
Commit
20681b37
authored
Feb 20, 2018
by
Joseph Mirabel
Committed by
Guilhem Saurel
Jul 30, 2018
Browse files
Add command to remove a signal from PythonSignalContainer
parent
b5ea1954
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/signal-wrapper.cc
View file @
20681b37
...
...
@@ -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
>
...
...
src/signal-wrapper.hh
View file @
20681b37
...
...
@@ -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
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment