add execute

This commit is contained in:
ilia 2023-10-24 10:11:30 +03:00
parent 48b18048c8
commit 9cf90c7f18
2 changed files with 7 additions and 3 deletions

1
turtle/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
test.ipynb

View File

@ -7,7 +7,6 @@ from controls.device import ActionDescriptor
class TurtleDevice(SynchronyDevice): class TurtleDevice(SynchronyDevice):
def open(self): def open(self):
self.turtle = Turtle()
super().open() super().open()
def close(self): def close(self):
@ -25,10 +24,14 @@ class TurtleDevice(SynchronyDevice):
pass pass
def read(self, trait_name: str) -> Any: def read(self, trait_name: str) -> Any:
raise NonReadableTrait pass
def write(self, trait_name: str, value: Any) -> bool: def write(self, trait_name: str, value: Any) -> bool:
self.turtle.write() self.turtle.write()
def execute(self, action_name: str, *args, **kwargs):
"""Execute action `action_name`, using `args` and `kwargs` as action argument."""
pass
def invalidate(self, trait_name: str): def invalidate(self, trait_name: str):
pass pass