Device Monitoring Studio - Monitor, log and analyze data coming through PC ports and connections
Download Device Monitoring Studio Hide this button

Scripting

Device Monitoring Studio's scripting module exposes programming interfaces for a number of application internal objects. The current implementation exposes interfaces for the following objects:

Future releases of the Device Monitoring Studio (Serial, USB, Network Sniffer) will extend the list of scriptable objects.

Scripting System Changes

Version 8.03 adds HID Manager Object.

Version 8.02 updates the scripting support:

Script Debugger
Script debugger provides step-by-step execution, breakpoints, evaluation of variables and viewing of stack trace.
File Manager Object
File Manager Object provides access to a file system.
Network Manager Object
Network Manager Object encapsulates TCP session, UDP session and TCP Listener objects.
Reworked Serial Terminal
Serial Terminal Object has been updated with breaking changes.
Reworked MODBUS Scripting API
MODBUS Send Object has been removed and new MODBUS Builder Object has been introduced.

Version 7.81 updates the scripting support:

Updated TypeScript
TypeScript has been updated to version 2.3.
JavaScript ES2017 support
The included compiler now supports JavaScript ES2017, including async/await.
Network Manager Object (breaking change)
TCP Manager Object has been renamed to Network Manager Object.
UDP session
Added support for UDP Session.
delay function
A new global function delay has been added.

Version 7.70 updates the scripting support:

TypeScript support
TypeScript is now always enabled.
JavaScript ES6 support
JavaScript ES6 is now supported by default.
JavaScript typed arrays are now used in API
Various API functions and events have been updated to use typed arrays.
Better performance
Scripting system has increased performance.

Scripting support in version 7.13 has changed significantly. This section lists all changes and also marks breaking changes:

Scripting language support (breaking change)
Only JavaScript is supported. Support for other scripting languages (like VBScript) has been discontinued.
Naming convention (breaking change)
New method naming scheme: camelCase.
New event system (breaking change)
Device Monitoring Studio does not use Automation-compatible event system anymore. Instead, user script may directly bind JavaScript functions as event handlers. This simplifies event binding and consuming.
Simplification of many methods (breaking change)
Many MODBUS and Serial Terminal methods were simplified. For example, methods that took a variable number of arguments now receive a single JavaScript array argument.
Updated Scripting Site object (breaking change)
Several methods of Scripting Site object have been updated and a few new ones added.
New built-in object: Monitoring
New monitoring object provides methods to create, configure and manage monitoring sessions.
(Optional) support for TypeScript
User scripts may now be written in TypeScript (superset of JavaScript) for better syntax and strong type-checking. If supported by user operating system, user scripts are always checked against a TypeScript interface definition providing better error reporting and syntax checking. TypeScript compiles to plain JavaScript which is then executed.

Scripting in User Interface

Scripting Tool Window has been removed in Device Monitoring Studio 7.13. Now user scripts are opened in their own client windows inside application frame.