ngscopeclient 0.1-dev+51fbda87c
Public Member Functions | Protected Attributes | List of all members

A mask used for checking eye patterns. More...

#include <EyeMask.h>

Public Member Functions

 EyeMask ()
 Initialize an empty mask.
 
bool Load (std::string path)
 
bool Load (const YAML::Node &node)
 Loads the mask from a YAML node. More...
 
std::string GetFileName () const
 Get the filename of the mask.
 
std::string GetMaskName () const
 Get the display name of the eye pattern mask.
 
float GetAllowedHitRate () const
 Get the allowed mask hit rate. More...
 
void RenderForAnalysis (EyeWaveform *waveform, float xscale, float xoff, float yscale, float yoff, float height) const
 Renders the mask to an offscreen buffer we can use for hit testing.
 
float CalculateHitRate (EyeWaveform *cap, size_t width, size_t height, float fullscalerange, float xscale, float xoff)
 Checks a raw eye pattern dataset against the mask.
 
bool empty () const
 Return true if there are no polygons in the mask.
 
bool IsTimebaseRelative ()
 Returns true if the timebase is in relative units (UI) and false if absolute (time)
 
const std::vector< EyeMaskPolygon > & GetPolygons () const
 Return the set of polygons in the mask.
 
size_t GetWidth ()
 Get the rendered width of the mask.
 
size_t GetHeight ()
 Get the rendered height of the mask.
 
void GetPixels (std::vector< uint8_t > &pixels)
 Get the raw image data as RGBA32. More...
 

Protected Attributes

std::string m_fname
 Filename of the mask.
 
std::vector< EyeMaskPolygonm_polygons
 Set of polygons in the mask.
 
float m_hitrate
 Most recent hit rate.
 
bool m_timebaseIsRelative
 true = time measured in UIs || false = time measured in ps
 
std::string m_maskname
 Human readable name of the mask (e.g. "XFI")
 
std::unique_ptr< canvas_ity::canvas > m_canvas
 Canvas for rasterizing the mask.
 
size_t m_width
 Current width.
 
size_t m_height
 Current height.
 

Detailed Description

A mask used for checking eye patterns.

Member Function Documentation

◆ GetAllowedHitRate()

float EyeMask::GetAllowedHitRate ( ) const
inline

Get the allowed mask hit rate.

Most standards do not allow any mask hits, however some standards do permit a small hit ratio

◆ GetPixels()

void EyeMask::GetPixels ( std::vector< uint8_t > &  pixels)
inline

Get the raw image data as RGBA32.

Parameters
pixelsEmpty std::vector to be filled with image data

◆ Load()

bool EyeMask::Load ( const YAML::Node &  node)

Loads the mask from a YAML node.

Parameters
nodeRoot node of the YAML document
Returns
True on success, false on failure

The documentation for this class was generated from the following files: