Triggers¶
The start-condition hierarchy assigned to TaskSpec.trigger, plus
ReferenceTrigger (for pre/post-trigger captures) and RetriggerSpec. See
the Triggers guide for usage.
dtollib.tasks.triggers ¶
Trigger specifications โ full start-trigger hierarchy.
Beyond :class:SoftwareStart, this module provides the other start-trigger
kinds (ExternalDigitalStart, AnalogThresholdStart, SyncBusStart)
plus :class:ReferenceTrigger for pre-/about-trigger acquisition.
:class:RetriggerSpec (triggered-scan retrigger) lives in tasks/spec.py.
Design reference: docs/design.md ยง8.8.
AnalogThresholdStart
dataclass
¶
Bases: TriggerSpec
Analog threshold start (OL_TRG_THRESHPOS / OL_TRG_THRESHNEG).
Acquisition starts when the configured monitor channel's voltage crosses
level in the direction given by slope. Edge.RISING selects
OL_TRG_THRESHPOS; Edge.FALLING selects OL_TRG_THRESHNEG.
Attributes:
| Name | Type | Description |
|---|---|---|
channel |
int
|
Physical channel index to monitor for the threshold crossing. |
level |
float
|
Threshold voltage (volts). |
slope |
Edge
|
|
__post_init__ ¶
Validate the channel index is non-negative.
Source code in src/dtollib/tasks/triggers.py
ExternalDigitalStart
dataclass
¶
Bases: TriggerSpec
External digital edge start (OL_TRG_EXTERN).
Acquisition starts on the configured edge of the board's external trigger input. Use to synchronise capture with an external event (laser shutter, mechanical contact, sibling-board sync line).
ReferenceTrigger
dataclass
¶
Reference-trigger composition โ pre/about-trigger acquisition.
Composes onto a :class:TaskSpec via TaskSpec.reference (not yet
supported).
The source trigger establishes the reference event; the SDK then
collects post_scan_count samples after that event before stopping.
Attributes:
| Name | Type | Description |
|---|---|---|
source |
TriggerSpec
|
The trigger kind that marks the reference event. |
post_scan_count |
int
|
Samples to collect after the reference event. |
__post_init__ ¶
Validate post_scan_count is positive.
Source code in src/dtollib/tasks/triggers.py
SoftwareStart
dataclass
¶
Bases: TriggerSpec
Software-triggered start (OL_TRG_SOFT).
The default trigger for every :class:~dtollib.tasks.TaskSpec. The SDK
accepts the configured task on olDaStart immediately without waiting
for an external edge.
SyncBusStart
dataclass
¶
Bases: TriggerSpec
Sync-bus start (OL_TRG_SYNCBUS).
Acquisition starts on a sync-bus edge โ used to coordinate multiple
boards sharing a common back-plane sync line. Multi-board coordination
via olDaSetSyncMode (not yet supported) builds on top of this
trigger kind.
TriggerSpec ¶
Marker base class for every trigger specification.
Sealed-ish via the kind ClassVar discriminator; concrete subclasses
override. :class:SoftwareStart and the rest of the start-trigger
hierarchy subclass this base.