Host Event Edit Dialog Box

To open the Host Event Edit dialog box, click Host Events on the Model menu or click the Edit button on the Event Expression Editor dialog box. Use this dialog box to add, edit, or delete global events to be used in operations throughout the modeling process.

Note: The events described here are used to synchronize the Host Integrator server with the state of the host application. These host synchronization events should be distinguished from the event handling that performs or extends actions in the model file itself.

Defining global host events enables you to rely on a specific order of events encapsulated into one WaitForMultipleEvents command in an operation. This feature enables a more reliable way to synchronize how data is being sent from a character mode host. Since Host Integrator handles only one command per packet of data, the WaitForMultipleEvents command is designed to encapsulate several global events into one unique command in an operation.

Enter a name for your event in the Event name box.

Choose from the following list of possible global events:

Event Name Description Parameters
Condition
(WaitForCondition "Entity", "Condition")
Waits until the condition is satisfied. The operation containing the event is paused until the condition is satisfied.
  • Entity
    Argument type: String
    Specifies the entity on which the condition will be satisfied.
  • Condition
    Click the Edit button to open an editing dialog box for the command argument. Use this dialog box to create a condition that is specific to the entity selected above. For example, create a condition that waits for a certain attribute or attributes to be updated.
Cursor at attribute
(WaitForCursorAtAttribute "Entity", "Attribute")
Begins a wait that is satisfied when the cursor appears in the first coordinate of an attribute on a particular entity. The operation containing the event is paused until the wait expires or is satisfied.
  • Entity
    Select the entity on which the specified attribute exists.
  • Attribute
    Select the attribute at which the cursor should wait.
Cursor at recordset field
(WaitForCursorAtRecordset "Entity", "Recordset", "Field")
Begins a wait that is satisfied when the specified recordset field data is received from the host. The operation containing the event is paused until the wait expires or is satisfied.
  • Entity
    Select the entity on which the specified recordset exists.
  • Recordset
    Select the recordset that contains the recordset field.
  • Field
    Select the recordset field at which the cursor should wait. Use the Fields tab to add fields to recordsets.
Cursor enter terminal field
(WaitForCursorEnterField "Row", "Column")
Begins a wait that is satisfied when the cursor enters the terminal field specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.
  • Row
    Argument type: Integer
    The row where the variable is written. The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
  • Column
    Argument type: Integer
    The column where the variable is written. The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
Cursor enter position
(WaitForCursorEnterPosition "Row", "Column")
Begins a wait that is satisfied when the cursor enters the position on the terminal screen specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.
  • Row
    Argument type: Integer
    The row where the variable is written. The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
  • Column
    Argument type: Integer
    The column where the variable is written. The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
Cursor not in terminal field
(WaitForCursorExitField "Row", "Column")
Begins a wait that is satisfied when the cursor exits the terminal field specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.
  • Row
    Argument type: Integer
  • The row where the variable is written. The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
  • Column
    Argument type: Integer
    The column where the variable is written. The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
Cursor not in position
(WaitForCursorExitPosition "Row", "Column")
Begins a wait that is satisfied when the cursor exits the position on the terminal screen specified by the row and column coordinates. The operation containing the event is paused until the wait expires or is satisfied.
  • Row
    Argument type: Integer
  • The row where the variable is written. The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
  • Column
    Argument type: Integer
    The column where the variable is written. The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal model the Design Tool is emulating.
Display string
(WaitForDisplayString "String", "Timeout", Row, Column, Relative)
Begins a wait that is satisfied by the appearance of the specified string at the row and column coordinates on the terminal screen. The string can be received from the host or typed by the user. The operation is paused until the wait expires or is satisfied.
  • String
    Argument type: String
    The string that can terminate the wait.
  • Timeout
    Argument type: String
    Specifies the interval of time (in HH:MM:SS format) before the wait terminates. If this method times out, an error occurs.
  • Row
    Argument type: Integer
    The row in which the string must be received.
  • Column
    Argument type: Integer
    The column in which the string must be received.
  • Relative
    Select Yes or No to choose whether or not this event is relative to the other events in the Events list.
