cSingleFingerprintCalculator Class Reference

API: cSingleFingerprintCalculator Class Reference
API
cSingleFingerprintCalculator Class Reference
Inheritance diagram for cSingleFingerprintCalculator:
[legend]

Public Member Functions

virtual cSingleFingerprintCalculatordup () const override
virtual std::string str () const override
virtual void initialize (const char *expectedFingerprints, cConfiguration *cfg, int index=-1) override
virtual bool checkFingerprint () const override
Public Member Functions inherited from cFingerprintCalculator
Public Member Functions inherited from cObject
 cObject ()
 cObject (const cObject &other)=default
virtual ~cObject ()
virtual const char * getClassName () const
virtual const char * getName () const
bool isName (const char *s) const
virtual const char * getFullName () const
virtual std::string getFullPath () const
virtual std::string getClassAndFullName () const
virtual std::string getClassAndFullPath () const
const cObjectgetThisPtr () const
virtual std::ostream & printOn (std::ostream &os) const
virtual void parsimPack (cCommBuffer *buffer) const
virtual void parsimUnpack (cCommBuffer *buffer)
virtual cObjectgetOwner () const
virtual bool isOwnedObject () const
virtual bool isSoftOwner () const
virtual void forEachChild (cVisitor *v)
cObjectfindObject (const char *name, bool deep=true)
virtual cClassDescriptorgetDescriptor () const
void copyNotSupported () const

Additional Inherited Members

Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
virtual void drop (cOwnedObject *obj)
void dropAndDelete (cOwnedObject *obj)

Description

This class calculates the "fingerprint" of a simulation.

The fingerprint is a 32-bit hash value calculated from various data of the simulation events and simulation results. The calculator can be configured to consider only certain events, modules, and results using filter expressions.

The available ingredients are:

  • 'e' event number
  • 't' simulation time
  • 'n' message (event) full name
  • 'c' message (event) class name
  • 'k' message kind
  • 'l' message bit length
  • 'o' message control info class name
  • 'g' message control info (uses parsimPack())
  • 'd' message with internals (legacy – uses parsimPack(), includes info from last sending and other technical details; excludes control info)
  • 'b' message contents (uses parsimPack(), excludes info from last sending, other technical details, and also control info)
  • 'i' module id
  • 'm' module full name
  • 'p' module full path
  • 'a' module class name
  • 'r' random numbers drawn
  • 's' scalar results
  • 'z' statistic results
  • 'v' vector results
  • 'y' display strings of all modules, added on refreshDisplay() calls (see cmdenv-fake-gui config option)
  • 'f' essential properties (geometry) of all figures on all module canvases, added on refreshDisplay() calls (see cmdenv-fake-gui config option)
  • 'x' extra data provided by modules

Member Function Documentation

◆ dup()

virtual cSingleFingerprintCalculator * dup ( ) const
inlineoverridevirtual

Should be redefined in subclasses to create an exact copy of this object. The default implementation just throws an error, to indicate that the method was not redefined.

Reimplemented from cObject.

◆ str()

virtual std::string str ( ) const
overridevirtual

Returns a brief, one-line description of the object. The returned string does (should) NOT include the object's name and class. This method is used to display object information at several places in the Qtenv GUI, among others.

Reimplemented from cObject.

◆ initialize()

virtual void initialize ( const char * expectedFingerprints,
cConfiguration * cfg,
int index = -1 )
overridevirtual

Initialization.

Implements cFingerprintCalculator.

◆ checkFingerprint()

virtual bool checkFingerprint ( ) const
overridevirtual

Compares the computed fingerprint with the expected one, and returns true if they match, and false otherwise.

Implements cFingerprintCalculator.