connector.py 434 B

12345678910111213141516171819202122232425262728
  1. from abc import ABC, abstractmethod
  2. class Connector(ABC):
  3. @abstractmethod
  4. def open(self):
  5. pass
  6. @abstractmethod
  7. def close(self):
  8. pass
  9. @abstractmethod
  10. def get_name(self):
  11. pass
  12. @abstractmethod
  13. def is_connected(self):
  14. pass
  15. @abstractmethod
  16. def send_command(self, content):
  17. pass
  18. @abstractmethod
  19. def command_polling(self, content):
  20. pass