Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sot-hpp
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stack Of Tasks
sot-hpp
Commits
942b4d97
Commit
942b4d97
authored
Mar 27, 2018
by
Joseph Mirabel
Committed by
Joseph Mirabel
Mar 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add command Event::list
parent
67b23caa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
src/event.hh
src/event.hh
+19
-0
No files found.
src/event.hh
View file @
942b4d97
...
...
@@ -23,6 +23,7 @@
#include <dynamic-graph/signal-time-dependent.h>
#include <dynamic-graph/pool.h>
#include <dynamic-graph/command-bind.h>
#include <dynamic-graph/command-getter.h>
#include <sot/hpp/config.hh>
...
...
@@ -50,6 +51,12 @@ namespace dynamicgraph {
" Add a signal
\n
"
;
addCommand
(
"addSignal"
,
makeCommandVoid1
(
*
this
,
&
Event
::
addSignal
,
docstring
));
docstring
=
"
\n
"
" Get list of signals
\n
"
;
addCommand
(
"list"
,
new
command
::
Getter
<
Event
,
std
::
string
>
(
*
this
,
&
Event
::
getSignalsByName
,
docstring
));
}
~
Event
()
{}
...
...
@@ -68,6 +75,18 @@ namespace dynamicgraph {
triggers
.
push_back
(
&
PoolStorage
::
getInstance
()
->
getSignal
(
iss
));
}
// Returns the Python string representation of the list of signal names.
std
::
string
getSignalsByName
()
const
{
std
::
ostringstream
oss
;
oss
<<
"("
;
for
(
Triggers_t
::
const_iterator
_sig
=
triggers
.
begin
();
_sig
!=
triggers
.
end
();
++
_sig
)
oss
<<
'\''
<<
(
*
_sig
)
->
getName
()
<<
"
\'
, "
;
oss
<<
")"
;
return
oss
.
str
();
}
private:
typedef
SignalBase
<
int
>*
Trigger_t
;
typedef
std
::
vector
<
Trigger_t
>
Triggers_t
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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