Attribute Event

The two events available for creating event handlers associated with attributes, Read Attribute and Write Attribute, are described below.

Read Attribute

This event is used to post-process data read from the terminal.

Possible uses:

Notes:

This event is invoked whenever a request is received to read attribute data. This request might be from a client API, an event handler callback, an operation, or a procedure.

The default result is "scraped" from the terminal, passed to the model-defined post-processing for white-space and symbol removal, and then sent to the event handler.

The value returned from the event handler is treated as the value of the attribute for the current request. Changing the current entity during this event is not recommended, as there may be additional actions pending that depend on the current entity remaining the same. Otherwise, there are no predefined conditions that result in an error.

Write Attribute

This event is used to pre-process the data to be written to the terminal or to customize the process of writing the data.

Possible uses:

Notes:

This event is invoked whenever a request is received to write attribute data. This request might be from a client API call, event handler callback, an operation, or a procedure.

The input data is passed directly to the event handler with no pre-processing.

Examples of actions the event handler might take include:

Host Integrator accepts whatever actions specified by the event handler, including omitting any terminal updates. Changing the current entity during this event is not recommended, as there may be additional actions pending that depend on the current entity remaining the same. Otherwise, there are no predefined conditions that result in an error.

The default callback performs the model-defined pre-processing for pre-pending, appending, and white-space padding, and then executes any pre-write operation, verifies the length of the data and state of the terminal, positions the cursor as needed, transmits the data to the terminal, and executes any post-write operation.




Related Topics
Bullet About event handlers
Bullet Event handler API overview