11"""Module defining the base class and static func for interfaces."""
2+
23from abc import ABCMeta , abstractmethod
34from dataclasses import dataclass , field
45from datetime import datetime
@@ -182,12 +183,13 @@ class UOSInterface(metaclass=ABCMeta):
182183 def execute_instruction (self , packet : NPCPacket ) -> ComResult : # dead: disable
183184 """Abstract method for executing instructions on UOSInterfaces.
184185
185- :param packet: A tuple containing the uint8 npc packet for the UOS instruction.
186+ :param packet: A tuple containing the uint8 npc packet for the
187+ UOS instruction.
186188 :returns: ComResult object.
187189 :raises: UOSUnsupportedError if the interface hasn't been built
188- correctly.
190+ correctly.
189191 :raises: UOSCommunicationError if there is a problem completing
190- the action.
192+ the action.
191193 """
192194 raise UOSUnsupportedError (
193195 "UOSInterfaces must over-ride "
@@ -201,12 +203,13 @@ def read_response(
201203 """Read ACK and Data packets from a UOSInterface.
202204
203205 :param expect_packets: How many packets including ACK to expect
204- :param timeout_s: The maximum time this function will wait for data.
206+ :param timeout_s: The maximum time this function will wait for
207+ data.
205208 :return: COM Result object.
206209 :raises: UOSUnsupportedError if the interface hasn't been built
207- correctly.
210+ correctly.
208211 :raises: UOSCommunicationError if there is a problem completing
209- the action.
212+ the action.
210213 """
211214 raise UOSUnsupportedError (
212215 "UOSInterfaces must over-ride "
@@ -219,9 +222,9 @@ def hard_reset(self) -> ComResult:
219222
220223 :return: COM Result object.
221224 :raises: UOSUnsupportedError if the interface hasn't been built
222- correctly.
225+ correctly.
223226 :raises: UOSCommunicationError if there is a problem completing
224- the action.
227+ the action.
225228 """
226229 raise UOSUnsupportedError (
227230 "UOSInterfaces must over-ride "
@@ -233,9 +236,9 @@ def open(self):
233236 """Abstract method for opening a connection to a UOSInterface.
234237
235238 :raises: UOSUnsupportedError if the interface hasn't been built
236- correctly.
239+ correctly.
237240 :raises: UOSCommunicationError if there is a problem completing
238- the action.
241+ the action.
239242 """
240243 raise UOSUnsupportedError (
241244 "UOSInterfaces must over-ride " f"{ UOSInterface .open .__name__ } prototype."
@@ -246,9 +249,9 @@ def close(self):
246249 """Abstract method for closing a connection to a UOSInterface.
247250
248251 :raises: UOSUnsupportedError if the interface hasn't been built
249- correctly.
252+ correctly.
250253 :raises: UOSCommunicationError if there is a problem completing
251- the action.
254+ the action.
252255 """
253256 raise UOSUnsupportedError (
254257 "UOSInterfaces must over-ride " f"{ UOSInterface .close .__name__ } prototype."
@@ -260,7 +263,7 @@ def is_active(self) -> bool:
260263
261264 :return: Success boolean.
262265 :raises: UOSUnsupportedError if the interface hasn't been built
263- correctly.
266+ correctly.
264267 """
265268 raise UOSUnsupportedError (
266269 "UOSInterfaces must over-ride " f"{ UOSInterface .close .__name__ } prototype."
@@ -273,7 +276,7 @@ def enumerate_devices() -> list:
273276
274277 :return: A list of possible UOSInterfaces on the server.
275278 :raises: UOSUnsupportedError if the interface hasn't been built
276- correctly.
279+ correctly.
277280 """
278281 raise UOSUnsupportedError (
279282 "UOSInterfaces must over-ride "
0 commit comments