Skip to content
Snippets Groups Projects
Commit 1c9edaba authored by florent's avatar florent
Browse files

Make classes derive from object and re-introduce getter and setter decorators

     * src/dynamic_graph/entity.py,
     * src/dynamic_graph/signal_base.py: getter and setter for signal value
parent 6f4f8990
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
"""
import wrap, signal_base
class Entity:
class Entity (object) :
"""
This class binds dynamicgraph::Entity C++ class
"""
......
......@@ -5,7 +5,7 @@
"""
import wrap
class SignalBase:
class SignalBase (object) :
"""
This class binds dynamicgraph::SignalBase<int> C++ class
"""
......@@ -29,13 +29,15 @@ class SignalBase:
"""
return wrap.signalBaseGetTime(self.object)
def get_value(self) :
@property
def value(self) :
"""
Read the value of a signal
"""
return wrap.signal_base_get_value(self.object)
def set_value(self, val) :
@value.setter
def value(self, val) :
"""
Set the signal as a constant signal with given value.
If the signal is plugged, it will be unplugged
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment