|
ngscopeclient v0.2.2
|
Abstract base class for a node in the signal flow graph. More...
#include <FlowGraphNode.h>


Public Types | |
| enum class | ExecutionCapabilities { None = 0 , CommandBufferAppend = 1 , CommandBufferTailCall = 2 , VulkanOnly = 4 , DynamicShader = 8 } |
| typedef std::map< std::string, FilterParameter > | ParameterMapType |
| Short name for a map of strings to parameters. | |
Public Member Functions | |
| void | DetachInputs () |
| Disconnects all inputs from the node without releasing them. | |
| size_t | GetInputCount () |
| Get the number of input ports. | |
| std::string | GetInputName (size_t i) |
| void | SetInput (size_t i, StreamDescriptor stream, bool force=false) |
| Connects a stream to the input of this node. | |
| void | SetInput (const std::string &name, StreamDescriptor stream, bool force=false) |
| virtual bool | ValidateChannel (size_t i, StreamDescriptor stream) |
| Check if a stream is allowed to be connected to the given input. | |
| bool | HasInput (StreamDescriptor desc) |
| Checks if the given stream is connected to at least one of our inputs. | |
| StreamDescriptor | GetInput (size_t i) |
| Gets the descriptor for one of our inputs. | |
| std::shared_ptr< InputConstraint > | GetInputConstraints (size_t i) |
| Get the constraints on one of our inputs. | |
| FilterParameter & | GetParameter (std::string s) |
| bool | HasParameter (std::string s) |
| Checks if we have a parameter with a given name. | |
| ParameterMapType::iterator | GetParamBegin () |
| Returns an iterator to the beginning of our parameter map. | |
| ParameterMapType::iterator | GetParamEnd () |
| Returns an iterator to the end of our parameter map. | |
| size_t | GetParamCount () |
| Returns the number of parameter we have. | |
| virtual YAML::Node | SerializeConfiguration (IDTable &table) |
| Serializes this trigger's configuration to a YAML string. | |
| virtual void | LoadParameters (const YAML::Node &node, IDTable &table) |
| Load configuration from a save file. | |
| virtual void | LoadInputs (const YAML::Node &node, IDTable &table) |
| bool | IsDownstreamOf (std::set< FlowGraphNode * > nodes) |
| Determines if this node is downstream of any of the specified other nodes. | |
| virtual uint32_t | GetExecutionCapabilitiesMask () |
| Returns a bitmask of ExecutionCapabilities fields. | |
| virtual void | Refresh (vk::raii::CommandBuffer &cmdBuf, std::shared_ptr< QueueHandle > queue)=0 |
| bool | HasMessages () const |
| Checks if this graph has any messages. | |
| const std::vector< FlowGraphNodeMessage > & | GetMessages () const |
| Walking through any messages. | |
| const FlowGraphNodeMessage * | GetMostSevereMessage () const |
| void | AddSink (size_t stream, FlowGraphNode *node) |
| void | RemoveSink (size_t stream, FlowGraphNode *node) |
| const std::set< FlowGraphNode * > & | GetSinks (size_t stream) |
| sigc::signal< void()> | signal_parametersChanged () |
| sigc::signal< void()> | signal_inputsChanged () |
Protected Member Functions | |
| virtual void | OnInputChanged (size_t i) |
| Called when a new input is connected to the node. | |
| WaveformBase * | GetInputWaveform (size_t i) |
| Gets the waveform attached to the specified input. | |
| SparseAnalogWaveform * | GetSparseAnalogInputWaveform (size_t i) |
| Gets the analog waveform attached to the specified input. | |
| UniformAnalogWaveform * | GetUniformAnalogInputWaveform (size_t i) |
| Gets the analog waveform attached to the specified input. | |
| SparseDigitalWaveform * | GetSparseDigitalInputWaveform (size_t i) |
| Gets the digital waveform attached to the specified input. | |
| UniformDigitalWaveform * | GetUniformDigitalInputWaveform (size_t i) |
| Gets the digital waveform attached to the specified input. | |
| virtual void | CreateInput (const std::string &name) |
| Gets the digital bus waveform attached to the specified input. | |
| template<class T , class... Args> | |
| void | CreateInput (const std::string &name, Args &&... args) |
| std::string | GetInputDisplayName (size_t i) |
| Gets the display name for one of our inputs. | |
| void | ClearMessages () |
| Remove any messages left over from the last graph refresh. | |
| void | AddMessage (const FlowGraphNodeMessage &msg) |
| Attach a new message to the node. | |
| void | AddMessage (Severity severity, const std::string &title, const std::string &message) |
| Attach a new message to the node. | |
| void | AddErrorMessage (const std::string &err) |
| Add a new error message. | |
| void | AddErrorMessage (const std::string &title, const std::string &err) |
| Add a new error message with a title. | |
Protected Attributes | |
| std::vector< std::shared_ptr< InputDescriptor > > | m_inputs |
| Input ports. | |
| std::vector< std::set< FlowGraphNode * > > | m_sinks |
| The nodes (if any) that each of our streams drives. | |
| ParameterMapType | m_parameters |
| sigc::signal< void()> | m_parametersChangedSignal |
| Signal emitted when the set of parameters changes. | |
| sigc::signal< void()> | m_inputsChangedSignal |
| Signal emitted when the set of inputs changes. | |
| std::vector< FlowGraphNodeMessage > | m_messages |
Abstract base class for a node in the signal flow graph.
A FlowGraphNode has one or more channel inputs, zero or more configuration parameters.
|
inlineprotected |
Add a new error message with a title.
The title replaces any previous title, if set
Gets the digital bus waveform attached to the specified input.
Reimplemented in MeasurementsDialog, and WaveformArea.
| void FlowGraphNode::DetachInputs | ( | ) |
Disconnects all inputs from the node without releasing them.
This function is intended for use in Oscilloscope::~Oscilloscope() only. Using it carelessly is likely to lead to memory leaks.
Returns a bitmask of ExecutionCapabilities fields.
Reimplemented in ConstellationFilter, CouplerDeEmbedFilter, EmphasisFilter, Ethernet100BaseT1Decoder, FFTFilter, IQDemuxFilter, JitterSpectrumFilter, PAMEdgeDetectorFilter, SubtractFilter, UpsampleFilter, and Waterfall.
Gets the display name for one of our inputs.
This includes the stream name iff the input comes from a multi-stream source.
|
inlineprotected |
Gets the waveform attached to the specified input.
This function is safe to call on a NULL input and will return NULL in that case.
This function is safe to call on a null input and will return null in that case.
| i | Input index |
|
inline |
Checks if we have a parameter with a given name.
| s | Name of the parameter |
| bool FlowGraphNode::IsDownstreamOf | ( | std::set< FlowGraphNode * > | nodes | ) |
Determines if this node is downstream of any of the specified other nodes.
Returns true if any of this node's inputs, or their inputs, etc. eventually chain back to an element in the set.
Load configuration from a save file.
Reimplemented in Filter, PausableFilter, IBISDriverFilter, and ScalarStairstepFilter.
Called when a new input is connected to the node.
The default implementation does nothing, but some special cases may find this hook useful.
For example, instrument channels may make hardware changes as soon as a new input is connected.
Reimplemented in BufferedSwitchMatrixInputChannel, BufferedSwitchMatrixIOChannel, and BufferedSwitchMatrixOutputChannel.
|
virtual |
Serializes this trigger's configuration to a YAML string.
Reimplemented in Filter, Trigger, and WaveformArea.
| void FlowGraphNode::SetInput | ( | size_t | i, |
| StreamDescriptor | stream, | ||
| bool | force = false |
||
| ) |
Connects a stream to the input of this node.
| i | Index of the input port to connect |
| stream | Input data stream |
| force | Forcibly connect this stream without checking to make sure it's the right type. Should only be set true by by Filter::LoadInputs() or in similar specialized situations. |
|
virtual |
Check if a stream is allowed to be connected to the given input.
Reimplemented in CDRTrigger, SParameterFilter, BERTInputChannel, BERTOutputChannel, BufferedSwitchMatrixInputChannel, BufferedSwitchMatrixIOChannel, BufferedSwitchMatrixOutputChannel, DCAEdgeTrigger, DropoutTrigger, EdgeTrigger, FunctionGeneratorChannel, ImportFilter, LineTrigger, LoadChannel, NthEdgeBurstTrigger, PowerSupplyChannel, RFSignalGeneratorChannel, RSRTB2kRiseTimeTrigger, RSRTB2kRuntTrigger, RSRTB2kTimeoutTrigger, RSRTB2kVideoTrigger, RSRTB2kWidthTrigger, RuntTrigger, SlewRateTrigger, SpectrometerDarkFrameChannel, UartTrigger, WindowTrigger, and TouchstoneExportFilter.
|
protected |
The nodes (if any) that each of our streams drives.
m_sinks[i] is the set of sinks for output stream i