winIDEA SDK
Loading...
Searching...
No Matches
isys::CTestTrace Class Reference

#include <CTestTrace.h>

Inheritance diagram for isys::CTestTrace:
isys::CTestBase isys::CTestCoverage isys::CTestProfiler

Public Types

enum  EAnalyzerSectionId
 Ids of test specification sections.
enum  ERunMode {
  M_OFF , M_START ,
  M_RESUME
}
 Trace modes. More...

Public Member Functions

virtual void assign (const CTestObjectSPtr &base)
 Assigns members of base to this.
bool containsSection (int section) const
 Returns true, if the specified section exists for this object.
virtual CTestObjectSPtr copy () const
 Creates a deep copy of this object.
virtual CTestBaseSPtr createInstance (const CTestBaseSPtr &parent) const
 CTestTrace (const CTestBaseSPtr &parent)
 Initializes new instance.
std::string getClassName () const
virtual CTestTreeNodeSPtr getContainerTestNode ()
 virtual CTestSpecificationSPtr getContainerTestSpec();
std::string getDocumentFileName ()
 Returns name of the document to contain trace results.
int getEnumTagValue (int section)
 Returns value of enum type.
std::string getExportFileName ()
 Returns the export file name.
std::string getExportFormat ()
 Returns the export format type.
std::string getOpenMode ()
 Returns one of the open mode strings: "r", "w", or "a".
CTestBaseSPtr getParent () const
 Returns parent.
ERunMode getRunMode ()
 Returns run mode.
int getSectionId (const std::string &sectionName)
 Returns section ID for the given section name.
CTestBaseSPtr getTestBase (int section, bool isConst)
CTestBaseListSPtr getTestBaseList (int section, bool isConst)
CTestObject::ETestObjType getTestObjType () const
 Returns type of this object, which is CTestObject::ETestBase.
std::string getTriggerName ()
 Returns the name of the trigger to be used for trace start.
iconnect::ETristate isCloseAfterTest ()
 Returns true, if the document should be closed after test.
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
virtual bool isMerged () const
 Returns true, if the CTestSpecification section containing this object is merged.
iconnect::ETristate isSaveAfterTest ()
 Returns true, if the document should be saved after test.
bool isSectionEmpty (int sectionId)
 Returns true, if the given section is empty.
virtual bool isSerializedAsList (bool isParsing)
 Returns true if object should be serialized as list, for example CTestFunction.
iconnect::ETristate isSlowRun ()
 Returns E_TRUE, if slow run should be used for analyzer.
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
void setCloseAfterTest (iconnect::ETristate isClose)
 Sets close operation for trace document after test.
virtual void setComment (int section, int idx, const std::string &nlComment, const std::string &eolComment)
void setDocumentFileName (const std::string &docFileName)
 Sets the name of the trace document.
void setEnumTagValue (int section, int enumValue)
 Sets value of enum type.
void setExportFileName (const std::string &exportFileName)
 Sets the export file name.
void setExportFormat (const std::string &exportFormat)
 Sets export format for the trace document.
virtual void setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle)
 Sets style of the mapping for complete object.
void setOpenMode (const std::string &openMode)
 Sets open mode for document.
void setParent (CTestBaseSPtr parent)
 Sets parent.
void setRunMode (ERunMode mode)
 Sets run mode.
void setSaveAfterTest (iconnect::ETristate isSave)
 Sets save operation for trace document after test.
void setSlowRun (iconnect::ETristate isSlowRun)
 If parameter is true, then slow run is used for analyzer.
void setTriggerName (const std::string &triggerName)
 Sets name of the trigger to be used for trace start.
virtual std::string toString ()
 Returns object data as YAML string.

Protected Member Functions

 CTestTrace (const CTestBaseSPtr &parent, TagsMap &staticTestSpecTags, SectionTypesMap &sectionTypesMap, DefaultValuesMap &staticDefaultValuesMap, EnumValuesMap &staticEnumValuesMap)
void setStaticTagsAsConst ()
 This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ...

Detailed Description

Deprecated
use CTestAnalyzer and CTestAnalyzerTrace instead.

This class contains specification for trace recording during test execution.

 

Member Enumeration Documentation

◆ ERunMode

Trace modes.

Enumerator
M_OFF 

