211 std::string GetName()
217 std::shared_ptr<Texture> GetTexture()
220 void SetTexture(std::shared_ptr<Texture>
tex)
250 std::string
base =
"shaders/waveform-compute.";
252 if(ZeroHoldFlagSet())
271 std::string
base =
"shaders/waveform-compute.";
290 std::string
base =
"shaders/waveform-compute.";
293 if(ZeroHoldFlagSet())
315 std::string
base =
"shaders/waveform-compute.";
334 std::string
base =
"shaders/waveform-compute.";
346 std::shared_ptr<ComputePipeline> GetToneMapPipeline()
349 std::shared_ptr<ComputePipeline> GetIndexSearchPipeline()
352 bool ZeroHoldFlagSet()
354 return m_sourceStream.GetFlags() & Stream::STREAM_DO_NOT_INTERPOLATE;
367 bool ShouldFillUnder()
370 bool ZeroHoldCursorBehaviour()
372 return ZeroHoldFlagSet();
375 bool ShouldMapDurations()
377 return ZeroHoldFlagSet() && !IsDensePacked();
381 bool IsPersistenceEnabled()
384 void SetPersistenceEnabled(
bool b)
390 void SetYButtonPos(
float y)
393 float GetYButtonPos()
399 std::string m_colorRamp;
454 std::unique_ptr<vk::raii::CommandPool> m_utilCmdPool;
455 std::unique_ptr<vk::raii::CommandBuffer> m_utilCmdBuffer;
471 vk::raii::CommandBuffer&
cmdbuf,
472 std::vector<std::shared_ptr<InputDescriptor> >&
channels,
477 size_t GetStreamCount()
482 auto s = GetDisplayedChannel(
i);
484 return s->GetStream();
489 std::shared_ptr<DisplayedChannel> GetDisplayedChannel(
size_t i)
490 {
return std::dynamic_pointer_cast<DisplayedChannel>(
m_inputs[
i]); }
503 void ClearPersistence();
509 void AutofitVertical();
519 void SerializeConfiguration(YAML::Node&
node);
520 virtual YAML::Node SerializeConfiguration(
IDTable&
table)
override;
521 void LoadConfiguration(YAML::Node&
node);
560 void RenderUniformDigitalBusWaveform(std::shared_ptr<DisplayedChannel>
channel,
T*
data,
ImVec2 start,
ImVec2 size);
562 void RenderComplexSignal(
571 std::shared_ptr<DisplayedChannel>
channel,
572 vk::raii::CommandBuffer&
cmdbuf,
573 std::vector<vk::ImageMemoryBarrier>&
barriers);
575 std::shared_ptr<DisplayedChannel>
channel,
576 vk::raii::CommandBuffer&
cmdbuf,
577 std::vector<vk::ImageMemoryBarrier>&
barriers);
579 std::shared_ptr<DisplayedChannel>
channel,
580 vk::raii::CommandBuffer&
cmdbuf,
581 std::vector<vk::ImageMemoryBarrier>&
barriers);
583 std::shared_ptr<DisplayedChannel>
channel,
584 vk::raii::CommandBuffer&
cmdbuf,
585 std::vector<vk::ImageMemoryBarrier>&
barriers);
587 std::shared_ptr<DisplayedChannel>
channel,
588 vk::raii::CommandBuffer&
cmdbuf,
589 std::vector<vk::ImageMemoryBarrier>&
barriers);
590 void RasterizeAnalogOrDigitalWaveform(
591 std::shared_ptr<DisplayedChannel>
channel,
592 vk::raii::CommandBuffer&
cmdbuf,
609 void FilterMenu(std::shared_ptr<DisplayedChannel>
chan);
612 float PixelsToYAxisUnits(
float pix);
613 float YAxisUnitsToPixels(
float volt);
614 float YAxisUnitsToYPosition(
float volt);
615 float YPositionToYAxisUnits(
float y);
660 DRAG_STATE_CHANNEL_LAST,
662 DRAG_STATE_TRIGGER_LEVEL,
663 DRAG_STATE_TRIGGER_SECONDARY_LEVEL,
664 DRAG_STATE_BER_LEVEL,
666 DRAG_STATE_PEAK_MARKER,
667 DRAG_STATE_Y_CURSOR0,
749typedef std::pair<WaveformArea*, size_t> DragDescriptor;
Declaration of TextureManager.
Definition AcceleratorBuffer.h:204
Definition WaveformArea.h:76
Context data for a single channel being displayed within a WaveformArea.
Definition WaveformArea.h:204
std::shared_ptr< ComputePipeline > m_sparseAnalogComputePipeline
Compute pipeline for rendering sparse analog waveforms.
Definition WaveformArea.h:440
size_t GetRasterizedY()
Return the Y axis size of the rasterized waveform.
Definition WaveformArea.h:239
bool UpdateSize(ImVec2 newSize, MainWindow *top)
Handles a change in size of the displayed waveform.
Definition WaveformArea.cpp:164
std::shared_ptr< ComputePipeline > m_histogramComputePipeline
Compute pipeline for rendering histogram waveforms.
Definition WaveformArea.h:437
size_t m_rasterizedX
X axis size of rasterized waveform.
Definition WaveformArea.h:413
Session & m_session
Parent session object.
Definition WaveformArea.h:404
std::shared_ptr< ComputePipeline > m_indexSearchComputePipeline
Compute pipeline for index searching.
Definition WaveformArea.h:449
size_t GetRasterizedX()
Return the X axis size of the rasterized waveform.
Definition WaveformArea.h:233
void PrepareToRasterize(size_t x, size_t y)
Prepares to rasterize the waveform at the specified resolution.
Definition WaveformArea.cpp:318
bool m_persistenceEnabled
Persistence enable flag.
Definition WaveformArea.h:428
__attribute__((noinline)) std
Gets the pipeline for drawing uniform analog waveforms, creating it if necessary.
Definition WaveformArea.h:245
float m_yButtonPos
Y axis position of our button within the view.
Definition WaveformArea.h:452
std::vector< PeakLabel > m_peakLabels
Active labels for peaks associated with the current waveform.
Definition WaveformArea.h:397
size_t m_cachedX
X axis size of the texture as of last UpdateSize() call.
Definition WaveformArea.h:422
std::shared_ptr< ComputePipeline > m_sparseDigitalComputePipeline
Compute pipeline for rendering sparse digital waveforms.
Definition WaveformArea.h:446
std::shared_ptr< ComputePipeline > m_toneMapPipe
Compute pipeline for tone mapping fp32 images to RGBA.
Definition WaveformArea.h:431
std::shared_ptr< ComputePipeline > m_uniformAnalogComputePipeline
Compute pipeline for rendering uniform analog waveforms.
Definition WaveformArea.h:434
AcceleratorBuffer< float > m_rasterizedWaveform
Buffer storing our rasterized waveform, prior to tone mapping.
Definition WaveformArea.h:407
size_t m_cachedY
Y axis size of the texture as of last UpdateSize() call.
Definition WaveformArea.h:425
size_t m_rasterizedY
Y axis size of rasterized waveform.
Definition WaveformArea.h:416
YAML::Node Serialize(IDTable &table) const
Serializes the configuration for this channel.
Definition WaveformArea.cpp:345
AcceleratorBuffer< uint32_t > m_indexBuffer
Buffer for X axis indexes (only used for sparse waveforms)
Definition WaveformArea.h:410
std::shared_ptr< Texture > m_texture
The texture storing our final rendered waveform.
Definition WaveformArea.h:419
std::shared_ptr< ComputePipeline > m_uniformDigitalComputePipeline
Compute pipeline for rendering uniform digital waveforms.
Definition WaveformArea.h:443
Definition WaveformArea.h:64
Category
Category the filter should be displayed under in the GUI.
Definition Filter.h:118
std::vector< std::shared_ptr< InputDescriptor > > m_inputs
Input ports.
Definition FlowGraphNode.h:247
Bidirectional table mapping integer IDs in scopesession files to object pointers.
Definition IDTable.h:49
Definition WaveformArea.h:152
Top level application window.
Definition MainWindow.h:168
Definition ngscopeclient.h:83
A single channel on an oscilloscope.
Definition OscilloscopeChannel.h:49
A Session stores all of the instrument configuration and other state the user has open.
Definition Session.h:126
A sink node is a node in the filter graph that has no outputs.
Definition SinkNode.h:45
Definition WaveformArea.h:111
Descriptor for a single stream coming off a channel.
Definition StreamDescriptor.h:47
A timestamp, measured in seconds + femtoseconds.
Definition Marker.h:42
Abstract base class for oscilloscope / logic analyzer trigger inputs.
Definition Trigger.h:46
A unit of measurement, plus conversion to pretty-printed output.
Definition Unit.h:59
Definition WaveformArea.h:88
bool g_hasShaderInt64
Indicates whether the int64 type is available for use in shaders and SSBOs.
Definition VulkanInit.cpp:171
Definition WaveformArea.h:136
State for a single peak label.
Definition WaveformArea.h:168
int m_peakAlpha
Alpha decay. Decays by a small amount per frame after the peak disappears.
Definition WaveformArea.h:194
float m_labelYpos
Y axis position of the label's centroid.
Definition WaveformArea.h:173
int64_t m_labelXpos
X axis position of the label's centroid.
Definition WaveformArea.h:170
float m_fwhm
Calculated FWHM of the peak.
Definition WaveformArea.h:197
int64_t m_labelXsize
X axis size of the label (for collision detection)
Definition WaveformArea.h:182
int64_t m_peakXpos
X axis position of the peak last refresh.
Definition WaveformArea.h:176
int64_t m_labelYsize
Y axis size of the label (for collision detection)
Definition WaveformArea.h:185
float m_peakYpos
Y axis position of the peak last refresh.
Definition WaveformArea.h:179