Class: EIPSettings

EIPSettings

Provides properties for configuring EtherNet/IP


Members


deviceName :string

The name of the device that will appear in the identity object

Type:
  • string
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • uPDevice
See:

deviceType :number

The type of the device that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0x0000
See:

inputSize :number

The size of the input area in the IO memory map (server-centric)

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0
See:

mmap :string

Gets/sets the xml description of the memory map. When eip.EIP#load is called, this description is used to create an object tree that can be used to directly access the attributes from JavaScript.

This is typically set using AJAX to retrieve an xml memory map file.

Type:
  • string
Since:
  • 1.0 (WAT 1.0)
See:
Example
var $eip = $wat.load('eip')[0];

function initEIP(mmap)
{
   $eip.settings.mmap = mmap;
   // set up the other eip settings here

   if ($eip.load() == false)
   {
      alert("Failed to load EIP memory map");
      return;
   }
}

// called after the page loads, for example in the body onload
function getXML()
{
   xmlhttp = new XMLHttpRequest();
   xmlhttp.open("GET", "eip.xml", true);
   xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState==4) {
         initEIP(xmlhttp.responseText);
      }
   }
   xmlhttp.send("");
}

mmapFile :string

The name of a file in the file system of the uP device (e.g. /wat/mmap.xml) to read the memory map from if mmap is empty when eip.EIP#load is called.

It is often more convenient to use AJAX and mmap to load a memory map.

Type:
  • string
Since:
  • 1.0 (WAT 1.0)
See:

outputSize :number

The size of the output area in the IO memory map (server-centric)

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0
See:

productCode :number

The product code that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0x0001
See:

serialNumber :number

The serial number that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0
See:

vendorId :number

The vendor ID that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0x0032
See:

Events


deviceNameChanged

Indicates that the deviceName property has changed.

Since:
  • 1.8 (WAT 2.4)

deviceTypeChanged

Indicates that the deviceType property has changed.

Since:
  • 1.8 (WAT 2.4)

inputSizeChanged

Indicates that the inputSize property has changed.

Since:
  • 1.8 (WAT 2.4)

mmapChanged

Indicates that the mmap property has changed.

Since:
  • 1.8 (WAT 2.4)

mmapFileChanged

Indicates that the mmapFile property has changed.

Since:
  • 1.8 (WAT 2.4)

outputSizeChanged

Indicates that the outputSize property has changed.

Since:
  • 1.8 (WAT 2.4)

productCodeChanged

Indicates that the productCode property has changed.

Since:
  • 1.8 (WAT 2.4)

serialNumberChanged

Indicates that the serialNumber property has changed.

Since:
  • 1.8 (WAT 2.4)

vendorIdChanged

Indicates that the vendorId property has changed.

Since:
  • 1.8 (WAT 2.4)