This interface consists of methods and properties supported by the Bridge Manager Object.
This interface is exposed by the global object bridge
.
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
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.
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
secondDevice
firstDeviceConfig
secondDeviceConfig
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(name?: string): boolean;
// This method is not available in managed environment
// This method is not available in native environment
name
Returns true
if configuration has been successfully saved, false
otherwise.
Saves current serial bridge configuration.
loadConfiguration(name?: string): boolean;
// This method is not available in managed environment
// This method is not available in native environment
name
Returns true
if configuration has been successfully loaded, false
otherwise.
Loads serial bridge configuration.