trace will not be configured or started

M_START 

start trace

M_RESUME 

Deprecated: use open mode 'a' instead, see setOpenMode().

Resumes session, currently supported only for coverage. Method setRunMode(M_RESUME) throws an exception if called on trace or profiler document.

Constructor & Destructor Documentation

◆ CTestTrace() [1/2]

isys::CTestTrace::CTestTrace ( const CTestBaseSPtr & parent,
TagsMap & staticTestSpecTags,
SectionTypesMap & sectionTypesMap,
DefaultValuesMap & staticDefaultValuesMap,
EnumValuesMap & staticEnumValuesMap )
protected
Since
9.12.288

◆ CTestTrace() [2/2]

isys::CTestTrace::CTestTrace ( const CTestBaseSPtr & parent)

Initializes new instance.

Parameters
parentan instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser.
Since
9.12.288

Member Function Documentation

◆ assign()

virtual void isys::CTestBase::assign ( const CTestObjectSPtr & base)
virtualinherited

Assigns members of base to this.

Since
9.12.288

Reimplemented in isys::CTestFunction.

◆ containsSection()

bool isys::CTestBase::containsSection ( int section) const
inherited

Returns true, if the specified section exists for this object.

Since
9.12.288

◆ copy()

virtual CTestObjectSPtr isys::CTestBase::copy ( ) const
virtualinherited

Creates a deep copy of this object.

Parent is set.

Since
9.12.288

◆ createInstance()

virtual CTestBaseSPtr isys::CTestTrace::createInstance ( const CTestBaseSPtr & parent) const
virtual
Since
9.12.288

Implements isys::CTestBase.

Reimplemented in isys::CTestCoverage, and isys::CTestProfiler.

◆ getClassName()

std::string isys::CTestBase::getClassName ( ) const
inherited
Since
9.12.288

◆ getContainerTestNode()

virtual CTestTreeNodeSPtr isys::CTestBase::getContainerTestNode ( )
virtualinherited

virtual CTestSpecificationSPtr getContainerTestSpec();

Since
9.12.288

◆ getDocumentFileName()

std::string isys::CTestTrace::getDocumentFileName ( )

Returns name of the document to contain trace results.

Since
9.12.288

◆ getEnumTagValue()

int isys::CTestBase::getEnumTagValue ( int section)
inherited

Returns value of enum type.

Since
9.12.288

◆ getExportFileName()

std::string isys::CTestTrace::getExportFileName ( )

Returns the export file name.

Since
9.12.288

◆ getExportFormat()

std::string isys::CTestTrace::getExportFormat ( )

Returns the export format type.

See CAnalyzerDocController for possible values.

Since
9.12.288

◆ getOpenMode()

std::string isys::CTestTrace::getOpenMode ( )

Returns one of the open mode strings: "r", "w", or "a".

Since
9.12.288

◆ getParent()

CTestBaseSPtr isys::CTestBase::getParent ( ) const
inherited

Returns parent.

Since
9.12.288

◆ getRunMode()

ERunMode isys::CTestTrace::getRunMode ( )

Returns run mode.

Since
9.12.288

◆ getSectionId()

int isys::CTestBase::getSectionId ( const std::string & sectionName)
inherited

Returns section ID for the given section name.

Since
9.12.288

◆ getTestBase()

CTestBaseSPtr isys::CTestBase::getTestBase ( int section,
bool isConst )
inherited
Since
9.12.288

◆ getTestBaseList()

CTestBaseListSPtr isys::CTestBase::getTestBaseList ( int section,
bool isConst )
inherited
Since
9.12.288

◆ getTestObjType()

CTestObject::ETestObjType isys::CTestBase::getTestObjType ( ) const
inherited

Returns type of this object, which is CTestObject::ETestBase.

Since
9.12.288

◆ getTriggerName()

std::string isys::CTestTrace::getTriggerName ( )

Returns the name of the trigger to be used for trace start.

The trigger should be defined in winIDEA GUI.

Since
9.12.288

◆ isCloseAfterTest()

iconnect::ETristate isys::CTestTrace::isCloseAfterTest ( )

Returns true, if the document should be closed after test.

Since
9.12.288

◆ isEmpty()

virtual bool isys::CTestBase::isEmpty ( ) const
virtualinherited

