PyANGKernel.GKTrigger

class GKTrigger

A trigger is an expression than evaluates to true or false

Details

The expression is a collection of conditions based on the current state of some network elements

Inheritance diagram of PyANGKernel.GKTrigger

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class GKTriggerEvaluationTime

Evaluation time interval type: eSimulationStep: the trigger is evaluated every simulation step eDetectionInterval: the trigger is evaluated every detection interval, which is defined in the scenario eStatisticalInterval: the trigger is evaluated every statistics interval, which is defined in the scenario

PyANGKernel.GKTrigger.triggerableTypes
__init__()
evaluate(context, exp)
Parameters:
Return type:

bool

Evaluates the trigger. An empty trigger (no conditions) evaluates to true.

getConditions()
Return type:

.list of GKTriggerCondition

returns the expressions to evaluate

getEvaluationTime()
Return type:

GKTriggerEvaluationTime

Returns the time evaluation type

getScript()
Return type:

str

returns the script code to evaluate

prepareEvaluation(model)
Parameters:

modelGKModel

inits the evaluation process before evaluate call

removeConditions(targetId)
Parameters:

targetId – int

removes all conditions that have targetId objects as target

setConditions(newConditions)
Parameters:

newConditions – .list of GKTriggerCondition

sets the expressions to evaluate

setEvaluationTime(value)
Parameters:

valueGKTriggerEvaluationTime

Sets the time evaluation type

setScript(ascript)
Parameters:

ascript – str

sets the script code to evaluate

usesColumn(col)
Parameters:

colGKColumn

Return type:

bool