Skip to content

Commit

Permalink
updating abstract stage class Implement the abstract class for stages.
Browse files Browse the repository at this point in the history
  • Loading branch information
edyoshikun committed Jun 21, 2023
1 parent 9e81839 commit 22b6838
Showing 1 changed file with 41 additions and 3 deletions.
44 changes: 41 additions & 3 deletions copylot/hardware/stages/abstract_stage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
import abc
from abc import ABCMeta, abstractmethod

class AbstractStage(metaclass=ABCMeta):

class AbstractStage(metaclass=abc.ABCMeta):
pass
@property
@abstractmethod
def position(self):
"Method to get/set the position in um"
raise NotImplementedError()

@position.setter
@abstractmethod
def position(self, value):
raise NotImplementedError()

@property
@abstractmethod
def travel_range(self):
"""
Valid minimum and maximum travel range values.
Returns
-------
Tuple
(min_valid_position, max_valid_position)
"""
raise NotImplementedError()

@travel_range.setter
@abstractmethod
def travel_range(self, value):
"""
Set the travel range of the stage
----
Tuple
(min_valid_position, max_valid_position)
"""

@abstractmethod
def move_relative(self, value):
" Move the relative distance from current position"
raise NotImplementedError()


0 comments on commit 22b6838

Please sign in to comment.