Skip to content

Improve driver specific trigger options handling #1019

Description

@diggit

I am working on support for more triggers as part of RigolOscilloscope (#1017). Multiple trigger classes have driver specific properties handling inside them. For example PulseWidthTrigger. In my opinion, this is not scalable approach and all driver specific logic should be in the driver class.

Also PulseWidthTrigger inherits from EdgeTrigger and takes polarity from it's Type. Edge trigger type typically allows rising/falling/any edge, but the option any does not make much sense for PulseWidthTrigger (at least for Rigol).

At this moment, new trigger is set using Oscilloscope::SetTrigger and then pushed to the device using Oscilloscope::PushTrigger.

Solution could be to call new virtual driver function from Oscilloscope::SetTrigger which would update the trigger options (supported edges, supported conditions, etc.) according to driver/device capabilities.

What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions