Class: CIPMap

CIPMap

Class for accessing classes defined in particular section of the memory map definition (e.g. eip.EIP#cip). All classes from the definition that are named and have one or more instances defined will be accessible as a property with the same name as the class.


Example
// The CIP section of the EIP memory map is:
// <cip>
//  <cipclass name="Test" number="100" instances="2" type="TestClass" />
// </cip>
console.debug("The first CIP test instance", $eip.cip.Test.instances[0]);

Members


<readonly> className :cip.CIPClass

Gets the class with name [className] that is part of this map. Each class that is a member of this map will be accessible via a property named after it.

Type:
Since:
  • 1.0 (WAT 1.0)

Methods


getClass(c)

Gets the CIPClass object associated with [c]. The object can then be used to get instances of that class. Can be used when accessing the object directly (eip.cip.Test) is not available (e.g. when using WSAPI).

Parameters:
Name Type Description
c string | number

The class number, or name assigned in the memory map definition. For example, if the memory map section contains: <cipclass name="Test" number="100" instances="2" type="TestUDT1" />, then either getClass(100) or getClass('Test') can be used to look it up.

Since:
  • 1.9 (WAT 2.4)
Returns:
Type
cip.CIPClass

getInstance(c, i)

Gets the CIPVar instance [i] of class [c]. This is a convenience function that is the same as getClass(c).instance(i),

Parameters:
Name Type Description
c string | number

The class number, or name assigned in the memory map definition. See getClass.

i number

Instance number to get, starts at 1.

Since:
  • 1.9 (WAT 2.4)
Returns:
Type
cip.CIPVar