Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
Simulation holds the traffic details like PDUs, ports, etc. More...
Public Member Functions | |
int | getFrameInstanceCount () |
Returns the number of FrameInstances at present in the simulation. More... | |
FrameInstance | getFrameInstanceAt (int) |
Returns the FrameInstance at the specified index in the simulation event list. More... | |
int | getCurrentFrameInstanceIndex () |
Returns index of "current" frame instance. More... | |
void | resetSimulation () |
Resets simulation and fires the event. More... | |
void | forwardStarted () |
This event is emitted when simulation playback is started. More... | |
void | forwardEnded () |
This event is emitted when simulation playback is stopped. More... | |
void | newFrameInstanceAdded (TrafficType, int) |
This event is emitted when a new frame instance is added. More... | |
void | simulationReset () |
This event is emitted when the simulation is reset. More... | |
void | simulationBufferFull () |
IPC event. More... | |
void | simulationModeChanged () |
This event is emitted when the Realtime or Simulation Mode is changed. More... | |
bool | isSimulationMode () |
Returns true if in Simulation Mode, otherwise false. More... | |
FrameInstance | createFrameInstance (Device, TrafficType, int, QString) |
Create FrameInstance to be sent from a device. More... | |
FrameInstance | createFrameInstanceCustomType (Device, QString, int, QString) |
Create FrameInstance to be sent from a device with a custom traffic type. More... | |
void | finalizeFrameInstance (FrameInstance) |
Finalize frame instance. More... | |
SimulationTimer | createTimer (int, bool) |
Create Simulation Timer. More... | |
uuid | createTimerUuid (int, bool) |
Create Simulation Timer and return the uuid of the timer object. More... | |
SimulationTimer | getIpcTimer (uuid) |
Get Simulation Timer based on uuid. More... | |
long | getCurrentSimTime () |
Get Current Simulation Time. More... | |
void | setSimulationMode (bool) |
Sets the mode to simulation mode. More... | |
void | forward () |
Forwards the simulation by 1 step. More... | |
void | backward () |
Backs the simulation by 1 step. More... | |
Simulation holds the traffic details like PDUs, ports, etc.
void Simulation::backward | ( | ) |
Backs the simulation by 1 step.
FrameInstance Simulation::createFrameInstance | ( | Device | , |
TrafficType | , | ||
int | , | ||
QString | |||
) |
Create FrameInstance to be sent from a device.
ownerDevice,the | device for which the frame instance is created |
trafficType,the | type of traffic for the frame instance, see documentation for newFrameInstanceAdded event |
color,rbg | color code for the frame |
dstStr,destination | ip address in string format |
FrameInstance Simulation::createFrameInstanceCustomType | ( | Device | , |
QString | , | ||
int | , | ||
QString | |||
) |
Create FrameInstance to be sent from a device with a custom traffic type.
ownerDevice,the | device for which the frame instance is created |
customTrafficType,the | type of traffic for the frame instance, see documentation for newFrameInstanceAdded event |
color,rbg | color code for the frame |
dstStr,destination | ip address in string format |
SimulationTimer Simulation::createTimer | ( | int | , |
bool | |||
) |
Create Simulation Timer.
delay,delay | time before timer expires |
bAddRandom,true | to set the timer to expire at random time and false to not including the random factor |
uuid Simulation::createTimerUuid | ( | int | , |
bool | |||
) |
Create Simulation Timer and return the uuid of the timer object.
delay,delay | time before timer expires |
bAddRandom,true | to set the timer to expire at random time and false to not including the random factor |
void Simulation::finalizeFrameInstance | ( | FrameInstance | ) |
Finalize frame instance.
frameInstance,FrameInstance | object |
void Simulation::forward | ( | ) |
Forwards the simulation by 1 step.
void Simulation::forwardEnded | ( | ) |
This event is emitted when simulation playback is stopped.
IPC event.
void Simulation::forwardStarted | ( | ) |
This event is emitted when simulation playback is started.
IPC event.
int Simulation::getCurrentFrameInstanceIndex | ( | ) |
Returns index of "current" frame instance.
long Simulation::getCurrentSimTime | ( | ) |
Get Current Simulation Time.
FrameInstance Simulation::getFrameInstanceAt | ( | int | ) |
Returns the FrameInstance at the specified index in the simulation event list.
nodeIndex,the | index of FrameInstance of interest. |
int Simulation::getFrameInstanceCount | ( | ) |
Returns the number of FrameInstances at present in the simulation.
SimulationTimer Simulation::getIpcTimer | ( | uuid | ) |
Get Simulation Timer based on uuid.
uuid,uuid | of the timer |
bool Simulation::isSimulationMode | ( | ) |
Returns true if in Simulation Mode, otherwise false.
void Simulation::newFrameInstanceAdded | ( | TrafficType | , |
int | |||
) |
This event is emitted when a new frame instance is added.
IPC event.
void Simulation::resetSimulation | ( | ) |
Resets simulation and fires the event.
void Simulation::setSimulationMode | ( | bool | ) |
Sets the mode to simulation mode.
void Simulation::simulationBufferFull | ( | ) |
IPC event.
void Simulation::simulationModeChanged | ( | ) |
This event is emitted when the Realtime or Simulation Mode is changed.
IPC event.
void Simulation::simulationReset | ( | ) |
This event is emitted when the simulation is reset.
IPC event.