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

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

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)
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

serialNumber :number

The serial number that will appear in the identity object

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

vendorId :number

The vendor ID that will appear in the identity object

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