-
Notifications
You must be signed in to change notification settings - Fork 125
Description
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?