luma.core.util
¶
-
luma.core.util.
bytes_to_nibbles
(data)[source]¶ Utility function to take a list of bytes (8 bit values) and turn it into a list of nibbles (4 bit values)
Parameters: data (list) – a list of 8 bit values that will be converted Returns: a list of 4 bit values Return type: list New in version 1.16.0.
-
luma.core.util.
from_16_to_8
(data)[source]¶ Utility function to take a list of 16 bit values and turn it into a list of 8 bit values
Parameters: data (list) – list of 16 bit values to convert Returns: a list of 8 bit values Return type: list New in version 1.16.0.
-
luma.core.util.
from_8_to_16
(data)[source]¶ Utility function to take a list of 8 bit values and turn it into a list of signed 16 bit integers
Parameters: data (list) – list of 8 bit values to convert Returns: a list of 16 bit values Return type: list New in version 1.16.0.
-
class
luma.core.util.
observable
(target, observer)[source]¶ Bases:
object
Wraps any container object such that on inserting, updating or deleting, an observer is notified with a payload of the target. All other special name methods are passed through parameters unhindered.
-
luma.core.util.
perf_counter
()[source]¶ time.perf_counter_ns()
in secondsReturns: the value (in fractional seconds) of a performance counter Return type: float New in version 2.4.0.