ngscopeclient 0.1-dev+51fbda87c
|
Abstract base class for a node in the signal flow graph. More...
#include <FlowGraphNode.h>
Public Types | |
enum | DataLocation { LOC_CPU , LOC_GPU , LOC_DONTCARE } |
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. More... | |
size_t | GetInputCount () |
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. More... | |
void | SetInput (const std::string &name, StreamDescriptor stream, bool force=false) |
virtual bool | ValidateChannel (size_t i, StreamDescriptor stream) |
StreamDescriptor | GetInput (size_t i) |
Gets the descriptor for one of our inputs. | |
FilterParameter & | GetParameter (std::string s) |
bool | HasParameter (std::string s) |
Checks if we have a parameter with a given name. More... | |
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. More... | |
virtual void | LoadParameters (const YAML::Node &node, IDTable &table) |
Load configuration from a save file. More... | |
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. More... | |
virtual DataLocation | GetInputLocation () |
Gets the desired location of the nodes's input data. More... | |
virtual void | Refresh () |
Evaluates a filter graph node. More... | |
virtual void | Refresh (vk::raii::CommandBuffer &cmdBuf, std::shared_ptr< QueueHandle > queue) |
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. More... | |
WaveformBase * | GetInputWaveform (size_t i) |
Gets the waveform attached to the specified input. More... | |
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. | |
SparseDigitalBusWaveform * | GetSparseDigitalBusInputWaveform (size_t i) |
Gets the digital bus waveform attached to the specified input. | |
void | CreateInput (const std::string &name) |
Creates and names an input signal. | |
std::string | GetInputDisplayName (size_t i) |
Gets the display name for one of our inputs. More... | |
Protected Attributes | |
std::vector< std::string > | m_signalNames |
Names of signals we take as input. | |
std::vector< StreamDescriptor > | m_inputs |
The channel (if any) connected to each of our inputs. | |
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. | |
Abstract base class for a node in the signal flow graph.
A FlowGraphNode has one or more channel inputs, zero or more configuration parameters.
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.
|
protected |
Gets the display name for one of our inputs.
This includes the stream name iff the input comes from a multi-stream source.
|
virtual |
Gets the desired location of the nodes's input data.
The default implementation returns CPU.
Reimplemented in AddFilter, AverageFilter, BusHeatmapFilter, CouplerDeEmbedFilter, DeEmbedFilter, ExponentialMovingAverageFilter, FFTFilter, FIRFilter, JitterSpectrumFilter, MaximumFilter, MinimumFilter, RISFilter, SpectrogramFilter, SubtractFilter, and UpsampleFilter.
|
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.
|
virtual |
Load configuration from a save file.
Reimplemented in Filter, IBISDriverFilter, and ScalarStairstepFilter.
|
protectedvirtual |
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 |
Evaluates a filter graph node.
This version does not support using Vulkan acceleration and should be considered deprecated. It will be removed in the indefinite future once all filters have been converted to the new API.
Reimplemented in Filter, ImportFilter, ACCoupleFilter, ACRMSMeasurement, ADL5205Decoder, AreaMeasurement, AutocorrelationFilter, BandwidthMeasurement, BaseMeasurement, BurstWidthMeasurement, CANBitmaskFilter, CANDecoder, ClipFilter, ClockRecoveryFilter, CurrentShuntFilter, DCDMeasurement, DDJMeasurement, DDR1Decoder, DDR3Decoder, DeskewFilter, DownconvertFilter, DownsampleFilter, DPAuxChannelDecoder, DPhyDataDecoder, DPhyEscapeModeDecoder, DPhyHSClockRecoveryFilter, DPhySymbolDecoder, DramClockFilter, DramRefreshActivateMeasurement, DramRowColumnLatencyMeasurement, DSIFrameDecoder, DSIPacketDecoder, DutyCycleMeasurement, DVIDecoder, EmphasisFilter, EmphasisRemovalFilter, EnvelopeFilter, ESPIDecoder, Ethernet1000BaseXDecoder, Ethernet100BaseTXDecoder, Ethernet10BaseTDecoder, Ethernet10GBaseRDecoder, Ethernet64b66bDecoder, EthernetAutonegotiationDecoder, EthernetAutonegotiationPageDecoder, EthernetBaseXAutonegotiationDecoder, EthernetGMIIDecoder, EthernetRGMIIDecoder, EthernetRMIIDecoder, EthernetSGMIIDecoder, ExportFilter, EyeBitRateMeasurement, EyeHeightMeasurement, EyeJitterMeasurement, EyePeriodMeasurement, EyeWidthMeasurement, FallMeasurement, FrequencyMeasurement, FSKDecoder, FullWidthHalfMax, GlitchRemovalFilter, GroupDelayFilter, HistogramFilter, HorizontalBathtub, HyperRAMDecoder, I2CDecoder, I2CEepromDecoder, I2CRegisterDecoder, IBISDriverFilter, IBM8b10bDecoder, InvertFilter, IPv4Decoder, IQSquelchFilter, ISIMeasurement, J1939AnalogDecoder, J1939BitmaskDecoder, J1939PDUDecoder, J1939SourceMatchFilter, J1939TransportDecoder, JitterFilter, JtagDecoder, MagnitudeFilter, MDIODecoder, MemoryFilter, MilStd1553Decoder, MovingAverageFilter, MultiplyFilter, NCOFilter, NoiseFilter, OneWireDecoder, OvershootMeasurement, PAM4DemodulatorFilter, ParallelBus, PCIe128b130bDecoder, PCIeDataLinkDecoder, PCIeGen2LogicalDecoder, PCIeGen3LogicalDecoder, PCIeLinkTrainingDecoder, PCIeTransportDecoder, PeakHoldFilter, PeriodMeasurement, PhaseMeasurement, PhaseNonlinearityFilter, PkPkMeasurement, PRBSCheckerFilter, PRBSGeneratorFilter, PulseWidthMeasurement, QSGMIIDecoder, QSPIDecoder, QuadratureDecoder, ReferencePlaneExtensionFilter, RiseMeasurement, RjBUjFilter, RMSMeasurement, SawtoothGeneratorFilter, SDCmdDecoder, SDDataDecoder, SetupHoldMeasurement, SNRFilter, SParameterCascadeFilter, SParameterDeEmbedFilter, SPIDecoder, SPIFlashDecoder, SquelchFilter, StepGeneratorFilter, SWDDecoder, SWDMemAPDecoder, TachometerFilter, TappedDelayLineFilter, TCPDecoder, TDRFilter, ThresholdFilter, TIEMeasurement, TimeOutsideLevelMeasurement, TMDSDecoder, ToneGeneratorFilter, TopMeasurement, TouchstoneImportFilter, TwoPortShuntThroughFilter, UartClockRecoveryFilter, UARTDecoder, UndershootMeasurement, UnwrappedPhaseFilter, USB2ActivityDecoder, USB2PacketDecoder, USB2PCSDecoder, USB2PMADecoder, VectorFrequencyFilter, VectorPhaseFilter, VerticalBathtub, VICPDecoder, WaveformGenerationFilter, WindowedAutocorrelationFilter, and WindowFilter.
|
virtual |
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. |