Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
AssessmentModelScriptInterface Class Reference

This class handles the Assessment Model Script Interface. More...

Public Member Functions

QString getAssessmentItemValue (QString, QString)
 Returns the value of the assessment item for the specified network at the given node. More...
 
vector< QString > peakAssessmentItemID (QString, QString)
 Returns the list of child assessment node IDs for the specified network at the given node. More...
 
bool setAssessmentItemFeedback (QString, QString)
 Sets the assessment item feedback string. More...
 
bool refreshAssessmentItemsView ()
 Updates the Assessment Item tree view in the Activity Results page. More...
 
void setUseCache (bool)
 Enables or Disable the TreeNodes to be cached. More...
 

Detailed Description

This class handles the Assessment Model Script Interface.

Member Function Documentation

◆ getAssessmentItemValue()

QString AssessmentModelScriptInterface::getAssessmentItemValue ( QString  ,
QString   
)

Returns the value of the assessment item for the specified network at the given node.

Parameters
networkType,wherethe following are valid network types: user, answer, initial, lastAssessed, assessed.
idpath,thepath to the assessment item node. For example, Network:PC0:Default Gateway.
Returns
QString, the value of the assessment item for the specified network.

◆ peakAssessmentItemID()

vector< QString > AssessmentModelScriptInterface::peakAssessmentItemID ( QString  ,
QString   
)

Returns the list of child assessment node IDs for the specified network at the given node.

Parameters
networkType,wherethe following are valid network types: user, answer, initial, lastAssessed, assessed.
idpath,thepath to the assessment item node. For example, Network:PC0.
Returns
vector<QString>, the list of child assessment node IDs for the specified network at the given node.

◆ refreshAssessmentItemsView()

bool AssessmentModelScriptInterface::refreshAssessmentItemsView ( )

Updates the Assessment Item tree view in the Activity Results page.

Remarks
The Activity Results page must be displayed. Refreshing the display is required.
Returns
bool, true if the Assessment Items view was refreshed successfully, otherwise false.

◆ setAssessmentItemFeedback()

bool AssessmentModelScriptInterface::setAssessmentItemFeedback ( QString  ,
QString   
)

Sets the assessment item feedback string.

Remarks
Affects the Check Results display only. It does not change it in the model. The Activity Results page must be displayed. Refreshing the display is required.
Returns
bool, true if the assessment item feedback was set successfully, otherwise false.

◆ setUseCache()

void AssessmentModelScriptInterface::setUseCache ( bool  )

Enables or Disable the TreeNodes to be cached.

Remarks
The activity comparator tree is a huge tree in larger networks, and performance may degrade. If you do not require the latest values from the tree, you can enable the cache that will get it from the latest creation of the tree. It is best to enable the cache for a set of calls and disable it after. Disabling the cache will clear the cache. Use it in the order of: 1. enable the cache, 2. get values, 3. disable the cache
Parameters
cache,iftrue the Tree Nodes will be cached, false and they won't.

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