class saleae.data.GraphTime(datetime: datetime, millisecond=0, *, microsecond=0, nanosecond=0, picosecond=0)
A high-precision wall clock time.
The primary way to use this type is to subtract two GraphTime
s to produce a GraphTimeDelta
. GraphTimeDelta
s may be freely added and subtracted from each other, and converted to floating point seconds. They can also be added to or subtracted from GraphTime
s to produce a suitable offset GraphTime
.
Constructs a GraphTime
using a datetime
, and optionally sub-millisecond precision values.
The sub-millisecond precision values must be converible to float.
Add a GraphTimeDelta
value to produce a new GraphTime
.
Converts GraphTime
to an ISO 8601 string with picosecond precision.
Timezone is always UTC, using the Z suffix.
Subtract a GraphTime
or GraphTimeDelta
value.
When subtracting a GraphTime
, produces a GraphTimeDelta
.When subtracing a GraphTimeDelta
, produces a GraphTime
.
Produces a datetime
value that is as close as possible to the given value.
The produced datetime
is always timezone aware an in the UTC timezone. Local time can be procured using the standard Python datetime
conversion functions.
class saleae.data.GraphTimeDelta(second=0, millisecond=0, *, microsecond=0, nanosecond=0, picosecond=0)
A high-precision duration.
Constructs a GraphTimeDelta using numerical values.
All values must be convertible to float. Multiple prefixes may be specified, the resulting value will be all the values added together.
Add a GraphTimeDelta
value to produce a new GraphTimeDelta
.
Determine if two GraphTimeDelta
values are equal, up to a tolerance.
Convert to a floating point number of seconds. Note that this can cause a loss of precision for values > 1ms.
Determine if the first GraphTimeDelta
value is greater than or equal to the second, up to a tolerance.
Determine if the first GraphTimeDelta
value is greater than the second, up to a tolerance.
Determine if the first GraphTimeDelta
value is less than or equal to the second, up to a tolerance.
Determine if the first GraphTimeDelta
value is less than the second, up to a tolerance.
Determine if two GraphTimeDelta
values are not equal, up to a tolerance.
Subtract a GraphTimeDelta
value to produce a new GraphTimeDelta
.
class saleae.data.AnalogData(raw_samples: ndarray, voltage_transform_gain: float, voltage_transform_offset: float, start_time: saleae.data.timing.GraphTime, end_time: saleae.data.timing.GraphTime)
Iterates over the samples in this instance as voltage values.
The number of samples contained in this instance.
Allows creating an AnalogData from a subset of this one's samples.
Samples after applying voltage scaling.
class saleae.range_measurements.DigitalMeasurer(requested_measurements: List[str])
Base class for High Level Analyzers. Subclasses must implement the decode()
function
Decode a frame from an input analyzer, and return None or 1 or more AnalyzerFrame
objects.
class saleae.analyzers.AnalyzerFrame(type: str, start_time: saleae.data.timing.GraphTime, end_time: saleae.data.timing.GraphTime, data: dict = None)
A frame produced by an analyzer. The types of frames and the fields in each will depend on the analyzer.
- Variables
- type (str) – Frame type
- start_time (saleae.data.GraphTime) – Start of frame
- end_time (saleae.data.GraphTime) – End of frame
- data (dict) – Key/value data associated with this frame
String setting.
Number setting, with an option min_value/max_value.
Choices setting.