Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

A The meaning of object the ESL Interface object is to give provide a survey and visualization to way to clarify and tidy up the relations among ESL scripts in an application (a parent of the object of ESL Interface type is a system object ESLINTERFACES).
Relations among scripts are formed by the calling of the RPC or RPCX procedure procedures. This calling identifies the procedure name by text string in the target script. The text string is not checked at saving of script.

...

The name of one or more objects of ESL Interface type must follow the keyword IMPLEMENTATION. Any No action is not allowed before it (e.g. definition of procedure, variable or other action).
ESL script must implement all procedures of each ESL Interface which follows the keyword IMPLEMENTATION (it means that the ESL script implements the interface).
On the other side, it is possible to call the procedures of ESL script which is implemented by some interface through the name of the proper interface. This enables to formalize (also to make surveyclarify) the logical relations among ESL scripts that are generated by the mutual calling of RPC procedures. The meaning of interface is in the dictation of procedures which that the particular ESL script must implement - it implements them in fact.

The following example describes the use of the ESL interface in the design of simple action - sending the messages among users. On the user side, there is a simple scheme S.MSGClient and on the server side, there is the an object of Event E.MSGServer type.

E.MSGServer represents the server that offers some services. These services are assured by ESL Interface I.MsgServer and server ensure ESL Interface which guarantees the existence (implementation) of all necessary procedures (declared on in the interface). The interface I.MsgServer provides the the RegisterClient procedure RegisterClient. Each client who wants to send the messages is checked in by this procedure and gets the unique identifier. Primary demand As the primary need is receiving messages asynchronously by the (registered) client. E.MSGServer supplies provides this action and implements the procedure the SendMessage which procedure which calls the registered client internally. This client must implement interface the I.MsgClient interface which ensures the procedure  existence of ReceivMessage procedure.


Interfaces implemented by scripts

...

Blok kódu
languageesl
themeRDark
;***********************************************************************************
 ; Object name: I.MsgClient
 ; Interface of MSG Client
 ; Each MSG Client must implement following procedures
 
 ; Receiving the message _msg from client _srcClientUID
 RPC PROCEDURE ReceivMessage(IN INT _srcClientUID, IN TEXT _msg)
 ;***********************************************************************************
 


From the side of the server server's point of view (E.MSGServer), communication side (scheme it is not important who communicates with the server (S.MSGClient picture or other objects) is not importantanother object), but important is the implementation of the required interface. That is why the client can be represented by another scheme (or objects of Event type) in the real application. Important is to implement the interface I.MsgClientMsgClient interface.

Info
titleRelated pages:

ESL Interface configuration
PROCEDURE action
IMPLEMENTATION action
Fill procedures in the ESL script editor

...