Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
OnExternalEvent action
Function
This action defines the handler procedure of the event generated by an external library.
Declaration
Blok kódu | ||||
---|---|---|---|---|
| ||||
ON externalEvent GOTO procName [PRTY prtyIdent] |
Parameters
externalEvent | in | Textual constant |
which specifies a name of the event generated by an external library. | ||
procName | in | Name of RPC or RPCX procedure in ESL script. The procedure must consists of one parameter of structured variable type. The values of this structured variable depend on the particular external event which is handled. |
prtyIdent | in | Optional parameter of Int type. A priority when calling RPC. |
Description
The action specifies a procedure (by procName), which will be called back if an event with the given name is generated in an external library. The called procedure must be defined in ESL script that which is executed in the same process as the script that which works with the external functions of the library. When defining the handler of the same external event in the several ESL scripts, the information about event will be sent to all scripts.
The key word keyword PRTY enables to enter the priority of executing the registered RPC procedure. This feature ensures preferred executing of registered RPC procedure.
The list of generated events and their description is included in the documentation for extended libraries of the D2000 System.
The key word keyword PRTY enables to enter the priority of executing the registered RPC procedure. This feature ensures preferred executing of registered RPC procedure.
The list of generated events and their description is included in the documentation for extended libraries of the D2000 System.
Example
Blok kódu | ||||
---|---|---|---|---|
| ||||
; the function that will process an information about event RPC PROCEDURE OnExternalEvent (IN RECORD NOALIAS (SD.ExternalEventParams) _params END OnExternalEvent BEGIN ; registering the event handler with the name "ExternalEvent" ON "ExternalEvent" GOTO OnExternalEvent END |