107 virtual std::string GetTriggerDisplayName() =0;
112 static void EnumTriggers(std::vector<std::string>& names);
125#define TRIGGER_INITPROC(T) \
126 static Trigger* CreateInstance(Oscilloscope* scope) \
127 { return new T(scope); } \
128 virtual std::string GetTriggerDisplayName() override \
129 { return GetTriggerName(); }
131#define AddTriggerClass(T) Trigger::DoAddTriggerClass(T::GetTriggerName(), T::CreateInstance)
Declaration of FlowGraphNode.
A parameter to a filter.
Definition: FilterParameter.h:86
void SetFloatVal(float f)
Sets the parameter to a floating point value.
Definition: FilterParameter.cpp:323
float GetFloatVal() const
Returns the value of the parameter interpreted as a floating point number.
Definition: FilterParameter.h:125
Abstract base class for a node in the signal flow graph.
Definition: FlowGraphNode.h:54
Bidirectional table mapping integer IDs in scopesession files to object pointers.
Definition: IDTable.h:49
Generic representation of an oscilloscope, logic analyzer, or spectrum analyzer.
Definition: Oscilloscope.h:50
Abstract base class for oscilloscope / logic analyzer trigger inputs.
Definition: Trigger.h:46
static void EnumTriggers(std::vector< std::string > &names)
Gets a list of all registered trigger types.
Definition: Trigger.cpp:84
virtual YAML::Node SerializeConfiguration(IDTable &table) override
Serializes this trigger's configuration to a YAML string.
Definition: Trigger.cpp:110
static Trigger * CreateTrigger(std::string name, Oscilloscope *scope)
Creates a new trigger for an oscilloscope.
Definition: Trigger.cpp:98
Oscilloscope * m_scope
The scope this trigger is part of.
Definition: Trigger.h:101
static void DoAddTriggerClass(std::string name, CreateProcType proc)
Register a new trigger class for dynamic creation.
Definition: Trigger.cpp:74
static CreateMapType m_createprocs
Map of trigger type names to factory methods.
Definition: Trigger.h:122
Condition
Conditions for triggers that perform logical comparisons of values.
Definition: Trigger.h:69
@ CONDITION_NOT_BETWEEN
Match when value is not between two targets.
Definition: Trigger.h:92
@ CONDITION_GREATER_OR_EQUAL
Match when value is greater than or equal to target.
Definition: Trigger.h:86
@ CONDITION_GREATER
Match when value is greater than target.
Definition: Trigger.h:83
@ CONDITION_LESS
Match when value is less than target.
Definition: Trigger.h:77
@ CONDITION_BETWEEN
Match when value is greater than one target but less than another.
Definition: Trigger.h:89
@ CONDITION_NOT_EQUAL
Match when value is not equal to target.
Definition: Trigger.h:74
@ CONDITION_ANY
Always match.
Definition: Trigger.h:95
@ CONDITION_LESS_OR_EQUAL
Match when value is less than or equal to target.
Definition: Trigger.h:80
@ CONDITION_EQUAL
Match when value is equal to target.
Definition: Trigger.h:71
FilterParameter & m_level
"Trigger level" parameter
Definition: Trigger.h:104
std::map< std::string, CreateProcType > CreateMapType
Helper typedef for m_createprocs.
Definition: Trigger.h:119
Oscilloscope * GetScope()
Gets the scope this trigger is attached to.
Definition: Trigger.h:64
void SetLevel(float level)
Sets the trigger level.
Definition: Trigger.h:60
Trigger(Oscilloscope *scope)
Initialize a new trigger.
Definition: Trigger.cpp:51
float GetLevel()
Get the trigger level.
Definition: Trigger.h:52