DigitalData

A segment of digital signal data.

Represents a contiguous range of digital samples, providing iteration over signal edges. Each edge is a (time, is_high) tuple where

time is a SaleaeTime and is_high is True when the signal

transitions to a high state.

DigitalData cannot be constructed from Python — instances are provided

by the runtime when processing captured data.

for time, is_high in digital_data:
    if is_high:
        print(f"Rising edge at {time}")

Attributes

NameTypeDescription
start_timeSaleaeTimeThe start of the time range covered by this data segment.
end_timeSaleaeTimeThe end of the time range covered by this data segment.
time_slicesliceA slice(start_time, end_time) covering this data segment.

Methods

slice_samples(s: slice) -> DigitalData

Return a sub-range of this digital data.

The slice uses sample indices (integers), not times. Step is not supported.

s
A slice specifying the sample range.
Returns
A new DigitalData covering the sliced range.
AI/LLM users: see llms-extensions.txt for machine-readable documentation.