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

IHost Interface

interface IHost {
    // Properties
    ${sessions}: ${ISession}[];

    // Methods
    ${createSession}(deviceName?: string, serverName?: string): ${ISession};
    ${createSession#createSession1}(device?: { serial: string }, serverName?: string): ${ISession};
    ${createSession#createSession2}(device?: { usb: { device?: string; port?: number; address?: number; } }, serverName?: string): ${ISession};
    ${createSession#createSession3}(device?: { network: string }, serverName?: string): ${ISession};
    ${createSession#createSession4}(device?: { virtual: any }, serverName?: string): ${ISession};
    ${createSession#createSession5}(device?: { playback: { path: string; stream?: number; } }, serverName?: string): ${ISession};
    ${createSession#createSession6}(device?: { bridge: string | ${IBridge} }, serverName?: string): ${ISession};
}
// This interface is not available in managed environment
// This interface is not available in native environment

IHost Properties

sessions

sessions: ${ISession}[];
// This property is not available in managed environment
// This property is not available in native environment

Returns the array of session objects.

Obtain a list of monitoring sessions and print their states:

var sessions = monitoring.sessions;
for (var i = 0; i < sessions.length; ++i)
    alert(sessions[i].state);

IHost Methods

createSession

createSession(deviceName?: string, serverName?: string): ${ISession};
// This method is not available in managed environment
// This method is not available in native environment
deviceName
An optional string which is parsed by each installed data source in turn until the matched device is found. If omitted, device may later added using ISession.addDevice method.
serverName
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.

Creates an unconfigured monitoring session. You must finish configuring the monitoring session before starting it with a call to start it. This method may be passed the same arguments as in ISession.addDevice method.

createSession

createSession(device?: { serial: string }, serverName?: string): ${ISession};
// This method is not available in managed environment
// This method is not available in native environment
device
A serial device identifier (full name or COM port).
serverName
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.

Creates an unconfigured monitoring session. You must finish configuring the monitoring session before starting it with a call to start it. This method may be passed the same arguments as in ISession.addDevice method.

createSession

createSession(device?: { usb: { device?: string; port?: number; address?: number; } }, serverName?: string): ${ISession};
// This method is not available in managed environment
// This method is not available in native environment
device
An USB device (located either by full device name, port or address, or any combination).
serverName
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.

Creates an unconfigured monitoring session. You must finish configuring the monitoring session before starting it with a call to start it. This method may be passed the same arguments as in ISession.addDevice method.

createSession

createSession(device?: { network: string }, serverName?: string): ${ISession};
// This method is not available in managed environment
// This method is not available in native environment
device
A network device identifier (full adapter name).
serverName
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.

Creates an unconfigured monitoring session. You must finish configuring the monitoring session before starting it with a call to start it. This method may be passed the same arguments as in ISession.addDevice method.

createSession

createSession(device?: { virtual: any }, serverName?: string): ${ISession};
// This method is not available in managed environment
// This method is not available in native environment
device
An object of the following type: to reference Import Data Source.
serverName
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.

Creates an unconfigured monitoring session. You must finish configuring the monitoring session before starting it with a call to start it. This method may be passed the same arguments as in ISession.addDevice method.

createSession

createSession(device?: { playback: { path: string; stream?: number; } }, serverName?: string): ${ISession};
// This method is not available in managed environment
// This method is not available in native environment
device
An object which references a given log file and optionally a stream in it.
serverName
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.

Creates an unconfigured monitoring session. You must finish configuring the monitoring session before starting it with a call to start it. This method may be passed the same arguments as in ISession.addDevice method.

createSession

createSession(device?: { bridge: string | ${IBridge} }, serverName?: string): ${ISession};
// This method is not available in managed environment
// This method is not available in native environment
device
A serial bridge name or a reference to IBridge interface.
serverName
Optional remote server name. If omitted, or passed empty string or ".", local monitoring session is created.

Creates an unconfigured monitoring session. You must finish configuring the monitoring session before starting it with a call to start it. This method may be passed the same arguments as in ISession.addDevice method.

Create new (unconfigured) monitoring session:

// Create new monitoring session (without adding device):
var session = monitoring.createSession();

// Create new monitoring session and add COM1 serial device to it (use automatic matching):
var session = monitoring.createSession("COM1");

// Create new monitoring session and add specific serial device:
var session = monitoring.createSession({ serial: "Communications Port (COM1)" });

// Create new monitoring session and add specific USB device:
var session = monitoring.createSession({ usb: { device: "USB Input Device", port: 4, address: 1 } });

// Create new monitoring session and add specific network adapter:
var session = monitoring.createSession({ network: "Realtek PCIe GBE Family Controller(802.3)" });

// Create new monitoring session and add specific log file:
var session = monitoring.createSession({ playback: { path: "C:\\temp\\Communications Port (COM1)$140408$1.dmslog8", stream: 0 } });

// Create remote monitoring session for serial port
var session = monitoring.createSession("COM5", "remote_server_name");