This method returns true, if the object contains no data.

Since
9.12.288

◆ isMerged()

virtual bool isys::CTestTrace::isMerged ( ) const
virtual

Returns true, if the CTestSpecification section containing this object is merged.


Since
9.12.288

Reimplemented from isys::CTestBase.

Reimplemented in isys::CTestCoverage, and isys::CTestProfiler.

◆ isSaveAfterTest()

iconnect::ETristate isys::CTestTrace::isSaveAfterTest ( )

Returns true, if the document should be saved after test.

Since
9.12.288

◆ isSectionEmpty()

bool isys::CTestBase::isSectionEmpty ( int sectionId)
inherited

Returns true, if the given section is empty.

Since
9.12.288

◆ isSerializedAsList()

virtual bool isys::CTestBase::isSerializedAsList ( bool isParsing)
virtualinherited

Returns true if object should be serialized as list, for example CTestFunction.

Since
9.12.288

Reimplemented in isys::CTestFunction.

◆ isSlowRun()

iconnect::ETristate isys::CTestTrace::isSlowRun ( )

Returns E_TRUE, if slow run should be used for analyzer.

Since
9.12.288

◆ serialize()

virtual void isys::CTestBase::serialize ( const isys::IEmitterSPtr & emitter)
virtualinherited

Sends contents of this class to emitter.

Since
9.12.288

Reimplemented in isys::CLogResult, and isys::CTestEnvironmentConfig.

◆ setCloseAfterTest()

void isys::CTestTrace::setCloseAfterTest ( iconnect::ETristate isClose)

Sets close operation for trace document after test.

Since
9.12.288

◆ setComment()

virtual void isys::CTestBase::setComment ( int section,
int idx,
const std::string & nlComment,
const std::string & eolComment )
virtualinherited
Since
9.12.288

◆ setDocumentFileName()

void isys::CTestTrace::setDocumentFileName ( const std::string & docFileName)

Sets the name of the trace document.

Since
9.12.288

◆ setEnumTagValue()

void isys::CTestBase::setEnumTagValue ( int section,
int enumValue )
inherited

Sets value of enum type.

Since
9.12.288

◆ setExportFileName()

void isys::CTestTrace::setExportFileName ( const std::string & exportFileName)

Sets the export file name.

Since
9.12.288

◆ setExportFormat()

void isys::CTestTrace::setExportFormat ( const std::string & exportFormat)

Sets export format for the trace document.

See CAnalyzerDocController for possible values.

Since
9.12.288

◆ setMainMapStyle()

virtual void isys::CTestBase::setMainMapStyle ( isys::IEmitter::EYamlStyle mappingStyle)
virtualinherited

Sets style of the mapping for complete object.

Since
9.12.288

◆ setOpenMode()

void isys::CTestTrace::setOpenMode ( const std::string & openMode)

Sets open mode for document.

Parameters
openModecan be one of:
  • 'u' opens existing document, and updates its contents
  • 'w' creates new document or overwrites the existing one
  • 'a' opens existing document. Coverage will append its contents on start, while profiler and trace do not support appending yet.
  • empty string, which defaults to 'w'. Note that default values are NOT written to test specification file - that's why they are defaults.
Since
9.12.288

◆ setParent()

void isys::CTestBase::setParent ( CTestBaseSPtr parent)
inherited

Sets parent.

Since
9.12.288

◆ setRunMode()

void isys::CTestTrace::setRunMode ( ERunMode mode)

Sets run mode.

Since
9.12.288

◆ setSaveAfterTest()

void isys::CTestTrace::setSaveAfterTest ( iconnect::ETristate isSave)

Sets save operation for trace document after test.

Since
9.12.288

◆ setSlowRun()

void isys::CTestTrace::setSlowRun ( iconnect::ETristate isSlowRun)

If parameter is true, then slow run is used for analyzer.

Since
9.12.288

◆ setTriggerName()

void isys::CTestTrace::setTriggerName ( const std::string & triggerName)

Sets name of the trigger to be used for trace start.

The trigger must be defined in winIDEA GUI.

Since
9.12.288

◆ toString()

virtual std::string isys::CTestBase::toString ( )
virtualinherited

Returns object data as YAML string.

Since
9.12.288