|
Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
An object in the Physical Workspace. More...
Public Member Functions | |
| void | pauseTime () |
| Pauses the environment time. More... | |
| void | resumeTime () |
| Resumes the environment time. More... | |
| bool | isTimeRunning () |
| Returns true if the environment time is running, false if paused. More... | |
| int | getTimeInSeconds () |
| Returns the current environment runtime, in seconds. The value loops, so after 24 hours it resets to 0. More... | |
| void | setTimeInSeconds (int) |
| Sets the current environment time to the given time, in seconds. Time loops every 24 hours. More... | |
| float | getTimeMultiplier () |
| Multiplier used when calculating how much environment time passes each step, in seconds. More... | |
| void | setTimeMultiplier (float) |
| Sets the multiplier used when calculating how much environment time passes each step, in seconds. More... | |
| int | getKeyframeCount () |
| How many key frames are in the environment. More... | |
| EnvironmentKeyframe | getKeyframeAt (int) |
| How Returns a keyframe at a specified index. More... | |
| EnvironmentKeyframe | addKeyframe (int) |
| Adds a keyframe at the specified time and returns the new keyframe. More... | |
| bool | hasKeyframeAtTime (int) |
| Returns if there is a keyframe at the given time. More... | |
| int | getKeyframeIndexAtTime (int) |
| Returns the index of a keyframe at the given time if one exists. More... | |
| EnvironmentKeyframe | getStagingKeyframe () |
| Returns the staging keyframe. More... | |
| int | addKeyframeFromStaging () |
| Adds a keyframe from staging. More... | |
| void | removeKeyframe (int) |
| Removes the keyframe at the given index if the keyframe exists and isn't the start or end. More... | |
| int | getEnvironmentOptionsCount () |
| EnvironmentOptions | getEnvironment (QString) |
| Returns the options for a specified environment value type, like "CO" for carbon monoxide. More... | |
| vector< QString > | getEnvironmentKeys () |
| Returns a list of all the environment value types. More... | |
| float | getEnvironmentValue (QString) |
| Returns the value for the specified environment property. More... | |
| QString | getUnit (QString) |
| Returns the unit used for the specified environment property. More... | |
| QString | getValueWithUnit (QString) |
| Returns a string combining the specified environment property and the display unit is uses. More... | |
| float | getMetricValue (QString) |
| Returns the metric value for the given environment value. More... | |
| void | setCurrentKeyTime (int) |
| void | setNextKeyTime (int) |
| void | setEditMode (bool) |
| bool | isEditMode () |
| Returns true if the environment editor window is in Edit mode. More... | |
| void | exportToFile () |
| Starts the process for saving the environment window values to an xml file. More... | |
| void | importFromFile () |
| Starts the save process for importing the environment window values from an xml file. More... | |
| void | setAllActive (QString, bool) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets them active/inactive. More... | |
| void | setKeyframeActive (int, QString, bool) |
| Sets the specified keyframe to active and the environment value in it to be active. More... | |
| void | setAllShow (QString, bool) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for show. More... | |
| void | setAllTransference (QString, float) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for transference. More... | |
| void | setAllInterpolate (QString, bool) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for interpolate. More... | |
| void | setAllMin (QString, float) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for min value allowed. More... | |
| void | setAllMax (QString, float) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for max value allowed. More... | |
| void | setAllMinRate (QString, float) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for min rate allowed. More... | |
| void | setAllMaxRate (QString, float) |
| Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for max rate allowed. More... | |
| void | setManualAdjustment (QString, float) |
| Sets the manual adjustment property of the given environment value type. More... | |
| float | getCumulativeContribution (QString, QString) |
| Retrives the cumulative contribution for a device and environment value type. More... | |
| void | setContribution (QString, QString, double, double, bool) |
| Sets the rate, limit and if it is cumulative properties for the environment value for the specified device. More... | |
| void | removeCumulativeContribution (QString, QString) |
| Removes the cumulative contribution for the environment value and device pair. More... | |
| void | setThingTransferenceMultiplier (QString, QString, float) |
| Sets the thing transference multipler the environment value and device pair. More... | |
| float | getTotalContributions (QString) |
| Retrives the total contribution for all environment entries of the given environment value type. More... | |
| int | getSimTimeSetting () |
| Retrives second value of the "Simulation Time Scale:". More... | |
| int | getRealTimeSetting () |
| Retrives first value of the "Simulation Time Scale:". More... | |
| int | getSimTimeCombo () |
| int | getRealTimeCombo () |
| void | setSimTimeSetting (int) |
| void | setRealTimeSetting (int) |
| void | setSimTimeCombo (int) |
| void | setRealTimeCombo (int) |
| bool | isUsingMetric () |
| Returns if the environment is using the metric system or imperial. More... | |
| QString | getNotes () |
| void | setNotes (QString) |
| bool | isShowNotes () |
| Returns if notes are set to show in the environment advanced options window. More... | |
| void | setShowNotes (bool) |
| Sets the environment window property for whether notes should be shown in the advanced window. More... | |
| bool | isEditingLocked () |
| Returns if the environment editing window has been locked by interace locking option. More... | |
| void | addCustomEnvironment (QString, QString, QString, QString, QString, QString, QString, QString) |
| Adds a custom environment value type to the environment. More... | |
| void | removeCustomEnvironment (QString) |
| Removes a custom environment value type from the environment. This is only for custom properties, not for included properties like "CO2". More... | |
| bool | isCustomEnvironment (QString) |
| Returns true if the environment value is a custom environment value. More... | |
| int | getNextKeyTime () |
| Debugging tool for getting the next keyframe time. More... | |
| int | getCurrentKeyTime () |
| Debugging tool for getting the current keyframe time. More... | |
| int | getElapsedTime (int) |
| Returns the time difference between the given time and the current environment time, in seconds. More... | |
| int | getKeyframeTemplateCount () |
| Returns how many default keyframe categores there are in the "Defaults:" section of the environment window when setting up advanced keyframes. More... | |
| QString | getKeyframeTemplateAt (int) |
| Returns the default keyframe template name at the given index. More... | |
| void | importKeyframeTemplate (QString) |
| Starts importing a default keyframe template. More... | |
| Environment | parentEnvironment () |
| Returns the parent environment. More... | |
| void | setGraphEnvironment (QString) |
| QString | getGraphEnvironment () |
| float | getVolume () |
| Returns the total volume of the object that contains the environment. More... | |
| QString | getChangesAsJSON () |
| Returns change information as JSON data. More... | |
| QString | getKeyframeDataAsJSON (QString) |
| Returns keyframes with the given environment value as JSON data. More... | |
| bool | removeEnvironmentKeyframe (QString, int) |
| Removes the environment keyframe at the given time if it has the given environment variable type and it isn't the start or end keyframe. More... | |
An object in the Physical Workspace.
Environment Dialog.
| void Environment::addCustomEnvironment | ( | QString | , |
| QString | , | ||
| QString | , | ||
| QString | , | ||
| QString | , | ||
| QString | , | ||
| QString | , | ||
| QString | |||
| ) |
Adds a custom environment value type to the environment.
| categoryId,category | to add the value to, like "Radiation" or "Other". |
| category,category | to add, make it the same as categoryId. |
| id,name | of the environment value. Like "Sweetness" |
| name,name | to display in the editor window for the environment value. |
| metricUnit,metric | unit to display when display the value is in metric units. |
| imperialUnit,imperial | unit to display when value is in imperial units. |
| imperialFormula,conversion | formula to convert from |
| EnvironmentKeyframe Environment::addKeyframe | ( | int | ) |
Adds a keyframe at the specified time and returns the new keyframe.
| time,the | time to add the keyframe at, in seconds. Time loops every 24 hours so the valid range is [0, 86400). |
| int Environment::addKeyframeFromStaging | ( | ) |
Adds a keyframe from staging.
| void Environment::exportToFile | ( | ) |
Starts the process for saving the environment window values to an xml file.
| QString Environment::getChangesAsJSON | ( | ) |
Returns change information as JSON data.
| float Environment::getCumulativeContribution | ( | QString | , |
| QString | |||
| ) |
Retrives the cumulative contribution for a device and environment value type.
| env,name | of the environment to read the value for. |
| devName,device | to find the environment value for. |
| int Environment::getCurrentKeyTime | ( | ) |
Debugging tool for getting the current keyframe time.
| int Environment::getElapsedTime | ( | int | ) |
Returns the time difference between the given time and the current environment time, in seconds.
| lastTime,time | to subtract from the current time to find the difference. |
| EnvironmentOptions Environment::getEnvironment | ( | QString | ) |
Returns the options for a specified environment value type, like "CO" for carbon monoxide.
| env,name | of the environment value to retrive, like "CO". |
| vector< QString > Environment::getEnvironmentKeys | ( | ) |
Returns a list of all the environment value types.
| int Environment::getEnvironmentOptionsCount | ( | ) |
\Returns how many environment value types there are. Categories are not included in the count, just the contents of all combined.
| float Environment::getEnvironmentValue | ( | QString | ) |
Returns the value for the specified environment property.
| env,name | of the environment value to retrive, like "CO". |
| QString Environment::getGraphEnvironment | ( | ) |
| EnvironmentKeyframe Environment::getKeyframeAt | ( | int | ) |
How Returns a keyframe at a specified index.
| index,the | keyframe to retrive. Range of [0, getKeyframeCount()). |
| int Environment::getKeyframeCount | ( | ) |
How many key frames are in the environment.
| QString Environment::getKeyframeDataAsJSON | ( | QString | ) |
Returns keyframes with the given environment value as JSON data.
| envID,the | environment variable type to get the information for. |
| int Environment::getKeyframeIndexAtTime | ( | int | ) |
Returns the index of a keyframe at the given time if one exists.
| time,time | in seconds to retrive the keyframe index for. Time loops every 24 hours so the valid range is [0, 86400). |
| QString Environment::getKeyframeTemplateAt | ( | int | ) |
Returns the default keyframe template name at the given index.
| index,index | of the template to retrive. Range (0, getKeyFrameTemplateCount()) |
| int Environment::getKeyframeTemplateCount | ( | ) |
Returns how many default keyframe categores there are in the "Defaults:" section of the environment window when setting up advanced keyframes.
| float Environment::getMetricValue | ( | QString | ) |
Returns the metric value for the given environment value.
| env,name | of the environment value to retrive, like "CO". |
| int Environment::getNextKeyTime | ( | ) |
Debugging tool for getting the next keyframe time.
| QString Environment::getNotes | ( | ) |
| int Environment::getRealTimeCombo | ( | ) |
| int Environment::getRealTimeSetting | ( | ) |
Retrives first value of the "Simulation Time Scale:".
| int Environment::getSimTimeCombo | ( | ) |
| int Environment::getSimTimeSetting | ( | ) |
Retrives second value of the "Simulation Time Scale:".
| EnvironmentKeyframe Environment::getStagingKeyframe | ( | ) |
Returns the staging keyframe.
| int Environment::getTimeInSeconds | ( | ) |
Returns the current environment runtime, in seconds. The value loops, so after 24 hours it resets to 0.
| float Environment::getTimeMultiplier | ( | ) |
Multiplier used when calculating how much environment time passes each step, in seconds.
| float Environment::getTotalContributions | ( | QString | ) |
Retrives the total contribution for all environment entries of the given environment value type.
| env,name | of the environment to read the value for. |
| QString Environment::getUnit | ( | QString | ) |
Returns the unit used for the specified environment property.
| env,name | of the environment value to retrive, like "CO". |
| QString Environment::getValueWithUnit | ( | QString | ) |
Returns a string combining the specified environment property and the display unit is uses.
| env,name | of the environment value to retrive, like "CO". |
| float Environment::getVolume | ( | ) |
Returns the total volume of the object that contains the environment.
| bool Environment::hasKeyframeAtTime | ( | int | ) |
Returns if there is a keyframe at the given time.
| time,time | in seconds to retrive the keyframe for. Time loops every 24 hours so the valid range is [0, 86400). |
| void Environment::importFromFile | ( | ) |
Starts the save process for importing the environment window values from an xml file.
| void Environment::importKeyframeTemplate | ( | QString | ) |
Starts importing a default keyframe template.
| file,the | name of the template to import. Like "Blank.xml". |
| bool Environment::isCustomEnvironment | ( | QString | ) |
Returns true if the environment value is a custom environment value.
| bool Environment::isEditingLocked | ( | ) |
Returns if the environment editing window has been locked by interace locking option.
| bool Environment::isEditMode | ( | ) |
Returns true if the environment editor window is in Edit mode.
| bool Environment::isShowNotes | ( | ) |
Returns if notes are set to show in the environment advanced options window.
| bool Environment::isTimeRunning | ( | ) |
Returns true if the environment time is running, false if paused.
| bool Environment::isUsingMetric | ( | ) |
Returns if the environment is using the metric system or imperial.
| Environment Environment::parentEnvironment | ( | ) |
Returns the parent environment.
| void Environment::pauseTime | ( | ) |
Pauses the environment time.
| void Environment::removeCumulativeContribution | ( | QString | , |
| QString | |||
| ) |
Removes the cumulative contribution for the environment value and device pair.
| env,name | of the environment value to remove for. |
| devName,device | to remove for. |
| void Environment::removeCustomEnvironment | ( | QString | ) |
Removes a custom environment value type from the environment. This is only for custom properties, not for included properties like "CO2".
| env,name | of the environment value. Like "Sweetness" |
| bool Environment::removeEnvironmentKeyframe | ( | QString | , |
| int | |||
| ) |
Removes the environment keyframe at the given time if it has the given environment variable type and it isn't the start or end keyframe.
| envID,the | environment variable type that must be in the specified keyframe time for it to be removed. |
| time,the | environment time of the keyframe to remove. |
| void Environment::removeKeyframe | ( | int | ) |
Removes the keyframe at the given index if the keyframe exists and isn't the start or end.
| index,index | of the keyframe to remove. Range of (1, getKeyframeCount()-1). |
| void Environment::resumeTime | ( | ) |
Resumes the environment time.
| void Environment::setAllActive | ( | QString | , |
| bool | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets them active/inactive.
| envId,name | of the environment to check keyframes for. |
| bOn,true | if keyframes containing the value should be activated, false if deactivated. |
| void Environment::setAllInterpolate | ( | QString | , |
| bool | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for interpolate.
| envId,name | of the environment to check keyframes for. |
| bOn,true | to use interpolation, false to not. |
| void Environment::setAllMax | ( | QString | , |
| float | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for max value allowed.
| envId,name | of the environment to check keyframes for. |
| value,max | value allowed by the environment value. |
| void Environment::setAllMaxRate | ( | QString | , |
| float | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for max rate allowed.
| envId,name | of the environment to check keyframes for. |
| value,max | rate value used by the environment value. |
| void Environment::setAllMin | ( | QString | , |
| float | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for min value allowed.
| envId,name | of the environment to check keyframes for. |
| value,min | value allowed by the environment value. |
| void Environment::setAllMinRate | ( | QString | , |
| float | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for min rate allowed.
| envId,name | of the environment to check keyframes for. |
| value,min | rate value used by the environment value. |
| void Environment::setAllShow | ( | QString | , |
| bool | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for show.
| envId,name | of the environment to check keyframes for. |
| bOn,true | if keyframes containing the value and the value should be shown, false if not shown. |
| void Environment::setAllTransference | ( | QString | , |
| float | |||
| ) |
Goes through all keyframes and staging keyframes and looks for keyframes with the given environment value type and sets the stored value for transference.
| envId,name | of the environment to check keyframes for. |
| value,transference | to use. |
| void Environment::setContribution | ( | QString | , |
| QString | , | ||
| double | , | ||
| double | , | ||
| bool | |||
| ) |
Sets the rate, limit and if it is cumulative properties for the environment value for the specified device.
| env,name | of the environment value to set the values for. |
| devName,device | to set for. |
| rate,rate | to use. If 0 it wipes out all the values and doesn't set any of the values passed. |
| limit,limit | to use. |
| bCumulative,true | if it should be set to cumulative, false if not. |
| void Environment::setCurrentKeyTime | ( | int | ) |
| void Environment::setEditMode | ( | bool | ) |
| void Environment::setGraphEnvironment | ( | QString | ) |
| void Environment::setKeyframeActive | ( | int | , |
| QString | , | ||
| bool | |||
| ) |
Sets the specified keyframe to active and the environment value in it to be active.
| currentKeyframeIndex,index | of the keyframe to set. |
| envId,name | of the environment to set for in the keyframe. |
| bOn,true | if keyframes containing the value should be activated, false if deactivated. |
| void Environment::setManualAdjustment | ( | QString | , |
| float | |||
| ) |
Sets the manual adjustment property of the given environment value type.
| env,the | name of the environment value type to set the property for. Like "CO2". |
| value,value | to set the env property value with. |
| void Environment::setNextKeyTime | ( | int | ) |
| void Environment::setNotes | ( | QString | ) |
| void Environment::setRealTimeCombo | ( | int | ) |
| void Environment::setRealTimeSetting | ( | int | ) |
| void Environment::setShowNotes | ( | bool | ) |
Sets the environment window property for whether notes should be shown in the advanced window.
| b,true | to set notes to show when advanced options are viewied, false if they should be hidden. |
| void Environment::setSimTimeCombo | ( | int | ) |
| void Environment::setSimTimeSetting | ( | int | ) |
| void Environment::setThingTransferenceMultiplier | ( | QString | , |
| QString | , | ||
| float | |||
| ) |
Sets the thing transference multipler the environment value and device pair.
| env,name | of the environment value to remove for. |
| devName,device | to remove for. |
| multiplier,multiplier | to store. |
| void Environment::setTimeInSeconds | ( | int | ) |
Sets the current environment time to the given time, in seconds. Time loops every 24 hours.
| seconds,the | number of seconds to set the current environment time to. Time loops every 24 hours so the valid range is [0, 86400). |
| void Environment::setTimeMultiplier | ( | float | ) |
Sets the multiplier used when calculating how much environment time passes each step, in seconds.
| x,the | number of seconds to set the step multipler as. |