G2-TO-G2-DATA-INTERFACE class. These objects inform the local G2 of the remote G2 process (or processes) with which to communicate. You then need to configure the KB for one or more types of data service or value or item passing.
Creating Data Interface Objects
To create a data interface object:
Choose:
KB Workspace > New] Object > network-interface > g2-to-g2-data-interface
G2-to-g2-interface-name attribute.
Identifying-attributes attribute is only used with GSI interfaces and is not applicable to G2 to G2 interfaces as this time.
Interface-warning-message-level attribute sets the severity level for error and warning messages that G2 will provide for the data interface object. Warning message levels range from
0 to 3. Level 0 is the lowest severity level, and provides the least information. Increasing the warning message level causes G2 to provide more information about errors and failures that are otherwise only detectable through the value of the Interface-status attribute. Messages are posted to the Operator Logbook. For example, when the warning message level is at
0 or 1, a failure to connect to the remote G2 process causes the Interface-status to change to failed, but no information is available about why the failure occurred. If the warning message level were set to 3 and the same connection failure occurred, G2 would post a message to the Operator Logbook describing why the connection failed. The values for this attribute are:
During KB development and testing, it may be useful to set the value of this attribute to
3 to detect all data interface error and warning messages, and then to reset the value to 0 for KB deployment. Defining the Connection Details
The Icp-connection-specification attribute defines information the KB needs to connect to a remote system. The connection information includes:
The syntax for the connection specification is:
{local emulator |
decnet connecting to task-name on host host-machine-name |
tcp-ip host "host-machine-name" port-number port-number}
To obtain the host-machine-name and either port-number or task-name:
Choose Main Menu > Miscellany > Network Info
G2-GET-HOST-NAME and G2-GET-PORT-NUMBER-OR-NAME, available in the sys-mod.kb.
Interface-timeout-period attribute controls how much time should elapse before the local G2 assumes that the G2 to G2 connection is inoperative and times out. You can create whenever rules in your KB to take appropriate action for a data interface object timeout. The time specified here refers to the timeout limit for the network communications link, not to the update interval of any variable being used. Even if the update interval of every variable exceeds the interface timeout period, the local data interface object will not time out unless the network connection is lost.
Interface-status attribute indicates the current status of the G2 to G2 connection. This is a read-only value, which changes with the state of the connection. Possible values are:
When you are creating a data interface object, the value of this attribute is always
inactive until the interface object is activated. Using Whenever Rules That Refer to the Connection Status
You can refer to the value of the Interface-status attribute to obtain the connection status, but you cannot change this value either interactively or programmatically. For instance, you could write a rule such as the following, to test for and take action upon a particular status.
whenever the interface-status of world-connection receives a value
and when the interface-status of world-connection is running
then change the background-color of the
subworkspace of world-connection to green
You can also use a
conclude action to control activation. Concluding the Icp-connection-specification attribute to have no value closes the connection. Here are two action buttons that use conclude actions to activate and deactivate the connection.
![]() |
The g2-to-g2-data-interface Class
The class-specific attributes of G2-TO-G2-DATA-INTERFACE objects are:
Creating Data Interface Subclasses
If you need additional user-defined attributes for your data interface object or want to provide a specific icon-description, create a new subclass by using a class definition. Specify the g2-to-g2-data-interface class as the direct superior class. Creating Class Definitions. For a description of primary and secondary superior classes, see Specifying the Superior Class(es).