PC Connections Data Monitoring Logging and Analyzing Software
Device Monitoring Studio - PC Connections Data Monitoring Logging and Analyzing Software

ISession.addDevice Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
addDevice(deviceName: string, serverName?: string): void;
addDevice(device: { serial: string }, serverName?: string): void;
addDevice(device: { usb: { device?: string; port?: number; address?: number; } }, serverName?: string): void;
addDevice(device: { network: string }, serverName?: string): void;
addDevice(device: { virtual: any }, serverName?: string): void;
addDevice(device: { playback: { path: string; stream?: number; } }, serverName?: string): void;
addDevice(device: { bridge: string | IBridge }, serverName?: string): void;
Remarks

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.

Parameters
deviceName: string
A string which is parsed by each installed data source in turn until the matched device is found.
serverName?: string
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.
device: { serial: string }
A serial device identifier (full name or COM port).
serverName?: string
device: { usb: { device?: string; port?: number; address?: number; } }
An USB device (located either by full device name, port or address, or any combination).
serverName?: string
device: { network: string }
A network device identifier (full adapter name).
serverName?: string
device: { virtual: any }
An object of the following type: {virtual: any} to reference Import Data Source.
serverName?: string
device: { playback: { path: string; stream?: number; } }
An object which references a given log file and optionally a stream in it.
serverName?: string
device: { bridge: string | IBridge }
A serial bridge name or a reference to IBridge interface.
serverName?: string
Examples

Adding devices to the session:

Javascript

  
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");

    

See Also

  • Serial Bridge
  • IBridge
  • IHost
< PreviousTopNext >
Copyright © 2018 HHD Software. All rights reserved.