Script Modules are independent entities that add new functionality to Packet Tracer similar to External Applications (ExApps). But unlike ExApps, Script Modules run within PT rather than as external processes, and therefore, provide better integration with PT. Also unlike ExApps, Script Modules are developed directly in PT with no external development environment needed. While the basic components of Script Modules are not new -- PT already has had a script engine, web views, and IPC in various internal components for some time, Script Modules simply unite them and provide a generic way to extend PT functionality.
Packet Tracer Architecture
Illustrated above is an architectural view of PT's run-time components showing that Script Modules are running inside the PT process. Script Modules communicate with the PT core the same way that ExApps communicate with PT, using Inter-Process Communication (IPC) calls. The IPC framework in PT has been extended to allow direct object manipulation, using objects in calls, event callbacks, and delegates. Script Modules and ExApps can also talk to each other using the PT messaging mechanism between ExApps.
Script Module Architecture
Each Script Module can be described using the Model-View-Controller architectural pattern.
Each Script Module has its own sandbox, and cannot access or change the sandbox of other Script Modules.
Types of Script Modules
There are two places where Script Modules can exist, and so they are named appropriately.
The following table is a summary of differences between the two types of Script Modules:
|PT Script Module||File Script Module|
||One per pka/pkt file|
|Manage||Add/remove in Extensions->Scripting->Configure PT Script Modules...||Open the pka/pkt file, and go to Extensions->Scripting->Edit File Script Module...|
|Stop||On PT close||On file close|