ngscopeclient 0.1-dev+51fbda87c
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CDR8B10BTrigger Class Reference

A hardware 8B/10B pattern trigger. More...

#include <CDR8B10BTrigger.h>

Inheritance diagram for CDR8B10BTrigger:
Inheritance graph
[legend]
Collaboration diagram for CDR8B10BTrigger:
Collaboration graph
[legend]

Public Types

enum  PatternMode { PATTERN_SEQUENCE , PATTERN_LIST }
 Type of pattern to look for. More...
 
enum  MatchMode { MATCH_INCLUDE , MATCH_EXCLUDE }
 Trigger on matched or unmatched data. More...
 
- Public Types inherited from CDRTrigger
enum  LeCroyEqualizerMode { LECROY_EQ_NONE , LECROY_EQ_LOW , LECROY_EQ_MEDIUM , LECROY_EQ_HIGH }
 RX equalizer settings for LeCroy SDA 8Zi GTX trigger board. More...
 
enum  TriggerPosition { POSITION_END , POSITION_START }
 Where to position the reported trigger point, relative to the serial bit pattern. More...
 
enum  Polarity { POLARITY_NORMAL , POLARITY_INVERTED }
 Polarity inversion for the input. More...
 
- Public Types inherited from Trigger
enum  Condition {
  CONDITION_EQUAL , CONDITION_NOT_EQUAL , CONDITION_LESS , CONDITION_LESS_OR_EQUAL ,
  CONDITION_GREATER , CONDITION_GREATER_OR_EQUAL , CONDITION_BETWEEN , CONDITION_NOT_BETWEEN ,
  CONDITION_ANY
}
 Conditions for triggers that perform logical comparisons of values. More...
 
typedef Trigger *(* CreateProcType) (Oscilloscope *)
 
- Public Types inherited from FlowGraphNode
enum  DataLocation { LOC_CPU , LOC_GPU , LOC_DONTCARE }
 
typedef std::map< std::string, FilterParameterParameterMapType
 Short name for a map of strings to parameters.
 

Public Member Functions

 CDR8B10BTrigger (Oscilloscope *scope)
 Create a new 8B/10B trigger. More...
 
 TRIGGER_INITPROC (CDR8B10BTrigger)
 
void SetMatchMode (MatchMode mode)
 Sets whether to trigger on pattern match or pattern not found. More...
 
MatchMode GetMatchMode ()
 Get the match mode.
 
void SetPatternMode (PatternMode mode)
 Sets the type of pattern to look for. More...
 
PatternMode GetPatternMode ()
 Gets the type of pattern being searched for.
 
void SetSymbolCount (size_t count)
 Sets the length of the serial pattern, or size of the set of symbols to match. More...
 
size_t GetSymbolCount ()
 Gets the length of the serial pattern or size of the symbol set.
 
std::vector< T8B10BSymbolGetPattern ()
 Gets the pattern or list of symbols to match.
 
void SetPattern (const std::vector< T8B10BSymbol > &pattern)
 Sets the pattern or list of symbols to match. More...
 
- Public Member Functions inherited from CDRTrigger
 CDRTrigger (Oscilloscope *scope)
 Creates a new CDR trigger. More...
 
virtual bool ValidateChannel (size_t i, StreamDescriptor stream)
 
void SetBitRate (int64_t rate)
 Sets the nominal baud rate the PLL should attempt to lock to. More...
 
int64_t GetBitRate ()
 Returns the nominal CDR PLL data rate.
 
void CalculateBitRate ()
 Automatically calculates the bit rate of the incoming signal, if possible.
 
sigc::signal< void()> signal_calculateBitRate ()
 Signal emitted every time autobaud is requested.
 
bool IsAutomaticBitRateCalculationAvailable ()
 Checks if automatic bit rate calculation is available. More...
 
bool IsCDRLocked ()
 Queries hardware PLL lock status. More...
 
const std::string GetBitRateName ()
 Gets the name of the bit rate parameter.
 
TriggerPosition GetTriggerPosition ()
 Gets the position of the trigger, relative to the serial bit pattern.
 
void SetTriggerPosition (TriggerPosition p)
 Sets the position of the trigger, relative to the serial bit pattern. More...
 
LeCroyEqualizerMode GetEqualizerMode ()
 Gets the RX equalizer mode. More...
 
void SetEqualizerMode (LeCroyEqualizerMode mode)
 Sets the RX equalizer mode. More...
 
Polarity GetPolarity ()
 Gets the polarity inversion.
 
void SetPolarity (Polarity mode)
 Gets the polarity inversion. More...
 
- Public Member Functions inherited from Trigger
 Trigger (Oscilloscope *scope)
 Initialize a new trigger. More...
 
float GetLevel ()
 Get the trigger level.
 
void SetLevel (float level)
 Sets the trigger level. More...
 
OscilloscopeGetScope ()
 Gets the scope this trigger is attached to.
 
virtual std::string GetTriggerDisplayName ()=0
 
