Class DiagnosticProbe

All Implemented Interfaces:
IProbe, IArchive

public class DiagnosticProbe extends Probe<DiagnosticProbeState>
Simple diagnostic probe for testing the Lattice framework.
Version:
$id:
Author:
Craig McChesney
  • Constructor Details

    • DiagnosticProbe

      public DiagnosticProbe()
      Default constructor for DiagnosticProbe. Creates a new (empty) instance of DiagnosticProbe.
    • DiagnosticProbe

      public DiagnosticProbe(DiagnosticProbe copy)
  • Method Details

    • copy

      public DiagnosticProbe copy()
      Description copied from class: Probe
      Creates a deep copy of the probe
      Specified by:
      copy in class Probe<DiagnosticProbeState>
    • getElementsVisited

      public int getElementsVisited()
      Returns the number of elements traversed by probe.
      Returns:
      number of model elements propagated by probe
      Since:
      Apr 19, 2011
    • setElementsVisited

      public void setElementsVisited(int n)
      Set the element count to the given number.
      Parameters:
      n - new value for the element traversed accumulator
      Since:
      Apr 19, 2011
    • incrementElementsVisited

      public void incrementElementsVisited()
      Increments the number of element traversed by 1.
      Since:
      Apr 19, 2011
    • createTrajectory

      public Trajectory<DiagnosticProbeState> createTrajectory()
      Creates a trajectory of the proper type for saving the probe's history.
      Specified by:
      createTrajectory in class Probe<DiagnosticProbeState>
      Returns:
      a new, empty Trajectory<DiagnosticProbeState> for saving the probe's history.
    • createProbeState

      public DiagnosticProbeState createProbeState()
      Description copied from class: Probe
      Captures the probe's state in a ProbeState of the appropriate species.
      Specified by:
      createProbeState in class Probe<DiagnosticProbeState>
    • createEmptyProbeState

      public DiagnosticProbeState createEmptyProbeState()
      Creates a new, empty DiagnosticProbeState.
      Specified by:
      createEmptyProbeState in class Probe<DiagnosticProbeState>
      Returns:
      a new, empty DiagnosticProbeState
      Since:
      Jul 1, 2014
    • readStateFrom

      protected DiagnosticProbeState readStateFrom(DataAdaptor container) throws DataFormatException
      Description copied from class: Probe
      Read the contents of the supplied DataAdaptor and return an instance of the appropriate Trajectory species.
      Specified by:
      readStateFrom in class Probe<DiagnosticProbeState>
      Parameters:
      container - DataAdaptor to read a Trajectory from
      Returns:
      a ProbeState for the contents of the DataAdaptor
      Throws:
      DataFormatException - error encountered reading the DataAdaptor