Object: Device

A Device entry is used to define a connection to another machine and port. Each Device can transfer messages in both directions. The function GetDevices returns an array of this object type.

Properties

All these properties are read only.

Name Type Description
Name String Gets the Device name
Id Integer Gets the Device Id
Config String Gets the config string for the Device
Type String Gets the Device type

Example

Print out all device IOs is the project

// Get all device
var devices = GetDevices();

// Go through each device and log properties
for(var i=0; i<devices.length; i++) { 
    var device = devices[i];
    LogDebug("Device Name = " + device.Name);
    LogDebug("Device Id = " + device.Id);
    LogDebug("Device Config = " + device.Config);
    LogDebug("Device Type = " + device.Type);
}