virtual YAML::Node SerializeConfiguration (IDTable &table) override
 Serializes this trigger's configuration to a YAML string. More...
 
- Public Member Functions inherited from FlowGraphNode
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.
 
FilterParameterGetParameter (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 ()
 

Static Public Member Functions

static std::string GetTriggerName ()
 
- Static Public Member Functions inherited from Trigger
static void DoAddTriggerClass (std::string name, CreateProcType proc)
 Register a new trigger class for dynamic creation. More...
 
static void EnumTriggers (std::vector< std::string > &names)
 Gets a list of all registered trigger types. More...
 
static TriggerCreateTrigger (std::string name, Oscilloscope *scope)
 Creates a new trigger for an oscilloscope. More...
 

Protected Member Functions

void OnLengthChanged ()
 Handles a change to the pattern length by creating/destroying symbol fields.
 
void OnModeChanged ()
 Handles a change to the match mode by changing the max allowed pattern length. More...
 
- Protected Member Functions inherited from FlowGraphNode
virtual void OnInputChanged (size_t i)
 Called when a new input is connected to the node. More...
 
WaveformBaseGetInputWaveform (size_t i)
 Gets the waveform attached to the specified input. More...
 
SparseAnalogWaveformGetSparseAnalogInputWaveform (size_t i)
 Gets the analog waveform attached to the specified input.
 
UniformAnalogWaveformGetUniformAnalogInputWaveform (size_t i)
 Gets the analog waveform attached to the specified input.
 
SparseDigitalWaveformGetSparseDigitalInputWaveform (size_t i)
 Gets the digital waveform attached to the specified input.
 
UniformDigitalWaveformGetUniformDigitalInputWaveform (size_t i)
 Gets the digital waveform attached to the specified input.
 
SparseDigitalBusWaveformGetSparseDigitalBusInputWaveform (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::string m_patternModeName
 Name of the "pattern mode" parameter.
 
std::string m_patternName
 Name of the "pattern" parameter.
 
std::string m_patternLengthName
 Name of the "pattern length" parameter.
 
std::string m_matchModeName
 Name of the "mode" parameter.
 
- Protected Attributes inherited from CDRTrigger
std::string m_bitRateName
 Name of the bit rate parameter.
 
std::string m_positionName
 Name of the trigger position parameter.
 
std::string m_lecroyEqName
 Name of the equalizer mode parameter.
 
std::string m_polarityName
 Name of the polarity inversion parameter.
 
sigc::signal< void()> m_calculateBitRateSignal
 Signal requesting an auto-baud calculation.
 
- Protected Attributes inherited from Trigger
Oscilloscopem_scope
 The scope this trigger is part of.
 
FilterParameterm_level
 "Trigger level" parameter
 
- Protected Attributes inherited from FlowGraphNode
std::vector< std::string > m_signalNames
 Names of signals we take as input.
 
std::vector< StreamDescriptorm_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.
 

Additional Inherited Members

- Protected Types inherited from Trigger
typedef std::map< std::string, CreateProcType > CreateMapType
 Helper typedef for m_createprocs.
 
- Static Protected Attributes inherited from Trigger
static CreateMapType m_createprocs
 Map of trigger type names to factory methods.
 

Detailed Description

A hardware 8B/10B pattern trigger.

Member Enumeration Documentation

◆ MatchMode

Trigger on matched or unmatched data.

Enumerator
MATCH_INCLUDE 

Trigger on a match.

MATCH_EXCLUDE 

Trigger if no match found.

◆ PatternMode

Type of pattern to look for.

Enumerator
PATTERN_SEQUENCE 

Match a sequence of consecutive symbols.

PATTERN_LIST 

Match any of several symbols in a list.

Constructor & Destructor Documentation

◆ CDR8B10BTrigger()

CDR8B10BTrigger::CDR8B10BTrigger ( Oscilloscope scope)

Create a new 8B/10B trigger.

Parameters
scopeThe scope to create the trigger for

Member Function Documentation

◆ OnModeChanged()

void CDR8B10BTrigger::OnModeChanged ( )
protected

Handles a change to the match mode by changing the max allowed pattern length.

Currently only implemented for Teledyne LeCroy SDA 8Zi GTX trigger board

◆ SetMatchMode()

void CDR8B10BTrigger::SetMatchMode ( MatchMode  mode)
inline

Sets whether to trigger on pattern match or pattern not found.

Parameters
modeMatch mode

◆ SetPattern()

void CDR8B10BTrigger::SetPattern ( const std::vector< T8B10BSymbol > &  pattern)
inline

Sets the pattern or list of symbols to match.

Parameters
patternVector of 8B/10B symbols to use as the pattern

◆ SetPatternMode()

void CDR8B10BTrigger::SetPatternMode ( PatternMode  mode)
inline

Sets the type of pattern to look for.

Parameters
modePattern mode

◆ SetSymbolCount()

void CDR8B10BTrigger::SetSymbolCount ( size_t  count)
inline

Sets the length of the serial pattern, or size of the set of symbols to match.

Parameters
countLength of the pattern

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