-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating abstract stage class Implement the abstract class for stages. …
- Loading branch information
1 parent
9e81839
commit 22b6838
Showing
1 changed file
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
|
||
|