36#ifndef FlowGraphNode_h
37#define FlowGraphNode_h
63 Severity GetSeverity()
const {
return m_severity; }
64 const std::string& GetTitle()
const {
return m_title; }
65 const std::string& GetMessage()
const {
return m_message; }
71 std::string m_message;
91 std::string GetInputName(
size_t i);
120 {
return (m_parameters.find(
s) != m_parameters.end()); }
124 {
return m_parameters.begin(); }
128 {
return m_parameters.end(); }
132 {
return m_parameters.size(); }
152 enum class ExecutionCapabilities
158 CommandBufferAppend = 1,
161 CommandBufferTailCall = 2,
172 {
return (
uint32_t) ExecutionCapabilities::None; }
177 virtual void Refresh(vk::raii::CommandBuffer& cmdBuf, std::shared_ptr<QueueHandle> queue) =0;
185 {
return not m_messages.empty(); }
189 {
return m_messages; }
226 template<
class T,
class...
Args>
239 const std::set<FlowGraphNode*>& GetSinks(
size_t stream)
247 std::vector< std::shared_ptr<InputDescriptor> >
m_inputs;
254 std::vector< std::set<FlowGraphNode*> >
m_sinks;
261 sigc::signal<
void()> signal_parametersChanged()
264 sigc::signal<
void()> signal_inputsChanged()
271 { m_messages.clear(); }
275 { m_messages.push_back(
msg); }
300 std::vector<FlowGraphNodeMessage> m_messages;
Declaration of FilterParameter.
Declaration of SerializableObject.
Definition AcceleratorBuffer.h:204
A parameter to a filter.
Definition FilterParameter.h:86
A Message to the user from a node in the signal flow graph.
Definition FlowGraphNode.h:59
Abstract base class for a node in the signal flow graph.
Definition FlowGraphNode.h:81
virtual void CreateInput(const std::string &name)
Gets the digital bus waveform attached to the specified input.
std::shared_ptr< InputConstraint > GetInputConstraints(size_t i)
Get the constraints on one of our inputs.
Definition FlowGraphNode.cpp:255
StreamDescriptor GetInput(size_t i)
Gets the descriptor for one of our inputs.
Definition FlowGraphNode.cpp:241
bool HasParameter(std::string s)
Checks if we have a parameter with a given name.
Definition FlowGraphNode.h:119
ParameterMapType::iterator GetParamEnd()
Returns an iterator to the end of our parameter map.
Definition FlowGraphNode.h:127
ParameterMapType::iterator GetParamBegin()
Returns an iterator to the beginning of our parameter map.
Definition FlowGraphNode.h:123
virtual YAML::Node SerializeConfiguration(IDTable &table)
Serializes this trigger's configuration to a YAML string.
Definition FlowGraphNode.cpp:335
virtual uint32_t GetExecutionCapabilitiesMask()
Returns a bitmask of ExecutionCapabilities fields.
Definition FlowGraphNode.h:171
sigc::signal< void()> m_parametersChangedSignal
Signal emitted when the set of parameters changes.
Definition FlowGraphNode.h:294
void AddMessage(Severity severity, const std::string &title, const std::string &message)
Attach a new message to the node.
Definition FlowGraphNode.h:278
size_t GetInputCount()
Get the number of input ports.
Definition FlowGraphNode_inlines.h:72
const std::vector< FlowGraphNodeMessage > & GetMessages() const
Walking through any messages.
Definition FlowGraphNode.h:188
SparseAnalogWaveform * GetSparseAnalogInputWaveform(size_t i)
Gets the analog waveform attached to the specified input.
Definition FlowGraphNode.h:204
size_t GetParamCount()
Returns the number of parameter we have.
Definition FlowGraphNode.h:131
SparseDigitalWaveform * GetSparseDigitalInputWaveform(size_t i)
Gets the digital waveform attached to the specified input.
Definition FlowGraphNode.h:212
std::string GetInputDisplayName(size_t i)
Gets the display name for one of our inputs.
Definition FlowGraphNode.cpp:271
WaveformBase * GetInputWaveform(size_t i)
Gets the waveform attached to the specified input.
Definition FlowGraphNode_inlines.h:51
bool IsDownstreamOf(std::set< FlowGraphNode * > nodes)
Determines if this node is downstream of any of the specified other nodes.
Definition FlowGraphNode.cpp:316
sigc::signal< void()> m_inputsChangedSignal
Signal emitted when the set of inputs changes.
Definition FlowGraphNode.h:297
std::map< std::string, FilterParameter > ParameterMapType
Short name for a map of strings to parameters.
Definition FlowGraphNode.h:110
std::vector< std::shared_ptr< InputDescriptor > > m_inputs
Input ports.
Definition FlowGraphNode.h:247
bool HasInput(StreamDescriptor desc)
Checks if the given stream is connected to at least one of our inputs.
Definition FlowGraphNode.cpp:113
UniformAnalogWaveform * GetUniformAnalogInputWaveform(size_t i)
Gets the analog waveform attached to the specified input.
Definition FlowGraphNode.h:208
void AddErrorMessage(const std::string &err)
Add a new error message.
Definition FlowGraphNode.h:282
void ClearMessages()
Remove any messages left over from the last graph refresh.
Definition FlowGraphNode.h:270
virtual void OnInputChanged(size_t i)
Called when a new input is connected to the node.
Definition FlowGraphNode.cpp:106
void SetInput(size_t i, StreamDescriptor stream, bool force=false)
Connects a stream to the input of this node.
Definition FlowGraphNode.cpp:131
bool HasMessages() const
Checks if this graph has any messages.
Definition FlowGraphNode.h:184
std::vector< std::set< FlowGraphNode * > > m_sinks
The nodes (if any) that each of our streams drives.
Definition FlowGraphNode.h:254
void AddMessage(const FlowGraphNodeMessage &msg)
Attach a new message to the node.
Definition FlowGraphNode.h:274
UniformDigitalWaveform * GetUniformDigitalInputWaveform(size_t i)
Gets the digital waveform attached to the specified input.
Definition FlowGraphNode.h:216
virtual bool ValidateChannel(size_t i, StreamDescriptor stream)
Check if a stream is allowed to be connected to the given input.
Definition FlowGraphNode.cpp:293
void DetachInputs()
Disconnects all inputs from the node without releasing them.
Definition FlowGraphNode.cpp:67
virtual void LoadParameters(const YAML::Node &node, IDTable &table)
Load configuration from a save file.
Definition FlowGraphNode.cpp:368
void AddErrorMessage(const std::string &title, const std::string &err)
Add a new error message with a title.
Definition FlowGraphNode.h:290
Bidirectional table mapping integer IDs in scopesession files to object pointers.
Definition IDTable.h:49
A single channel on an oscilloscope.
Definition OscilloscopeChannel.h:49
Definition SerializableObject.h:40
Descriptor for a single stream coming off a channel.
Definition StreamDescriptor.h:47
Severity
Severity of a logging message.
Definition log.h:61
@ ERROR
Something went very wrong, an operation may be aborted or state may be confused.
Main logging framework header.