src
dynamic_graph
signal-wrapper.cc
Go to the documentation of this file.
1
// Copyright (c) 2018, Joseph Mirabel
2
// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3
4
#include "
dynamic-graph/python/signal-wrapper.hh
"
5
6
#include <
dynamic-graph/command-bind.h
>
7
#include <dynamic-graph/factory.h>
8
9
namespace
dynamicgraph
{
10
namespace
python
{
11
void
PythonSignalContainer::signalRegistration
(
12
const
SignalArray<sigtime_t>
& signals) {
13
Entity::signalRegistration
(signals);
14
}
15
16
void
PythonSignalContainer::rmSignal
(
const
std::string&
name
) {
17
Entity::signalDeregistration
(
name
);
18
}
19
20
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
(
PythonSignalContainer
,
21
"PythonSignalContainer"
);
22
23
template
<
class
T,
class
Time>
24
bool
SignalWrapper<T, Time>::checkCallable
(
pyobject
c, std::string& error) {
25
if
(PyCallable_Check(
c
.ptr()) == 0) {
26
error = boost::python::extract<std::string>(
c
.attr(
"__str__"
)());
27
error +=
" is not callable"
;
28
return
false
;
29
}
30
return
true
;
31
}
32
33
template
class
SignalWrapper<bool, sigtime_t>
;
34
template
class
SignalWrapper<int32_t, sigtime_t>
;
35
template
class
SignalWrapper<int64_t, sigtime_t>
;
36
template
class
SignalWrapper<uint32_t, sigtime_t>
;
37
template
class
SignalWrapper<uint64_t, sigtime_t>
;
38
template
class
SignalWrapper<float, sigtime_t>
;
39
template
class
SignalWrapper<double, sigtime_t>
;
40
template
class
SignalWrapper<Vector, sigtime_t>
;
41
}
// namespace python
42
}
// namespace dynamicgraph
dynamicgraph::python::PythonSignalContainer::signalRegistration
void signalRegistration(const SignalArray< sigtime_t > &signals)
Definition:
signal-wrapper.cc:11
dynamicgraph::python::SignalWrapper
Definition:
signal-wrapper.hh:31
dynamicgraph
dynamicgraph::Entity::name
std::string name
dynamicgraph::python::SignalWrapper::pyobject
boost::python::object pyobject
Definition:
signal-wrapper.hh:34
command-bind.h
signal-wrapper.hh
c
c
python
setup.name
name
Definition:
setup.in.py:179
dynamicgraph::python::SignalWrapper::checkCallable
static bool checkCallable(pyobject c, std::string &error)
Definition:
signal-wrapper.cc:24
dynamicgraph::python::PythonSignalContainer::rmSignal
void rmSignal(const std::string &name)
Definition:
signal-wrapper.cc:16
dynamicgraph::SignalArray
dynamicgraph::python::DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(PythonSignalContainer, "PythonSignalContainer")
dynamicgraph::Entity::signalDeregistration
void signalDeregistration(const std::string &name)
dynamicgraph::Entity::signalRegistration
void signalRegistration(const SignalArray< sigtime_t > &signals)
dynamicgraph::python::PythonSignalContainer
Definition:
signal-wrapper.hh:19
dynamic-graph-python
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Fri Oct 27 2023 02:16:36