33 lines
689 B
Python
33 lines
689 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Callable
|
|
|
|
class LockInAmp(ABC):
|
|
@abstractmethod
|
|
def test_connection(self) -> None:
|
|
"""
|
|
Verify that the device is still properly connected.
|
|
If not, raises ConnectionError
|
|
"""
|
|
pass
|
|
# RUN COMMANDS ON THE DEVICE
|
|
@abstractmethod
|
|
def run(self, code, verbose=False):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def reset(self, verbose=False):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def read_value(self, which:str) -> float:
|
|
"""
|
|
Read a single value
|
|
|
|
:param which: X, Y, R, Theta
|
|
"""
|
|
pass
|
|
|
|
|
|
@abstractmethod
|
|
def __str__(self):
|
|
pass |