cache Module¶
Convert and cache needle positions.
-
class
AYABInterface.communication.cache.NeedlePositionCache(get_needle_positions, machine)[source]¶ Bases:
objectConvert and cache needle positions.
-
__weakref__¶ list of weak references to the object (if defined)
-
get(line_number)[source]¶ Return the needle positions or None.
Parameters: line_number¶ (int) – the number of the line Return type: list Returns: the needle positions for a specific line specified by line_numberorNoneif no were given
-
get_bytes(line_number)[source]¶ Get the bytes representing needle positions or None.
Parameters: line_number¶ (int) – the line number to take the bytes from Return type: bytes Returns: the bytes that represent the message or Noneif no data is there for the line.Depending on the
machine, the length and result may vary.
-