switch-python-module-py.cc
Go to the documentation of this file.
1 #include <sot/core/switch.hh>
2 
4 
5 namespace dg = dynamicgraph;
6 typedef bp::return_value_policy<bp::reference_existing_object>
8 
9 template <typename T, typename Time>
10 void exposeSwitch() {
11  typedef dg::sot::Switch<T, Time> E_t;
12  typedef typename E_t::Base B_t;
13  dg::python::exposeEntity<E_t, bp::bases<dg::Entity>,
14  dg::python::AddCommands>()
15  .def_readonly("sout", &E_t::SOUT)
16  .def("sin", &B_t::getSignalIn, reference_existing_object())
17  .add_property("n_sin", &B_t::getSignalNumber, &B_t::setSignalNumber,
18  "the number of input signal.")
19  .def_readonly("selection", &E_t::selectionSIN)
20  .def_readonly("boolSelection", &E_t::boolSelectionSIN)
21 
22  .def("setSignalNumber", &B_t::setSignalNumber,
23  "set the number of input signal.", bp::arg("size"))
24  .def("getSignalNumber", &B_t::getSignalNumber,
25  "get the number of input signal.", bp::arg("size"));
26 }
27 
29  exposeSwitch<bool, dg::sigtime_t>();
30  exposeSwitch<dg::Vector, dg::sigtime_t>();
31  exposeSwitch<dg::sot::MatrixHomogeneous, dg::sigtime_t>();
32 }
reference_existing_object
bp::return_value_policy< bp::reference_existing_object > reference_existing_object
Definition: switch-python-module-py.cc:7
BOOST_PYTHON_MODULE
BOOST_PYTHON_MODULE(wrap)
Definition: switch-python-module-py.cc:28
dynamicgraph
switch.hh
Base
BVNodeBase Base
module.hh
exposeSwitch
void exposeSwitch()
Definition: switch-python-module-py.cc:10
def
void def(const char *name, Func func)
wrap


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31