Serial Port Monitor - Software Serial Port sniffer, logger & protocol analyzer for Windows
Download Device Monitoring Studio Hide this button

IBridgeHost Interface

This interface consists of methods and properties supported by the Bridge Manager Object.

This interface is exposed by the global object bridge.

Declaration

interface IBridgeHost {
    // Properties
    ${bridges}: ${IBridge}[];

    // Methods
    ${create}(firstDevice: string,
        secondDevice: string,
        firstDeviceConfig?: ${IDeviceConfig},
        secondDeviceConfig?: ${IDeviceConfig}): ${IBridge};
    ${saveConfiguration}(name?: string): boolean;
    ${loadConfiguration}(name?: string): boolean;
}
// This interface is not available in managed environment
// This interface is not available in native environment

IBridgeHost Properties

bridges

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

Returns the array of all created serial bridges.

IBridgeHost Methods

create

create(firstDevice: string,
    secondDevice: string,
    firstDeviceConfig?: ${IDeviceConfig},
    secondDeviceConfig?: ${IDeviceConfig}): ${IBridge};
// This method is not available in managed environment
// This method is not available in native environment
firstDevice
First serial device name.
secondDevice
Second serial device name.
firstDeviceConfig
First serial device configuration object. If omitted, system default is used.
secondDeviceConfig
Second serial device configuration object. If omitted, bridge will use the same configuration for both devices.

Returns created serial bridge object.

Creates new serial bridge.

Create new serial bridge:

// Create bridge between COM1 and COM2 with baud rate 115200, 8 byte size and hardware flow control
// All other parameters are taken from COM1's defaults
var b = bridge.create("COM1", "COM2", { 
    baudRate: 115200, 
    dataBits: 8, 
    flowControl: flowControl.hardware 
});

saveConfiguration

saveConfiguration(name?: string): boolean;
// This method is not available in managed environment
// This method is not available in native environment
name
Optional configuration name. If omitted or passed empty string, saves default configuration. Default configuration is automatically loaded on Device Monitoring Studio startup.

Returns true if configuration has been successfully saved, false otherwise.

Saves current serial bridge configuration.

loadConfiguration

loadConfiguration(name?: string): boolean;
// This method is not available in managed environment
// This method is not available in native environment
name
Optional configuration name. If omitted or passed empty string, loads default configuration.

Returns true if configuration has been successfully loaded, false otherwise.

Loads serial bridge configuration.