![]() |
Device Monitoring Studio - PC Connections Data Monitoring Logging and Analyzing Software
ISession.addDevice Method |
![]() |
Adds a specified device to the session. A monitoring session may have several devices but they all must be of the same type.
A first overload uses generic string matching. It cycles through all installed modules and performs exact device name match. Serial module also supports device names of the form "COMx" where x is a number from 1 to 255.
Other overloads allow you to specify which device type you are adding.
Adding devices to the session:
var session = monitoring.createSession();
// Add COM1 serial device to it (use automatic matching):
session.addDevice("COM1");
// Add specific serial device:
session.addDevice({ serial: "Communications Port (COM1)" });
// Add specific USB device:
session.addDevice({ usb: { device: "USB Input Device", port: 4, address: 1 } });
// Add specific network adapter:
session.addDevice({ network: "Realtek PCIe GBE Family Controller(802.3)" });
// Add specific log file:
session.addDevice({ playback: { path: "C:\\temp\\Communications Port (COM1)$140408$1.dmslog7", stream: 0 } });
// Create remote monitoring session for serial port
session.addDevice("COM5", "remote_server_name");