Keyboard enabled
(WaitForKeyboardEnabled Duration)
Begins a wait that is satisfied when the keyboard is enabled. Use the Duration argument to specify how long to wait before an error occurs. The operation is paused until the wait expires in the specified duration or is satisfied.
  • Duration
    Argument type: Integer
    Specifies an interval of time in seconds to wait for the keyboard to be enabled. The default is 1 second.
Host communication string
(WaitForCommString "Text","Count")
Begins a wait that is satisfied by the reception of the specified string from the host. The operation containing this event is paused until the wait expires or is satisfied.

For VT and character mode HP hosts, you can wait for datastream sequences that include nonprintable characters using the Model Debug Messages dialog box. As the terminal processes characters, you can copy and paste text into the Text box to configure operations that include raw host communications.

Notes:
  • Often the best synchronization for VT and HP is in the datastream itself. Coupled with the WaitForMultipleEvents command, it enables you to be very deterministic about synchronization.
  • Use WaitForCommString only if you are connecting to your host using a host application that uses character mode rather than block mode. This applies to VT and HP character mode models only.
  • If you are connecting directly to a host, use WaitForDisplayString.
  • You can also record a login command list to determine which command is appropriate for your connection.
  • Text
    Argument type: String
    The string received from the host that can terminate the wait.
  • Count
    Argument type: Numeric
    Specifies the number of times a string is received from the host. The default value is 1.
Host communication silence (WaitForCommSilence Duration) Waits for the absence of data traveling to or from the host. Use the Duration argument to specify the duration of the silent period before an error occurs.
  • Duration
    Specifies an interval of time to wait for the event to occur in milliseconds. The default is 1000 milliseconds.
Host connection (WaitForHostConnection) Waits for a host connection to occur. Enter a name for your event in the Event name box.
Host disconnect (WaitForHostDisconnect) Waits for the lack of a host connection. Enter a name for your event in the Event name box.
Host update (WaitHostUpdate TopRow, LeftCol, BottomRow, RightCol, RegionType, Relative) Begins a wait that is satisfied when the specified region on the terminal screen is updated by the host. The operation containing the event is paused until the wait expires or is satisfied.
  • TopRow
    Argument type: Integer
    The top row of the updated region. The minimum value is 1 (row 1 is the first row). The maximum value varies according to the number of rows supported by the terminal screen the Design Tool is emulating.
  • LeftCol
    Argument type: Integer
    The left column of the updated region. The minimum value is 1 (column 1 is the first column). The maximum value varies according to the number of rows supported by the terminal screen the Design Tool is emulating.
  • BottomRow
    Argument type: Integer
    The bottom row of the updated region.
  • RightCol
    Argument type: Integer
    The right column of the updated region.
  • RegionType
    Specifies what mode to use for the region selected on the terminal screen. Select either the Linear or Rectangular position. The default is Rectangular.
  • Relative
    Argument type: Enumeration
    Select either Yes or No to make this region relative to the cursor's current location. The default is No.
Milliseconds
(WaitMilliseconds Duration)
Begins a wait that is satisfied after the specified duration of time in milliseconds.
  • Duration
    Argument type: Integer
    Specifies an interval of time in milliseconds. The specified event must last this long to satisfy the wait.
New host screen (WaitForNewHostScreen) Waits for a new screen to be sent from the host. Enter a name for your event in the Event name box.

To add a global host event:

  1. Click the right arrow button and select global host event. To delete a host event, select it from the Events box and click the minus button.
  2. Under Event properties, type a unique event name in the Event name box.
  3. Under Event parameters, configure any of the options available.
  4. When you have finished defining the event, click OK.

To create a WaitForMultipleEvents command using one or more global events:

  1. Open the Operation Edit dialog box, click the right arrow button, then point to Events, and select WaitForMultipleEvents.
  2. Click the Edit button to open the Host Event Expression Editor dialog box.
  3. After you've created your expression using the operand buttons to string together any global events, click OK.
  4. The new WaitForMultipleEvents command is now included in current operation.

Note: Each event contains unique parameters. For documentation on a specific event, select the event in the Events box and click the Event Help button.


Related Topics
Bullet Creating command lists
Bullet Using nonprintable characters