Package Overview
The Esys (External System) package is a collection of Kernel Procedures used during cosimulation to read values from and write values to esys interfaces on external systems. For a complete description of the cosimulation process, see Chapter 8 “External System Domain” on page 331.
Usually an esys interface can contain only one value at a time; however, a special type of esys interface, called a vector interface, can hold more than one value. A vector interface can be thought of as an array of esys interfaces grouped under a single object ID. The individual interfaces in a vector interface have index numbers, with the first interface having an index of 0. Two of the KPs described in this section can be used with all esys interfaces, while the remaining four can only be used with vector interfaces.
Note: The term vector interface refers to an input/output mechanism for external systems. This is different from a value vector (vvec), which is a collection of values with an array-like organization.
The two most basic procedures for using external systems involve reading a single value from an esys interface and setting a single value on an esys interface. These actions are done with op_esys_interface_value_get() and op_esys_interface_value_set(), respectively. Both of these KPs also work with vector interfaces if you specify a valid index number.
The remaining KPs enable you to access a series of values (of any data type) on a vector interface.
With op_esys_interface_array_get(), you can copy the values stored in a vector interface into successive positions in an array. To place values from an array onto successive index positions in a vector interface, use op_esys_interface_array_set().
op_esys_interface_vector_get() and op_esys_interface_vector_set() allow you to retrieve and set groups of values using value vectors rather than arrays. Value vectors differ from arrays in that each element of a value vector does not necessarily correspond with a successive location in memory.
Note: The External System package is not supported by the parallel kernel. If used in a parallel simulation, Esys KPs will either fail or do nothing, as appropriate.